@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,1289 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ "stateMutability": "view",
9
+ "type": "function",
10
+ "name": "getAddys",
11
+ "inputs": [],
12
+ "outputs": [
13
+ {
14
+ "name": "",
15
+ "type": "tuple",
16
+ "components": [
17
+ {
18
+ "name": "hq",
19
+ "type": "address"
20
+ },
21
+ {
22
+ "name": "undyToken",
23
+ "type": "address"
24
+ },
25
+ {
26
+ "name": "ledger",
27
+ "type": "address"
28
+ },
29
+ {
30
+ "name": "missionControl",
31
+ "type": "address"
32
+ },
33
+ {
34
+ "name": "legoBook",
35
+ "type": "address"
36
+ },
37
+ {
38
+ "name": "switchboard",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "name": "hatchery",
43
+ "type": "address"
44
+ },
45
+ {
46
+ "name": "lootDistributor",
47
+ "type": "address"
48
+ },
49
+ {
50
+ "name": "appraiser",
51
+ "type": "address"
52
+ },
53
+ {
54
+ "name": "walletBackpack",
55
+ "type": "address"
56
+ },
57
+ {
58
+ "name": "billing",
59
+ "type": "address"
60
+ },
61
+ {
62
+ "name": "vaultRegistry",
63
+ "type": "address"
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "stateMutability": "view",
71
+ "type": "function",
72
+ "name": "getUndyHq",
73
+ "inputs": [],
74
+ "outputs": [
75
+ {
76
+ "name": "",
77
+ "type": "address"
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "stateMutability": "view",
83
+ "type": "function",
84
+ "name": "getSwappableUsdcAmount",
85
+ "inputs": [
86
+ {
87
+ "name": "_wallet",
88
+ "type": "address"
89
+ },
90
+ {
91
+ "name": "_amountIn",
92
+ "type": "uint256"
93
+ },
94
+ {
95
+ "name": "_leverageVaultToken",
96
+ "type": "address"
97
+ },
98
+ {
99
+ "name": "_leverageVaultTokenRipeVaultId",
100
+ "type": "uint256"
101
+ }
102
+ ],
103
+ "outputs": [
104
+ {
105
+ "name": "",
106
+ "type": "uint256"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "stateMutability": "view",
112
+ "type": "function",
113
+ "name": "getSwappableUsdcAmount",
114
+ "inputs": [
115
+ {
116
+ "name": "_wallet",
117
+ "type": "address"
118
+ },
119
+ {
120
+ "name": "_amountIn",
121
+ "type": "uint256"
122
+ },
123
+ {
124
+ "name": "_leverageVaultToken",
125
+ "type": "address"
126
+ },
127
+ {
128
+ "name": "_leverageVaultTokenRipeVaultId",
129
+ "type": "uint256"
130
+ },
131
+ {
132
+ "name": "_usdc",
133
+ "type": "address"
134
+ }
135
+ ],
136
+ "outputs": [
137
+ {
138
+ "name": "",
139
+ "type": "uint256"
140
+ }
141
+ ]
142
+ },
143
+ {
144
+ "stateMutability": "view",
145
+ "type": "function",
146
+ "name": "getSwappableUsdcAmount",
147
+ "inputs": [
148
+ {
149
+ "name": "_wallet",
150
+ "type": "address"
151
+ },
152
+ {
153
+ "name": "_amountIn",
154
+ "type": "uint256"
155
+ },
156
+ {
157
+ "name": "_leverageVaultToken",
158
+ "type": "address"
159
+ },
160
+ {
161
+ "name": "_leverageVaultTokenRipeVaultId",
162
+ "type": "uint256"
163
+ },
164
+ {
165
+ "name": "_usdc",
166
+ "type": "address"
167
+ },
168
+ {
169
+ "name": "_green",
170
+ "type": "address"
171
+ }
172
+ ],
173
+ "outputs": [
174
+ {
175
+ "name": "",
176
+ "type": "uint256"
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "stateMutability": "view",
182
+ "type": "function",
183
+ "name": "getSwappableUsdcAmount",
184
+ "inputs": [
185
+ {
186
+ "name": "_wallet",
187
+ "type": "address"
188
+ },
189
+ {
190
+ "name": "_amountIn",
191
+ "type": "uint256"
192
+ },
193
+ {
194
+ "name": "_leverageVaultToken",
195
+ "type": "address"
196
+ },
197
+ {
198
+ "name": "_leverageVaultTokenRipeVaultId",
199
+ "type": "uint256"
200
+ },
201
+ {
202
+ "name": "_usdc",
203
+ "type": "address"
204
+ },
205
+ {
206
+ "name": "_green",
207
+ "type": "address"
208
+ },
209
+ {
210
+ "name": "_savingsGreen",
211
+ "type": "address"
212
+ }
213
+ ],
214
+ "outputs": [
215
+ {
216
+ "name": "",
217
+ "type": "uint256"
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "stateMutability": "view",
223
+ "type": "function",
224
+ "name": "getSwappableUsdcAmount",
225
+ "inputs": [
226
+ {
227
+ "name": "_wallet",
228
+ "type": "address"
229
+ },
230
+ {
231
+ "name": "_amountIn",
232
+ "type": "uint256"
233
+ },
234
+ {
235
+ "name": "_leverageVaultToken",
236
+ "type": "address"
237
+ },
238
+ {
239
+ "name": "_leverageVaultTokenRipeVaultId",
240
+ "type": "uint256"
241
+ },
242
+ {
243
+ "name": "_usdc",
244
+ "type": "address"
245
+ },
246
+ {
247
+ "name": "_green",
248
+ "type": "address"
249
+ },
250
+ {
251
+ "name": "_savingsGreen",
252
+ "type": "address"
253
+ },
254
+ {
255
+ "name": "_legoBook",
256
+ "type": "address"
257
+ }
258
+ ],
259
+ "outputs": [
260
+ {
261
+ "name": "",
262
+ "type": "uint256"
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ "stateMutability": "view",
268
+ "type": "function",
269
+ "name": "getMaxBorrowAmount",
270
+ "inputs": [
271
+ {
272
+ "name": "_wallet",
273
+ "type": "address"
274
+ },
275
+ {
276
+ "name": "_underlyingAsset",
277
+ "type": "address"
278
+ },
279
+ {
280
+ "name": "_collateralVaultToken",
281
+ "type": "address"
282
+ },
283
+ {
284
+ "name": "_collateralVaultTokenRipeVaultId",
285
+ "type": "uint256"
286
+ },
287
+ {
288
+ "name": "_totalAssets",
289
+ "type": "uint256"
290
+ },
291
+ {
292
+ "name": "_maxDebtRatio",
293
+ "type": "uint256"
294
+ }
295
+ ],
296
+ "outputs": [
297
+ {
298
+ "name": "",
299
+ "type": "uint256"
300
+ }
301
+ ]
302
+ },
303
+ {
304
+ "stateMutability": "view",
305
+ "type": "function",
306
+ "name": "getMaxBorrowAmount",
307
+ "inputs": [
308
+ {
309
+ "name": "_wallet",
310
+ "type": "address"
311
+ },
312
+ {
313
+ "name": "_underlyingAsset",
314
+ "type": "address"
315
+ },
316
+ {
317
+ "name": "_collateralVaultToken",
318
+ "type": "address"
319
+ },
320
+ {
321
+ "name": "_collateralVaultTokenRipeVaultId",
322
+ "type": "uint256"
323
+ },
324
+ {
325
+ "name": "_totalAssets",
326
+ "type": "uint256"
327
+ },
328
+ {
329
+ "name": "_maxDebtRatio",
330
+ "type": "uint256"
331
+ },
332
+ {
333
+ "name": "_legoBook",
334
+ "type": "address"
335
+ }
336
+ ],
337
+ "outputs": [
338
+ {
339
+ "name": "",
340
+ "type": "uint256"
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ "stateMutability": "view",
346
+ "type": "function",
347
+ "name": "performPostSwapValidation",
348
+ "inputs": [
349
+ {
350
+ "name": "_tokenIn",
351
+ "type": "address"
352
+ },
353
+ {
354
+ "name": "_tokenInAmount",
355
+ "type": "uint256"
356
+ },
357
+ {
358
+ "name": "_tokenOut",
359
+ "type": "address"
360
+ },
361
+ {
362
+ "name": "_tokenOutAmount",
363
+ "type": "uint256"
364
+ },
365
+ {
366
+ "name": "_usdcSlippageAllowed",
367
+ "type": "uint256"
368
+ },
369
+ {
370
+ "name": "_greenSlippageAllowed",
371
+ "type": "uint256"
372
+ }
373
+ ],
374
+ "outputs": [
375
+ {
376
+ "name": "",
377
+ "type": "bool"
378
+ }
379
+ ]
380
+ },
381
+ {
382
+ "stateMutability": "view",
383
+ "type": "function",
384
+ "name": "performPostSwapValidation",
385
+ "inputs": [
386
+ {
387
+ "name": "_tokenIn",
388
+ "type": "address"
389
+ },
390
+ {
391
+ "name": "_tokenInAmount",
392
+ "type": "uint256"
393
+ },
394
+ {
395
+ "name": "_tokenOut",
396
+ "type": "address"
397
+ },
398
+ {
399
+ "name": "_tokenOutAmount",
400
+ "type": "uint256"
401
+ },
402
+ {
403
+ "name": "_usdcSlippageAllowed",
404
+ "type": "uint256"
405
+ },
406
+ {
407
+ "name": "_greenSlippageAllowed",
408
+ "type": "uint256"
409
+ },
410
+ {
411
+ "name": "_usdc",
412
+ "type": "address"
413
+ }
414
+ ],
415
+ "outputs": [
416
+ {
417
+ "name": "",
418
+ "type": "bool"
419
+ }
420
+ ]
421
+ },
422
+ {
423
+ "stateMutability": "view",
424
+ "type": "function",
425
+ "name": "performPostSwapValidation",
426
+ "inputs": [
427
+ {
428
+ "name": "_tokenIn",
429
+ "type": "address"
430
+ },
431
+ {
432
+ "name": "_tokenInAmount",
433
+ "type": "uint256"
434
+ },
435
+ {
436
+ "name": "_tokenOut",
437
+ "type": "address"
438
+ },
439
+ {
440
+ "name": "_tokenOutAmount",
441
+ "type": "uint256"
442
+ },
443
+ {
444
+ "name": "_usdcSlippageAllowed",
445
+ "type": "uint256"
446
+ },
447
+ {
448
+ "name": "_greenSlippageAllowed",
449
+ "type": "uint256"
450
+ },
451
+ {
452
+ "name": "_usdc",
453
+ "type": "address"
454
+ },
455
+ {
456
+ "name": "_green",
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": "getTotalAssetsForUsdcVault",
471
+ "inputs": [
472
+ {
473
+ "name": "_wallet",
474
+ "type": "address"
475
+ },
476
+ {
477
+ "name": "_collateralVaultToken",
478
+ "type": "address"
479
+ },
480
+ {
481
+ "name": "_collateralVaultTokenRipeVaultId",
482
+ "type": "uint256"
483
+ },
484
+ {
485
+ "name": "_leverageVaultToken",
486
+ "type": "address"
487
+ },
488
+ {
489
+ "name": "_leverageVaultTokenRipeVaultId",
490
+ "type": "uint256"
491
+ }
492
+ ],
493
+ "outputs": [
494
+ {
495
+ "name": "",
496
+ "type": "uint256"
497
+ }
498
+ ]
499
+ },
500
+ {
501
+ "stateMutability": "view",
502
+ "type": "function",
503
+ "name": "getTotalAssetsForUsdcVault",
504
+ "inputs": [
505
+ {
506
+ "name": "_wallet",
507
+ "type": "address"
508
+ },
509
+ {
510
+ "name": "_collateralVaultToken",
511
+ "type": "address"
512
+ },
513
+ {
514
+ "name": "_collateralVaultTokenRipeVaultId",
515
+ "type": "uint256"
516
+ },
517
+ {
518
+ "name": "_leverageVaultToken",
519
+ "type": "address"
520
+ },
521
+ {
522
+ "name": "_leverageVaultTokenRipeVaultId",
523
+ "type": "uint256"
524
+ },
525
+ {
526
+ "name": "_shouldGetMax",
527
+ "type": "bool"
528
+ }
529
+ ],
530
+ "outputs": [
531
+ {
532
+ "name": "",
533
+ "type": "uint256"
534
+ }
535
+ ]
536
+ },
537
+ {
538
+ "stateMutability": "view",
539
+ "type": "function",
540
+ "name": "getTotalAssetsForUsdcVault",
541
+ "inputs": [
542
+ {
543
+ "name": "_wallet",
544
+ "type": "address"
545
+ },
546
+ {
547
+ "name": "_collateralVaultToken",
548
+ "type": "address"
549
+ },
550
+ {
551
+ "name": "_collateralVaultTokenRipeVaultId",
552
+ "type": "uint256"
553
+ },
554
+ {
555
+ "name": "_leverageVaultToken",
556
+ "type": "address"
557
+ },
558
+ {
559
+ "name": "_leverageVaultTokenRipeVaultId",
560
+ "type": "uint256"
561
+ },
562
+ {
563
+ "name": "_shouldGetMax",
564
+ "type": "bool"
565
+ },
566
+ {
567
+ "name": "_usdc",
568
+ "type": "address"
569
+ }
570
+ ],
571
+ "outputs": [
572
+ {
573
+ "name": "",
574
+ "type": "uint256"
575
+ }
576
+ ]
577
+ },
578
+ {
579
+ "stateMutability": "view",
580
+ "type": "function",
581
+ "name": "getTotalAssetsForUsdcVault",
582
+ "inputs": [
583
+ {
584
+ "name": "_wallet",
585
+ "type": "address"
586
+ },
587
+ {
588
+ "name": "_collateralVaultToken",
589
+ "type": "address"
590
+ },
591
+ {
592
+ "name": "_collateralVaultTokenRipeVaultId",
593
+ "type": "uint256"
594
+ },
595
+ {
596
+ "name": "_leverageVaultToken",
597
+ "type": "address"
598
+ },
599
+ {
600
+ "name": "_leverageVaultTokenRipeVaultId",
601
+ "type": "uint256"
602
+ },
603
+ {
604
+ "name": "_shouldGetMax",
605
+ "type": "bool"
606
+ },
607
+ {
608
+ "name": "_usdc",
609
+ "type": "address"
610
+ },
611
+ {
612
+ "name": "_green",
613
+ "type": "address"
614
+ }
615
+ ],
616
+ "outputs": [
617
+ {
618
+ "name": "",
619
+ "type": "uint256"
620
+ }
621
+ ]
622
+ },
623
+ {
624
+ "stateMutability": "view",
625
+ "type": "function",
626
+ "name": "getTotalAssetsForUsdcVault",
627
+ "inputs": [
628
+ {
629
+ "name": "_wallet",
630
+ "type": "address"
631
+ },
632
+ {
633
+ "name": "_collateralVaultToken",
634
+ "type": "address"
635
+ },
636
+ {
637
+ "name": "_collateralVaultTokenRipeVaultId",
638
+ "type": "uint256"
639
+ },
640
+ {
641
+ "name": "_leverageVaultToken",
642
+ "type": "address"
643
+ },
644
+ {
645
+ "name": "_leverageVaultTokenRipeVaultId",
646
+ "type": "uint256"
647
+ },
648
+ {
649
+ "name": "_shouldGetMax",
650
+ "type": "bool"
651
+ },
652
+ {
653
+ "name": "_usdc",
654
+ "type": "address"
655
+ },
656
+ {
657
+ "name": "_green",
658
+ "type": "address"
659
+ },
660
+ {
661
+ "name": "_savingsGreen",
662
+ "type": "address"
663
+ }
664
+ ],
665
+ "outputs": [
666
+ {
667
+ "name": "",
668
+ "type": "uint256"
669
+ }
670
+ ]
671
+ },
672
+ {
673
+ "stateMutability": "view",
674
+ "type": "function",
675
+ "name": "getTotalAssetsForUsdcVault",
676
+ "inputs": [
677
+ {
678
+ "name": "_wallet",
679
+ "type": "address"
680
+ },
681
+ {
682
+ "name": "_collateralVaultToken",
683
+ "type": "address"
684
+ },
685
+ {
686
+ "name": "_collateralVaultTokenRipeVaultId",
687
+ "type": "uint256"
688
+ },
689
+ {
690
+ "name": "_leverageVaultToken",
691
+ "type": "address"
692
+ },
693
+ {
694
+ "name": "_leverageVaultTokenRipeVaultId",
695
+ "type": "uint256"
696
+ },
697
+ {
698
+ "name": "_shouldGetMax",
699
+ "type": "bool"
700
+ },
701
+ {
702
+ "name": "_usdc",
703
+ "type": "address"
704
+ },
705
+ {
706
+ "name": "_green",
707
+ "type": "address"
708
+ },
709
+ {
710
+ "name": "_savingsGreen",
711
+ "type": "address"
712
+ },
713
+ {
714
+ "name": "_legoBook",
715
+ "type": "address"
716
+ }
717
+ ],
718
+ "outputs": [
719
+ {
720
+ "name": "",
721
+ "type": "uint256"
722
+ }
723
+ ]
724
+ },
725
+ {
726
+ "stateMutability": "view",
727
+ "type": "function",
728
+ "name": "getTotalAssetsForNonUsdcVault",
729
+ "inputs": [
730
+ {
731
+ "name": "_wallet",
732
+ "type": "address"
733
+ },
734
+ {
735
+ "name": "_underlyingAsset",
736
+ "type": "address"
737
+ },
738
+ {
739
+ "name": "_collateralVaultToken",
740
+ "type": "address"
741
+ },
742
+ {
743
+ "name": "_collateralVaultTokenRipeVaultId",
744
+ "type": "uint256"
745
+ },
746
+ {
747
+ "name": "_leverageVaultToken",
748
+ "type": "address"
749
+ },
750
+ {
751
+ "name": "_leverageVaultTokenRipeVaultId",
752
+ "type": "uint256"
753
+ }
754
+ ],
755
+ "outputs": [
756
+ {
757
+ "name": "",
758
+ "type": "uint256"
759
+ }
760
+ ]
761
+ },
762
+ {
763
+ "stateMutability": "view",
764
+ "type": "function",
765
+ "name": "getTotalAssetsForNonUsdcVault",
766
+ "inputs": [
767
+ {
768
+ "name": "_wallet",
769
+ "type": "address"
770
+ },
771
+ {
772
+ "name": "_underlyingAsset",
773
+ "type": "address"
774
+ },
775
+ {
776
+ "name": "_collateralVaultToken",
777
+ "type": "address"
778
+ },
779
+ {
780
+ "name": "_collateralVaultTokenRipeVaultId",
781
+ "type": "uint256"
782
+ },
783
+ {
784
+ "name": "_leverageVaultToken",
785
+ "type": "address"
786
+ },
787
+ {
788
+ "name": "_leverageVaultTokenRipeVaultId",
789
+ "type": "uint256"
790
+ },
791
+ {
792
+ "name": "_shouldGetMax",
793
+ "type": "bool"
794
+ }
795
+ ],
796
+ "outputs": [
797
+ {
798
+ "name": "",
799
+ "type": "uint256"
800
+ }
801
+ ]
802
+ },
803
+ {
804
+ "stateMutability": "view",
805
+ "type": "function",
806
+ "name": "getTotalAssetsForNonUsdcVault",
807
+ "inputs": [
808
+ {
809
+ "name": "_wallet",
810
+ "type": "address"
811
+ },
812
+ {
813
+ "name": "_underlyingAsset",
814
+ "type": "address"
815
+ },
816
+ {
817
+ "name": "_collateralVaultToken",
818
+ "type": "address"
819
+ },
820
+ {
821
+ "name": "_collateralVaultTokenRipeVaultId",
822
+ "type": "uint256"
823
+ },
824
+ {
825
+ "name": "_leverageVaultToken",
826
+ "type": "address"
827
+ },
828
+ {
829
+ "name": "_leverageVaultTokenRipeVaultId",
830
+ "type": "uint256"
831
+ },
832
+ {
833
+ "name": "_shouldGetMax",
834
+ "type": "bool"
835
+ },
836
+ {
837
+ "name": "_usdc",
838
+ "type": "address"
839
+ }
840
+ ],
841
+ "outputs": [
842
+ {
843
+ "name": "",
844
+ "type": "uint256"
845
+ }
846
+ ]
847
+ },
848
+ {
849
+ "stateMutability": "view",
850
+ "type": "function",
851
+ "name": "getTotalAssetsForNonUsdcVault",
852
+ "inputs": [
853
+ {
854
+ "name": "_wallet",
855
+ "type": "address"
856
+ },
857
+ {
858
+ "name": "_underlyingAsset",
859
+ "type": "address"
860
+ },
861
+ {
862
+ "name": "_collateralVaultToken",
863
+ "type": "address"
864
+ },
865
+ {
866
+ "name": "_collateralVaultTokenRipeVaultId",
867
+ "type": "uint256"
868
+ },
869
+ {
870
+ "name": "_leverageVaultToken",
871
+ "type": "address"
872
+ },
873
+ {
874
+ "name": "_leverageVaultTokenRipeVaultId",
875
+ "type": "uint256"
876
+ },
877
+ {
878
+ "name": "_shouldGetMax",
879
+ "type": "bool"
880
+ },
881
+ {
882
+ "name": "_usdc",
883
+ "type": "address"
884
+ },
885
+ {
886
+ "name": "_green",
887
+ "type": "address"
888
+ }
889
+ ],
890
+ "outputs": [
891
+ {
892
+ "name": "",
893
+ "type": "uint256"
894
+ }
895
+ ]
896
+ },
897
+ {
898
+ "stateMutability": "view",
899
+ "type": "function",
900
+ "name": "getTotalAssetsForNonUsdcVault",
901
+ "inputs": [
902
+ {
903
+ "name": "_wallet",
904
+ "type": "address"
905
+ },
906
+ {
907
+ "name": "_underlyingAsset",
908
+ "type": "address"
909
+ },
910
+ {
911
+ "name": "_collateralVaultToken",
912
+ "type": "address"
913
+ },
914
+ {
915
+ "name": "_collateralVaultTokenRipeVaultId",
916
+ "type": "uint256"
917
+ },
918
+ {
919
+ "name": "_leverageVaultToken",
920
+ "type": "address"
921
+ },
922
+ {
923
+ "name": "_leverageVaultTokenRipeVaultId",
924
+ "type": "uint256"
925
+ },
926
+ {
927
+ "name": "_shouldGetMax",
928
+ "type": "bool"
929
+ },
930
+ {
931
+ "name": "_usdc",
932
+ "type": "address"
933
+ },
934
+ {
935
+ "name": "_green",
936
+ "type": "address"
937
+ },
938
+ {
939
+ "name": "_savingsGreen",
940
+ "type": "address"
941
+ }
942
+ ],
943
+ "outputs": [
944
+ {
945
+ "name": "",
946
+ "type": "uint256"
947
+ }
948
+ ]
949
+ },
950
+ {
951
+ "stateMutability": "view",
952
+ "type": "function",
953
+ "name": "getTotalAssetsForNonUsdcVault",
954
+ "inputs": [
955
+ {
956
+ "name": "_wallet",
957
+ "type": "address"
958
+ },
959
+ {
960
+ "name": "_underlyingAsset",
961
+ "type": "address"
962
+ },
963
+ {
964
+ "name": "_collateralVaultToken",
965
+ "type": "address"
966
+ },
967
+ {
968
+ "name": "_collateralVaultTokenRipeVaultId",
969
+ "type": "uint256"
970
+ },
971
+ {
972
+ "name": "_leverageVaultToken",
973
+ "type": "address"
974
+ },
975
+ {
976
+ "name": "_leverageVaultTokenRipeVaultId",
977
+ "type": "uint256"
978
+ },
979
+ {
980
+ "name": "_shouldGetMax",
981
+ "type": "bool"
982
+ },
983
+ {
984
+ "name": "_usdc",
985
+ "type": "address"
986
+ },
987
+ {
988
+ "name": "_green",
989
+ "type": "address"
990
+ },
991
+ {
992
+ "name": "_savingsGreen",
993
+ "type": "address"
994
+ },
995
+ {
996
+ "name": "_legoBook",
997
+ "type": "address"
998
+ }
999
+ ],
1000
+ "outputs": [
1001
+ {
1002
+ "name": "",
1003
+ "type": "uint256"
1004
+ }
1005
+ ]
1006
+ },
1007
+ {
1008
+ "stateMutability": "view",
1009
+ "type": "function",
1010
+ "name": "getCollateralBalance",
1011
+ "inputs": [
1012
+ {
1013
+ "name": "_user",
1014
+ "type": "address"
1015
+ },
1016
+ {
1017
+ "name": "_asset",
1018
+ "type": "address"
1019
+ },
1020
+ {
1021
+ "name": "_ripeVaultId",
1022
+ "type": "uint256"
1023
+ }
1024
+ ],
1025
+ "outputs": [
1026
+ {
1027
+ "name": "",
1028
+ "type": "uint256"
1029
+ }
1030
+ ]
1031
+ },
1032
+ {
1033
+ "stateMutability": "view",
1034
+ "type": "function",
1035
+ "name": "getCollateralBalance",
1036
+ "inputs": [
1037
+ {
1038
+ "name": "_user",
1039
+ "type": "address"
1040
+ },
1041
+ {
1042
+ "name": "_asset",
1043
+ "type": "address"
1044
+ },
1045
+ {
1046
+ "name": "_ripeVaultId",
1047
+ "type": "uint256"
1048
+ },
1049
+ {
1050
+ "name": "_vaultBook",
1051
+ "type": "address"
1052
+ }
1053
+ ],
1054
+ "outputs": [
1055
+ {
1056
+ "name": "",
1057
+ "type": "uint256"
1058
+ }
1059
+ ]
1060
+ },
1061
+ {
1062
+ "stateMutability": "view",
1063
+ "type": "function",
1064
+ "name": "isSupportedAssetInVault",
1065
+ "inputs": [
1066
+ {
1067
+ "name": "_vaultId",
1068
+ "type": "uint256"
1069
+ },
1070
+ {
1071
+ "name": "_asset",
1072
+ "type": "address"
1073
+ }
1074
+ ],
1075
+ "outputs": [
1076
+ {
1077
+ "name": "",
1078
+ "type": "bool"
1079
+ }
1080
+ ]
1081
+ },
1082
+ {
1083
+ "stateMutability": "view",
1084
+ "type": "function",
1085
+ "name": "getVaultBookAndDeleverage",
1086
+ "inputs": [],
1087
+ "outputs": [
1088
+ {
1089
+ "name": "",
1090
+ "type": "address"
1091
+ },
1092
+ {
1093
+ "name": "",
1094
+ "type": "address"
1095
+ }
1096
+ ]
1097
+ },
1098
+ {
1099
+ "stateMutability": "view",
1100
+ "type": "function",
1101
+ "name": "isValidVaultToken",
1102
+ "inputs": [
1103
+ {
1104
+ "name": "_underlyingAsset",
1105
+ "type": "address"
1106
+ },
1107
+ {
1108
+ "name": "_vaultToken",
1109
+ "type": "address"
1110
+ },
1111
+ {
1112
+ "name": "_ripeVaultId",
1113
+ "type": "uint256"
1114
+ },
1115
+ {
1116
+ "name": "_legoId",
1117
+ "type": "uint256"
1118
+ }
1119
+ ],
1120
+ "outputs": [
1121
+ {
1122
+ "name": "",
1123
+ "type": "bool"
1124
+ }
1125
+ ]
1126
+ },
1127
+ {
1128
+ "stateMutability": "view",
1129
+ "type": "function",
1130
+ "name": "isValidRawAssetCollateral",
1131
+ "inputs": [
1132
+ {
1133
+ "name": "_underlyingAsset",
1134
+ "type": "address"
1135
+ },
1136
+ {
1137
+ "name": "_rawAsset",
1138
+ "type": "address"
1139
+ },
1140
+ {
1141
+ "name": "_ripeVaultId",
1142
+ "type": "uint256"
1143
+ }
1144
+ ],
1145
+ "outputs": [
1146
+ {
1147
+ "name": "",
1148
+ "type": "bool"
1149
+ }
1150
+ ]
1151
+ },
1152
+ {
1153
+ "stateMutability": "view",
1154
+ "type": "function",
1155
+ "name": "RIPE_REGISTRY",
1156
+ "inputs": [],
1157
+ "outputs": [
1158
+ {
1159
+ "name": "",
1160
+ "type": "address"
1161
+ }
1162
+ ]
1163
+ },
1164
+ {
1165
+ "stateMutability": "view",
1166
+ "type": "function",
1167
+ "name": "GREEN_TOKEN",
1168
+ "inputs": [],
1169
+ "outputs": [
1170
+ {
1171
+ "name": "",
1172
+ "type": "address"
1173
+ }
1174
+ ]
1175
+ },
1176
+ {
1177
+ "stateMutability": "view",
1178
+ "type": "function",
1179
+ "name": "SAVINGS_GREEN",
1180
+ "inputs": [],
1181
+ "outputs": [
1182
+ {
1183
+ "name": "",
1184
+ "type": "address"
1185
+ }
1186
+ ]
1187
+ },
1188
+ {
1189
+ "stateMutability": "view",
1190
+ "type": "function",
1191
+ "name": "USDC",
1192
+ "inputs": [],
1193
+ "outputs": [
1194
+ {
1195
+ "name": "",
1196
+ "type": "address"
1197
+ }
1198
+ ]
1199
+ },
1200
+ {
1201
+ "stateMutability": "nonpayable",
1202
+ "type": "constructor",
1203
+ "inputs": [
1204
+ {
1205
+ "name": "_undyHq",
1206
+ "type": "address"
1207
+ },
1208
+ {
1209
+ "name": "_ripeRegistry",
1210
+ "type": "address"
1211
+ },
1212
+ {
1213
+ "name": "_usdc",
1214
+ "type": "address"
1215
+ }
1216
+ ],
1217
+ "outputs": []
1218
+ }
1219
+ ];
1220
+ export const deployAddress = '0xD69cD617B0C2686a2C8C01d32c487cBb79e082f1';
1221
+ function getRequest(method, args, contractAddressOrOptions) {
1222
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1223
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1224
+ const call = {
1225
+ contractName: 'LevgVaultHelper',
1226
+ method,
1227
+ args,
1228
+ address,
1229
+ deployAddress,
1230
+ defaultValue,
1231
+ getAbi: () => abi,
1232
+ with: (options) => {
1233
+ call.address = options.contractAddress;
1234
+ call.defaultValue = options.defaultValue;
1235
+ return call;
1236
+ },
1237
+ defaultTo: (defaultValue) => {
1238
+ call.defaultValue = defaultValue;
1239
+ return call;
1240
+ },
1241
+ at: (address) => {
1242
+ call.address = address;
1243
+ return call;
1244
+ },
1245
+ };
1246
+ return call;
1247
+ }
1248
+ export const call = {
1249
+ getAddys: (...args) => getRequest('getAddys', args),
1250
+ getUndyHq: (...args) => getRequest('getUndyHq', args),
1251
+ getSwappableUsdcAmount: (...args) => getRequest('getSwappableUsdcAmount', args),
1252
+ getMaxBorrowAmount: (...args) => getRequest('getMaxBorrowAmount', args),
1253
+ performPostSwapValidation: (...args) => getRequest('performPostSwapValidation', args),
1254
+ getTotalAssetsForUsdcVault: (...args) => getRequest('getTotalAssetsForUsdcVault', args),
1255
+ getTotalAssetsForNonUsdcVault: (...args) => getRequest('getTotalAssetsForNonUsdcVault', args),
1256
+ getCollateralBalance: (...args) => getRequest('getCollateralBalance', args),
1257
+ isSupportedAssetInVault: (...args) => getRequest('isSupportedAssetInVault', args),
1258
+ getVaultBookAndDeleverage: (...args) => getRequest('getVaultBookAndDeleverage', args),
1259
+ isValidVaultToken: (...args) => getRequest('isValidVaultToken', args),
1260
+ isValidRawAssetCollateral: (...args) => getRequest('isValidRawAssetCollateral', args),
1261
+ RIPE_REGISTRY: (...args) => getRequest('RIPE_REGISTRY', args),
1262
+ GREEN_TOKEN: (...args) => getRequest('GREEN_TOKEN', args),
1263
+ SAVINGS_GREEN: (...args) => getRequest('SAVINGS_GREEN', args),
1264
+ USDC: (...args) => getRequest('USDC', args),
1265
+ };
1266
+ export function toSdk(deployAddress, publicClient, walletClient, addressResolver) {
1267
+ return {
1268
+ deployAddress,
1269
+ abi,
1270
+ // Queries
1271
+ getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args).at(deployAddress), {}, addressResolver),
1272
+ getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args).at(deployAddress), {}, addressResolver),
1273
+ getSwappableUsdcAmount: (...args) => singleQuery(publicClient, call.getSwappableUsdcAmount(...args).at(deployAddress), {}, addressResolver),
1274
+ getMaxBorrowAmount: (...args) => singleQuery(publicClient, call.getMaxBorrowAmount(...args).at(deployAddress), {}, addressResolver),
1275
+ performPostSwapValidation: (...args) => singleQuery(publicClient, call.performPostSwapValidation(...args).at(deployAddress), {}, addressResolver),
1276
+ getTotalAssetsForUsdcVault: (...args) => singleQuery(publicClient, call.getTotalAssetsForUsdcVault(...args).at(deployAddress), {}, addressResolver),
1277
+ getTotalAssetsForNonUsdcVault: (...args) => singleQuery(publicClient, call.getTotalAssetsForNonUsdcVault(...args).at(deployAddress), {}, addressResolver),
1278
+ getCollateralBalance: (...args) => singleQuery(publicClient, call.getCollateralBalance(...args).at(deployAddress), {}, addressResolver),
1279
+ isSupportedAssetInVault: (...args) => singleQuery(publicClient, call.isSupportedAssetInVault(...args).at(deployAddress), {}, addressResolver),
1280
+ getVaultBookAndDeleverage: (...args) => singleQuery(publicClient, call.getVaultBookAndDeleverage(...args).at(deployAddress), {}, addressResolver),
1281
+ isValidVaultToken: (...args) => singleQuery(publicClient, call.isValidVaultToken(...args).at(deployAddress), {}, addressResolver),
1282
+ isValidRawAssetCollateral: (...args) => singleQuery(publicClient, call.isValidRawAssetCollateral(...args).at(deployAddress), {}, addressResolver),
1283
+ RIPE_REGISTRY: (...args) => singleQuery(publicClient, call.RIPE_REGISTRY(...args).at(deployAddress), {}, addressResolver),
1284
+ GREEN_TOKEN: (...args) => singleQuery(publicClient, call.GREEN_TOKEN(...args).at(deployAddress), {}, addressResolver),
1285
+ SAVINGS_GREEN: (...args) => singleQuery(publicClient, call.SAVINGS_GREEN(...args).at(deployAddress), {}, addressResolver),
1286
+ USDC: (...args) => singleQuery(publicClient, call.USDC(...args).at(deployAddress), {}, addressResolver),
1287
+ // Mutations
1288
+ };
1289
+ }