@underscore-finance/sdk 1.2.20-next.0 → 1.2.20-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/.claude/settings.local.json +31 -0
  2. package/.eslintrc.json +27 -0
  3. package/.prettierrc +9 -0
  4. package/.tool-versions +1 -0
  5. package/LICENSE +41 -0
  6. package/LICENSE_DATE.md +34 -0
  7. package/LICENSE_GRANTS.md +33 -0
  8. package/LICENSE_INFO.md +90 -0
  9. package/README.md +116 -17
  10. package/dapp.config.js +154 -0
  11. package/package.json +17 -44
  12. package/src/getSwapInstructions.ts +55 -0
  13. package/src/index.ts +192 -0
  14. package/tsconfig.json +18 -0
  15. package/AGENTS.md +0 -162
  16. package/abis.json +0 -181875
  17. package/addresses.json +0 -76
  18. package/dist/contracts/AaveV3.d.ts +0 -2594
  19. package/dist/contracts/AaveV3.d.ts.map +0 -1
  20. package/dist/contracts/AaveV3.js +0 -3272
  21. package/dist/contracts/AeroClassic.d.ts +0 -2118
  22. package/dist/contracts/AeroClassic.d.ts.map +0 -1
  23. package/dist/contracts/AeroClassic.js +0 -2679
  24. package/dist/contracts/AeroSlipstream.d.ts +0 -2256
  25. package/dist/contracts/AeroSlipstream.d.ts.map +0 -1
  26. package/dist/contracts/AeroSlipstream.js +0 -2848
  27. package/dist/contracts/AgentSenderGeneric.d.ts +0 -4129
  28. package/dist/contracts/AgentSenderGeneric.d.ts.map +0 -1
  29. package/dist/contracts/AgentSenderGeneric.js +0 -5397
  30. package/dist/contracts/AgentSenderSpecial.d.ts +0 -1997
  31. package/dist/contracts/AgentSenderSpecial.d.ts.map +0 -1
  32. package/dist/contracts/AgentSenderSpecial.js +0 -2532
  33. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts +0 -2245
  34. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts.map +0 -1
  35. package/dist/contracts/AgentSenderSpecialSigHelper.js +0 -2971
  36. package/dist/contracts/AgentWrapper.d.ts +0 -2520
  37. package/dist/contracts/AgentWrapper.d.ts.map +0 -1
  38. package/dist/contracts/AgentWrapper.js +0 -3389
  39. package/dist/contracts/AgentWrapperV1.d.ts +0 -3789
  40. package/dist/contracts/AgentWrapperV1.d.ts.map +0 -1
  41. package/dist/contracts/AgentWrapperV1.js +0 -4945
  42. package/dist/contracts/AgentWrapperV2.d.ts +0 -2494
  43. package/dist/contracts/AgentWrapperV2.d.ts.map +0 -1
  44. package/dist/contracts/AgentWrapperV2.js +0 -3354
  45. package/dist/contracts/Appraiser.d.ts +0 -577
  46. package/dist/contracts/Appraiser.d.ts.map +0 -1
  47. package/dist/contracts/Appraiser.js +0 -735
  48. package/dist/contracts/Avantis.d.ts +0 -2606
  49. package/dist/contracts/Avantis.d.ts.map +0 -1
  50. package/dist/contracts/Avantis.js +0 -3282
  51. package/dist/contracts/Billing.d.ts +0 -381
  52. package/dist/contracts/Billing.d.ts.map +0 -1
  53. package/dist/contracts/Billing.js +0 -451
  54. package/dist/contracts/ChequeBook.d.ts +0 -1704
  55. package/dist/contracts/ChequeBook.d.ts.map +0 -1
  56. package/dist/contracts/ChequeBook.js +0 -1922
  57. package/dist/contracts/CompoundV3.d.ts +0 -2622
  58. package/dist/contracts/CompoundV3.d.ts.map +0 -1
  59. package/dist/contracts/CompoundV3.js +0 -3304
  60. package/dist/contracts/ConvertVaultToken.d.ts +0 -64
  61. package/dist/contracts/ConvertVaultToken.d.ts.map +0 -1
  62. package/dist/contracts/ConvertVaultToken.js +0 -75
  63. package/dist/contracts/Curve.d.ts +0 -1107
  64. package/dist/contracts/Curve.d.ts.map +0 -1
  65. package/dist/contracts/Curve.js +0 -1379
  66. package/dist/contracts/DefaultsBase.d.ts +0 -306
  67. package/dist/contracts/DefaultsBase.d.ts.map +0 -1
  68. package/dist/contracts/DefaultsBase.js +0 -331
  69. package/dist/contracts/ERC20.d.ts +0 -288
  70. package/dist/contracts/ERC20.d.ts.map +0 -1
  71. package/dist/contracts/ERC20.js +0 -359
  72. package/dist/contracts/EarnVault.d.ts +0 -1733
  73. package/dist/contracts/EarnVault.d.ts.map +0 -1
  74. package/dist/contracts/EarnVault.js +0 -2235
  75. package/dist/contracts/EarnVaultAgent.d.ts +0 -1033
  76. package/dist/contracts/EarnVaultAgent.d.ts.map +0 -1
  77. package/dist/contracts/EarnVaultAgent.js +0 -1296
  78. package/dist/contracts/EarnVaultAgentSigHelper.d.ts +0 -905
  79. package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +0 -1
  80. package/dist/contracts/EarnVaultAgentSigHelper.js +0 -1198
  81. package/dist/contracts/Euler.d.ts +0 -2662
  82. package/dist/contracts/Euler.d.ts.map +0 -1
  83. package/dist/contracts/Euler.js +0 -3350
  84. package/dist/contracts/ExtraFi.d.ts +0 -2637
  85. package/dist/contracts/ExtraFi.d.ts.map +0 -1
  86. package/dist/contracts/ExtraFi.js +0 -3323
  87. package/dist/contracts/Fluid.d.ts +0 -2634
  88. package/dist/contracts/Fluid.d.ts.map +0 -1
  89. package/dist/contracts/Fluid.js +0 -3318
  90. package/dist/contracts/FortyAcres.d.ts +0 -2620
  91. package/dist/contracts/FortyAcres.d.ts.map +0 -1
  92. package/dist/contracts/FortyAcres.js +0 -3300
  93. package/dist/contracts/Hatchery.d.ts +0 -392
  94. package/dist/contracts/Hatchery.d.ts.map +0 -1
  95. package/dist/contracts/Hatchery.js +0 -472
  96. package/dist/contracts/Helpers.d.ts +0 -1463
  97. package/dist/contracts/Helpers.d.ts.map +0 -1
  98. package/dist/contracts/Helpers.js +0 -1763
  99. package/dist/contracts/HighCommand.d.ts +0 -2129
  100. package/dist/contracts/HighCommand.d.ts.map +0 -1
  101. package/dist/contracts/HighCommand.js +0 -2429
  102. package/dist/contracts/Kernel.d.ts +0 -387
  103. package/dist/contracts/Kernel.d.ts.map +0 -1
  104. package/dist/contracts/Kernel.js +0 -442
  105. package/dist/contracts/Ledger.d.ts +0 -708
  106. package/dist/contracts/Ledger.d.ts.map +0 -1
  107. package/dist/contracts/Ledger.js +0 -854
  108. package/dist/contracts/LegoBook.d.ts +0 -1463
  109. package/dist/contracts/LegoBook.d.ts.map +0 -1
  110. package/dist/contracts/LegoBook.js +0 -1763
  111. package/dist/contracts/LegoTools.d.ts +0 -1913
  112. package/dist/contracts/LegoTools.d.ts.map +0 -1
  113. package/dist/contracts/LegoTools.js +0 -2402
  114. package/dist/contracts/LevgVault.d.ts +0 -2115
  115. package/dist/contracts/LevgVault.d.ts.map +0 -1
  116. package/dist/contracts/LevgVault.js +0 -2733
  117. package/dist/contracts/LevgVaultAgent.d.ts +0 -1955
  118. package/dist/contracts/LevgVaultAgent.d.ts.map +0 -1
  119. package/dist/contracts/LevgVaultAgent.js +0 -2508
  120. package/dist/contracts/LevgVaultAgentSigHelper.d.ts +0 -2221
  121. package/dist/contracts/LevgVaultAgentSigHelper.d.ts.map +0 -1
  122. package/dist/contracts/LevgVaultAgentSigHelper.js +0 -2963
  123. package/dist/contracts/LevgVaultHelper.d.ts +0 -977
  124. package/dist/contracts/LevgVaultHelper.d.ts.map +0 -1
  125. package/dist/contracts/LevgVaultHelper.js +0 -1289
  126. package/dist/contracts/LevgVaultTools.d.ts +0 -2629
  127. package/dist/contracts/LevgVaultTools.d.ts.map +0 -1
  128. package/dist/contracts/LevgVaultTools.js +0 -3560
  129. package/dist/contracts/LootDistributor.d.ts +0 -1053
  130. package/dist/contracts/LootDistributor.d.ts.map +0 -1
  131. package/dist/contracts/LootDistributor.js +0 -1291
  132. package/dist/contracts/Migrator.d.ts +0 -289
  133. package/dist/contracts/Migrator.d.ts.map +0 -1
  134. package/dist/contracts/Migrator.js +0 -348
  135. package/dist/contracts/MissionControl.d.ts +0 -1405
  136. package/dist/contracts/MissionControl.d.ts.map +0 -1
  137. package/dist/contracts/MissionControl.js +0 -1592
  138. package/dist/contracts/Moonwell.d.ts +0 -2623
  139. package/dist/contracts/Moonwell.d.ts.map +0 -1
  140. package/dist/contracts/Moonwell.js +0 -3304
  141. package/dist/contracts/Morpho.d.ts +0 -2662
  142. package/dist/contracts/Morpho.d.ts.map +0 -1
  143. package/dist/contracts/Morpho.js +0 -3350
  144. package/dist/contracts/Paymaster.d.ts +0 -1714
  145. package/dist/contracts/Paymaster.d.ts.map +0 -1
  146. package/dist/contracts/Paymaster.js +0 -2098
  147. package/dist/contracts/RipeLego.d.ts +0 -2913
  148. package/dist/contracts/RipeLego.d.ts.map +0 -1
  149. package/dist/contracts/RipeLego.js +0 -3643
  150. package/dist/contracts/Sentinel.d.ts +0 -2064
  151. package/dist/contracts/Sentinel.d.ts.map +0 -1
  152. package/dist/contracts/Sentinel.js +0 -2476
  153. package/dist/contracts/SignatureHelper.d.ts +0 -4250
  154. package/dist/contracts/SignatureHelper.d.ts.map +0 -1
  155. package/dist/contracts/SignatureHelper.js +0 -5714
  156. package/dist/contracts/SignatureHelperV1.d.ts +0 -4250
  157. package/dist/contracts/SignatureHelperV1.d.ts.map +0 -1
  158. package/dist/contracts/SignatureHelperV1.js +0 -5714
  159. package/dist/contracts/SkyPsm.d.ts +0 -2667
  160. package/dist/contracts/SkyPsm.d.ts.map +0 -1
  161. package/dist/contracts/SkyPsm.js +0 -3356
  162. package/dist/contracts/Switchboard.d.ts +0 -1483
  163. package/dist/contracts/Switchboard.d.ts.map +0 -1
  164. package/dist/contracts/Switchboard.js +0 -1790
  165. package/dist/contracts/SwitchboardAlpha.d.ts +0 -3161
  166. package/dist/contracts/SwitchboardAlpha.d.ts.map +0 -1
  167. package/dist/contracts/SwitchboardAlpha.js +0 -3771
  168. package/dist/contracts/SwitchboardBravo.d.ts +0 -1591
  169. package/dist/contracts/SwitchboardBravo.d.ts.map +0 -1
  170. package/dist/contracts/SwitchboardBravo.js +0 -1872
  171. package/dist/contracts/SwitchboardCharlie.d.ts +0 -3172
  172. package/dist/contracts/SwitchboardCharlie.d.ts.map +0 -1
  173. package/dist/contracts/SwitchboardCharlie.js +0 -3713
  174. package/dist/contracts/UnderscoreLego.d.ts +0 -2592
  175. package/dist/contracts/UnderscoreLego.d.ts.map +0 -1
  176. package/dist/contracts/UnderscoreLego.js +0 -3264
  177. package/dist/contracts/UndyAero.d.ts +0 -1733
  178. package/dist/contracts/UndyAero.d.ts.map +0 -1
  179. package/dist/contracts/UndyAero.js +0 -2235
  180. package/dist/contracts/UndyBtc.d.ts +0 -1733
  181. package/dist/contracts/UndyBtc.d.ts.map +0 -1
  182. package/dist/contracts/UndyBtc.js +0 -2235
  183. package/dist/contracts/UndyCbeth.d.ts +0 -1733
  184. package/dist/contracts/UndyCbeth.d.ts.map +0 -1
  185. package/dist/contracts/UndyCbeth.js +0 -2235
  186. package/dist/contracts/UndyEth.d.ts +0 -1733
  187. package/dist/contracts/UndyEth.d.ts.map +0 -1
  188. package/dist/contracts/UndyEth.js +0 -2235
  189. package/dist/contracts/UndyEurc.d.ts +0 -1733
  190. package/dist/contracts/UndyEurc.d.ts.map +0 -1
  191. package/dist/contracts/UndyEurc.js +0 -2235
  192. package/dist/contracts/UndyGho.d.ts +0 -1733
  193. package/dist/contracts/UndyGho.d.ts.map +0 -1
  194. package/dist/contracts/UndyGho.js +0 -2235
  195. package/dist/contracts/UndyHq.d.ts +0 -1677
  196. package/dist/contracts/UndyHq.d.ts.map +0 -1
  197. package/dist/contracts/UndyHq.js +0 -2026
  198. package/dist/contracts/UndyRewardsLego.d.ts +0 -1572
  199. package/dist/contracts/UndyRewardsLego.d.ts.map +0 -1
  200. package/dist/contracts/UndyRewardsLego.js +0 -1994
  201. package/dist/contracts/UndyUsd.d.ts +0 -1733
  202. package/dist/contracts/UndyUsd.d.ts.map +0 -1
  203. package/dist/contracts/UndyUsd.js +0 -2235
  204. package/dist/contracts/UndyUsdV2.d.ts +0 -1762
  205. package/dist/contracts/UndyUsdV2.d.ts.map +0 -1
  206. package/dist/contracts/UndyUsdV2.js +0 -2267
  207. package/dist/contracts/UndyUsds.d.ts +0 -1733
  208. package/dist/contracts/UndyUsds.d.ts.map +0 -1
  209. package/dist/contracts/UndyUsds.js +0 -2235
  210. package/dist/contracts/UndyVirtual.d.ts +0 -1762
  211. package/dist/contracts/UndyVirtual.d.ts.map +0 -1
  212. package/dist/contracts/UndyVirtual.js +0 -2267
  213. package/dist/contracts/UniswapV2.d.ts +0 -2118
  214. package/dist/contracts/UniswapV2.d.ts.map +0 -1
  215. package/dist/contracts/UniswapV2.js +0 -2679
  216. package/dist/contracts/UniswapV3.d.ts +0 -2256
  217. package/dist/contracts/UniswapV3.d.ts.map +0 -1
  218. package/dist/contracts/UniswapV3.js +0 -2848
  219. package/dist/contracts/UserWallet.d.ts +0 -2650
  220. package/dist/contracts/UserWallet.d.ts.map +0 -1
  221. package/dist/contracts/UserWallet.js +0 -3520
  222. package/dist/contracts/UserWalletConfig.d.ts +0 -3901
  223. package/dist/contracts/UserWalletConfig.d.ts.map +0 -1
  224. package/dist/contracts/UserWalletConfig.js +0 -4507
  225. package/dist/contracts/UserWalletConfigV1.d.ts +0 -3692
  226. package/dist/contracts/UserWalletConfigV1.d.ts.map +0 -1
  227. package/dist/contracts/UserWalletConfigV1.js +0 -4276
  228. package/dist/contracts/UserWalletSignatureHelper.d.ts +0 -4552
  229. package/dist/contracts/UserWalletSignatureHelper.d.ts.map +0 -1
  230. package/dist/contracts/UserWalletSignatureHelper.js +0 -6123
  231. package/dist/contracts/UserWalletV1.d.ts +0 -2650
  232. package/dist/contracts/UserWalletV1.d.ts.map +0 -1
  233. package/dist/contracts/UserWalletV1.js +0 -3520
  234. package/dist/contracts/VaultRegistry.d.ts +0 -3162
  235. package/dist/contracts/VaultRegistry.d.ts.map +0 -1
  236. package/dist/contracts/VaultRegistry.js +0 -3893
  237. package/dist/contracts/WalletBackpack.d.ts +0 -1248
  238. package/dist/contracts/WalletBackpack.d.ts.map +0 -1
  239. package/dist/contracts/WalletBackpack.js +0 -1519
  240. package/dist/contracts/Wasabi.d.ts +0 -2620
  241. package/dist/contracts/Wasabi.d.ts.map +0 -1
  242. package/dist/contracts/Wasabi.js +0 -3300
  243. package/dist/contracts/index.d.ts +0 -76
  244. package/dist/contracts/index.d.ts.map +0 -1
  245. package/dist/contracts/index.js +0 -79
  246. package/dist/contracts/sdk.d.ts +0 -156
  247. package/dist/contracts/sdk.d.ts.map +0 -1
  248. package/dist/contracts/sdk.js +0 -158
  249. package/dist/getSwapInstructions.d.ts +0 -34
  250. package/dist/getSwapInstructions.d.ts.map +0 -1
  251. package/dist/getSwapInstructions.js +0 -21
  252. package/dist/index.d.ts +0 -135
  253. package/dist/index.d.ts.map +0 -1
  254. package/dist/index.js +0 -137
@@ -1,2532 +0,0 @@
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": "NonceIncremented",
10
- "inputs": [
11
- {
12
- "name": "userWallet",
13
- "type": "address",
14
- "indexed": false
15
- },
16
- {
17
- "name": "oldNonce",
18
- "type": "uint256",
19
- "indexed": false
20
- },
21
- {
22
- "name": "newNonce",
23
- "type": "uint256",
24
- "indexed": false
25
- }
26
- ],
27
- "anonymous": false,
28
- "type": "event"
29
- },
30
- {
31
- "name": "OwnershipChangeInitiated",
32
- "inputs": [
33
- {
34
- "name": "prevOwner",
35
- "type": "address",
36
- "indexed": true
37
- },
38
- {
39
- "name": "newOwner",
40
- "type": "address",
41
- "indexed": true
42
- },
43
- {
44
- "name": "confirmBlock",
45
- "type": "uint256",
46
- "indexed": false
47
- }
48
- ],
49
- "anonymous": false,
50
- "type": "event"
51
- },
52
- {
53
- "name": "OwnershipChangeConfirmed",
54
- "inputs": [
55
- {
56
- "name": "prevOwner",
57
- "type": "address",
58
- "indexed": true
59
- },
60
- {
61
- "name": "newOwner",
62
- "type": "address",
63
- "indexed": true
64
- },
65
- {
66
- "name": "initiatedBlock",
67
- "type": "uint256",
68
- "indexed": false
69
- },
70
- {
71
- "name": "confirmBlock",
72
- "type": "uint256",
73
- "indexed": false
74
- }
75
- ],
76
- "anonymous": false,
77
- "type": "event"
78
- },
79
- {
80
- "name": "OwnershipChangeCancelled",
81
- "inputs": [
82
- {
83
- "name": "cancelledOwner",
84
- "type": "address",
85
- "indexed": true
86
- },
87
- {
88
- "name": "cancelledBy",
89
- "type": "address",
90
- "indexed": true
91
- },
92
- {
93
- "name": "initiatedBlock",
94
- "type": "uint256",
95
- "indexed": false
96
- },
97
- {
98
- "name": "confirmBlock",
99
- "type": "uint256",
100
- "indexed": false
101
- }
102
- ],
103
- "anonymous": false,
104
- "type": "event"
105
- },
106
- {
107
- "name": "OwnershipTimeLockSet",
108
- "inputs": [
109
- {
110
- "name": "numBlocks",
111
- "type": "uint256",
112
- "indexed": false
113
- }
114
- ],
115
- "anonymous": false,
116
- "type": "event"
117
- },
118
- {
119
- "stateMutability": "nonpayable",
120
- "type": "function",
121
- "name": "changeOwnership",
122
- "inputs": [
123
- {
124
- "name": "_newOwner",
125
- "type": "address"
126
- }
127
- ],
128
- "outputs": []
129
- },
130
- {
131
- "stateMutability": "nonpayable",
132
- "type": "function",
133
- "name": "confirmOwnershipChange",
134
- "inputs": [],
135
- "outputs": []
136
- },
137
- {
138
- "stateMutability": "nonpayable",
139
- "type": "function",
140
- "name": "cancelOwnershipChange",
141
- "inputs": [],
142
- "outputs": []
143
- },
144
- {
145
- "stateMutability": "view",
146
- "type": "function",
147
- "name": "hasPendingOwnerChange",
148
- "inputs": [],
149
- "outputs": [
150
- {
151
- "name": "",
152
- "type": "bool"
153
- }
154
- ]
155
- },
156
- {
157
- "stateMutability": "nonpayable",
158
- "type": "function",
159
- "name": "setOwnershipTimeLock",
160
- "inputs": [
161
- {
162
- "name": "_numBlocks",
163
- "type": "uint256"
164
- }
165
- ],
166
- "outputs": []
167
- },
168
- {
169
- "stateMutability": "view",
170
- "type": "function",
171
- "name": "owner",
172
- "inputs": [],
173
- "outputs": [
174
- {
175
- "name": "",
176
- "type": "address"
177
- }
178
- ]
179
- },
180
- {
181
- "stateMutability": "view",
182
- "type": "function",
183
- "name": "ownershipTimeLock",
184
- "inputs": [],
185
- "outputs": [
186
- {
187
- "name": "",
188
- "type": "uint256"
189
- }
190
- ]
191
- },
192
- {
193
- "stateMutability": "view",
194
- "type": "function",
195
- "name": "pendingOwner",
196
- "inputs": [],
197
- "outputs": [
198
- {
199
- "name": "",
200
- "type": "tuple",
201
- "components": [
202
- {
203
- "name": "newOwner",
204
- "type": "address"
205
- },
206
- {
207
- "name": "initiatedBlock",
208
- "type": "uint256"
209
- },
210
- {
211
- "name": "confirmBlock",
212
- "type": "uint256"
213
- }
214
- ]
215
- }
216
- ]
217
- },
218
- {
219
- "stateMutability": "view",
220
- "type": "function",
221
- "name": "MIN_OWNERSHIP_TIMELOCK",
222
- "inputs": [],
223
- "outputs": [
224
- {
225
- "name": "",
226
- "type": "uint256"
227
- }
228
- ]
229
- },
230
- {
231
- "stateMutability": "view",
232
- "type": "function",
233
- "name": "MAX_OWNERSHIP_TIMELOCK",
234
- "inputs": [],
235
- "outputs": [
236
- {
237
- "name": "",
238
- "type": "uint256"
239
- }
240
- ]
241
- },
242
- {
243
- "stateMutability": "nonpayable",
244
- "type": "function",
245
- "name": "addCollateralAndBorrow",
246
- "inputs": [
247
- {
248
- "name": "_agentWrapper",
249
- "type": "address"
250
- },
251
- {
252
- "name": "_userWallet",
253
- "type": "address"
254
- },
255
- {
256
- "name": "_debtLegoId",
257
- "type": "uint256"
258
- }
259
- ],
260
- "outputs": []
261
- },
262
- {
263
- "stateMutability": "nonpayable",
264
- "type": "function",
265
- "name": "addCollateralAndBorrow",
266
- "inputs": [
267
- {
268
- "name": "_agentWrapper",
269
- "type": "address"
270
- },
271
- {
272
- "name": "_userWallet",
273
- "type": "address"
274
- },
275
- {
276
- "name": "_debtLegoId",
277
- "type": "uint256"
278
- },
279
- {
280
- "name": "_addCollateralAssets",
281
- "type": "tuple[]",
282
- "components": [
283
- {
284
- "name": "vaultId",
285
- "type": "uint256"
286
- },
287
- {
288
- "name": "asset",
289
- "type": "address"
290
- },
291
- {
292
- "name": "amount",
293
- "type": "uint256"
294
- }
295
- ]
296
- }
297
- ],
298
- "outputs": []
299
- },
300
- {
301
- "stateMutability": "nonpayable",
302
- "type": "function",
303
- "name": "addCollateralAndBorrow",
304
- "inputs": [
305
- {
306
- "name": "_agentWrapper",
307
- "type": "address"
308
- },
309
- {
310
- "name": "_userWallet",
311
- "type": "address"
312
- },
313
- {
314
- "name": "_debtLegoId",
315
- "type": "uint256"
316
- },
317
- {
318
- "name": "_addCollateralAssets",
319
- "type": "tuple[]",
320
- "components": [
321
- {
322
- "name": "vaultId",
323
- "type": "uint256"
324
- },
325
- {
326
- "name": "asset",
327
- "type": "address"
328
- },
329
- {
330
- "name": "amount",
331
- "type": "uint256"
332
- }
333
- ]
334
- },
335
- {
336
- "name": "_greenBorrowAmount",
337
- "type": "uint256"
338
- }
339
- ],
340
- "outputs": []
341
- },
342
- {
343
- "stateMutability": "nonpayable",
344
- "type": "function",
345
- "name": "addCollateralAndBorrow",
346
- "inputs": [
347
- {
348
- "name": "_agentWrapper",
349
- "type": "address"
350
- },
351
- {
352
- "name": "_userWallet",
353
- "type": "address"
354
- },
355
- {
356
- "name": "_debtLegoId",
357
- "type": "uint256"
358
- },
359
- {
360
- "name": "_addCollateralAssets",
361
- "type": "tuple[]",
362
- "components": [
363
- {
364
- "name": "vaultId",
365
- "type": "uint256"
366
- },
367
- {
368
- "name": "asset",
369
- "type": "address"
370
- },
371
- {
372
- "name": "amount",
373
- "type": "uint256"
374
- }
375
- ]
376
- },
377
- {
378
- "name": "_greenBorrowAmount",
379
- "type": "uint256"
380
- },
381
- {
382
- "name": "_wantsSavingsGreen",
383
- "type": "bool"
384
- }
385
- ],
386
- "outputs": []
387
- },
388
- {
389
- "stateMutability": "nonpayable",
390
- "type": "function",
391
- "name": "addCollateralAndBorrow",
392
- "inputs": [
393
- {
394
- "name": "_agentWrapper",
395
- "type": "address"
396
- },
397
- {
398
- "name": "_userWallet",
399
- "type": "address"
400
- },
401
- {
402
- "name": "_debtLegoId",
403
- "type": "uint256"
404
- },
405
- {
406
- "name": "_addCollateralAssets",
407
- "type": "tuple[]",
408
- "components": [
409
- {
410
- "name": "vaultId",
411
- "type": "uint256"
412
- },
413
- {
414
- "name": "asset",
415
- "type": "address"
416
- },
417
- {
418
- "name": "amount",
419
- "type": "uint256"
420
- }
421
- ]
422
- },
423
- {
424
- "name": "_greenBorrowAmount",
425
- "type": "uint256"
426
- },
427
- {
428
- "name": "_wantsSavingsGreen",
429
- "type": "bool"
430
- },
431
- {
432
- "name": "_shouldEnterStabPool",
433
- "type": "bool"
434
- }
435
- ],
436
- "outputs": []
437
- },
438
- {
439
- "stateMutability": "nonpayable",
440
- "type": "function",
441
- "name": "addCollateralAndBorrow",
442
- "inputs": [
443
- {
444
- "name": "_agentWrapper",
445
- "type": "address"
446
- },
447
- {
448
- "name": "_userWallet",
449
- "type": "address"
450
- },
451
- {
452
- "name": "_debtLegoId",
453
- "type": "uint256"
454
- },
455
- {
456
- "name": "_addCollateralAssets",
457
- "type": "tuple[]",
458
- "components": [
459
- {
460
- "name": "vaultId",
461
- "type": "uint256"
462
- },
463
- {
464
- "name": "asset",
465
- "type": "address"
466
- },
467
- {
468
- "name": "amount",
469
- "type": "uint256"
470
- }
471
- ]
472
- },
473
- {
474
- "name": "_greenBorrowAmount",
475
- "type": "uint256"
476
- },
477
- {
478
- "name": "_wantsSavingsGreen",
479
- "type": "bool"
480
- },
481
- {
482
- "name": "_shouldEnterStabPool",
483
- "type": "bool"
484
- },
485
- {
486
- "name": "_swapInstructions",
487
- "type": "tuple[]",
488
- "components": [
489
- {
490
- "name": "legoId",
491
- "type": "uint256"
492
- },
493
- {
494
- "name": "amountIn",
495
- "type": "uint256"
496
- },
497
- {
498
- "name": "minAmountOut",
499
- "type": "uint256"
500
- },
501
- {
502
- "name": "tokenPath",
503
- "type": "address[]"
504
- },
505
- {
506
- "name": "poolPath",
507
- "type": "address[]"
508
- }
509
- ]
510
- }
511
- ],
512
- "outputs": []
513
- },
514
- {
515
- "stateMutability": "nonpayable",
516
- "type": "function",
517
- "name": "addCollateralAndBorrow",
518
- "inputs": [
519
- {
520
- "name": "_agentWrapper",
521
- "type": "address"
522
- },
523
- {
524
- "name": "_userWallet",
525
- "type": "address"
526
- },
527
- {
528
- "name": "_debtLegoId",
529
- "type": "uint256"
530
- },
531
- {
532
- "name": "_addCollateralAssets",
533
- "type": "tuple[]",
534
- "components": [
535
- {
536
- "name": "vaultId",
537
- "type": "uint256"
538
- },
539
- {
540
- "name": "asset",
541
- "type": "address"
542
- },
543
- {
544
- "name": "amount",
545
- "type": "uint256"
546
- }
547
- ]
548
- },
549
- {
550
- "name": "_greenBorrowAmount",
551
- "type": "uint256"
552
- },
553
- {
554
- "name": "_wantsSavingsGreen",
555
- "type": "bool"
556
- },
557
- {
558
- "name": "_shouldEnterStabPool",
559
- "type": "bool"
560
- },
561
- {
562
- "name": "_swapInstructions",
563
- "type": "tuple[]",
564
- "components": [
565
- {
566
- "name": "legoId",
567
- "type": "uint256"
568
- },
569
- {
570
- "name": "amountIn",
571
- "type": "uint256"
572
- },
573
- {
574
- "name": "minAmountOut",
575
- "type": "uint256"
576
- },
577
- {
578
- "name": "tokenPath",
579
- "type": "address[]"
580
- },
581
- {
582
- "name": "poolPath",
583
- "type": "address[]"
584
- }
585
- ]
586
- },
587
- {
588
- "name": "_yieldPosition",
589
- "type": "tuple",
590
- "components": [
591
- {
592
- "name": "legoId",
593
- "type": "uint256"
594
- },
595
- {
596
- "name": "asset",
597
- "type": "address"
598
- },
599
- {
600
- "name": "amount",
601
- "type": "uint256"
602
- },
603
- {
604
- "name": "vaultAddr",
605
- "type": "address"
606
- }
607
- ]
608
- }
609
- ],
610
- "outputs": []
611
- },
612
- {
613
- "stateMutability": "nonpayable",
614
- "type": "function",
615
- "name": "addCollateralAndBorrow",
616
- "inputs": [
617
- {
618
- "name": "_agentWrapper",
619
- "type": "address"
620
- },
621
- {
622
- "name": "_userWallet",
623
- "type": "address"
624
- },
625
- {
626
- "name": "_debtLegoId",
627
- "type": "uint256"
628
- },
629
- {
630
- "name": "_addCollateralAssets",
631
- "type": "tuple[]",
632
- "components": [
633
- {
634
- "name": "vaultId",
635
- "type": "uint256"
636
- },
637
- {
638
- "name": "asset",
639
- "type": "address"
640
- },
641
- {
642
- "name": "amount",
643
- "type": "uint256"
644
- }
645
- ]
646
- },
647
- {
648
- "name": "_greenBorrowAmount",
649
- "type": "uint256"
650
- },
651
- {
652
- "name": "_wantsSavingsGreen",
653
- "type": "bool"
654
- },
655
- {
656
- "name": "_shouldEnterStabPool",
657
- "type": "bool"
658
- },
659
- {
660
- "name": "_swapInstructions",
661
- "type": "tuple[]",
662
- "components": [
663
- {
664
- "name": "legoId",
665
- "type": "uint256"
666
- },
667
- {
668
- "name": "amountIn",
669
- "type": "uint256"
670
- },
671
- {
672
- "name": "minAmountOut",
673
- "type": "uint256"
674
- },
675
- {
676
- "name": "tokenPath",
677
- "type": "address[]"
678
- },
679
- {
680
- "name": "poolPath",
681
- "type": "address[]"
682
- }
683
- ]
684
- },
685
- {
686
- "name": "_yieldPosition",
687
- "type": "tuple",
688
- "components": [
689
- {
690
- "name": "legoId",
691
- "type": "uint256"
692
- },
693
- {
694
- "name": "asset",
695
- "type": "address"
696
- },
697
- {
698
- "name": "amount",
699
- "type": "uint256"
700
- },
701
- {
702
- "name": "vaultAddr",
703
- "type": "address"
704
- }
705
- ]
706
- },
707
- {
708
- "name": "_sig",
709
- "type": "tuple",
710
- "components": [
711
- {
712
- "name": "signature",
713
- "type": "bytes"
714
- },
715
- {
716
- "name": "nonce",
717
- "type": "uint256"
718
- },
719
- {
720
- "name": "expiration",
721
- "type": "uint256"
722
- }
723
- ]
724
- }
725
- ],
726
- "outputs": []
727
- },
728
- {
729
- "stateMutability": "nonpayable",
730
- "type": "function",
731
- "name": "repayAndWithdraw",
732
- "inputs": [
733
- {
734
- "name": "_agentWrapper",
735
- "type": "address"
736
- },
737
- {
738
- "name": "_userWallet",
739
- "type": "address"
740
- },
741
- {
742
- "name": "_debtLegoId",
743
- "type": "uint256"
744
- }
745
- ],
746
- "outputs": []
747
- },
748
- {
749
- "stateMutability": "nonpayable",
750
- "type": "function",
751
- "name": "repayAndWithdraw",
752
- "inputs": [
753
- {
754
- "name": "_agentWrapper",
755
- "type": "address"
756
- },
757
- {
758
- "name": "_userWallet",
759
- "type": "address"
760
- },
761
- {
762
- "name": "_debtLegoId",
763
- "type": "uint256"
764
- },
765
- {
766
- "name": "_deleverageAssets",
767
- "type": "tuple[]",
768
- "components": [
769
- {
770
- "name": "vaultId",
771
- "type": "uint256"
772
- },
773
- {
774
- "name": "asset",
775
- "type": "address"
776
- },
777
- {
778
- "name": "targetRepayAmount",
779
- "type": "uint256"
780
- }
781
- ]
782
- }
783
- ],
784
- "outputs": []
785
- },
786
- {
787
- "stateMutability": "nonpayable",
788
- "type": "function",
789
- "name": "repayAndWithdraw",
790
- "inputs": [
791
- {
792
- "name": "_agentWrapper",
793
- "type": "address"
794
- },
795
- {
796
- "name": "_userWallet",
797
- "type": "address"
798
- },
799
- {
800
- "name": "_debtLegoId",
801
- "type": "uint256"
802
- },
803
- {
804
- "name": "_deleverageAssets",
805
- "type": "tuple[]",
806
- "components": [
807
- {
808
- "name": "vaultId",
809
- "type": "uint256"
810
- },
811
- {
812
- "name": "asset",
813
- "type": "address"
814
- },
815
- {
816
- "name": "targetRepayAmount",
817
- "type": "uint256"
818
- }
819
- ]
820
- },
821
- {
822
- "name": "_yieldPosition",
823
- "type": "tuple",
824
- "components": [
825
- {
826
- "name": "legoId",
827
- "type": "uint256"
828
- },
829
- {
830
- "name": "vaultToken",
831
- "type": "address"
832
- },
833
- {
834
- "name": "vaultTokenAmount",
835
- "type": "uint256"
836
- }
837
- ]
838
- }
839
- ],
840
- "outputs": []
841
- },
842
- {
843
- "stateMutability": "nonpayable",
844
- "type": "function",
845
- "name": "repayAndWithdraw",
846
- "inputs": [
847
- {
848
- "name": "_agentWrapper",
849
- "type": "address"
850
- },
851
- {
852
- "name": "_userWallet",
853
- "type": "address"
854
- },
855
- {
856
- "name": "_debtLegoId",
857
- "type": "uint256"
858
- },
859
- {
860
- "name": "_deleverageAssets",
861
- "type": "tuple[]",
862
- "components": [
863
- {
864
- "name": "vaultId",
865
- "type": "uint256"
866
- },
867
- {
868
- "name": "asset",
869
- "type": "address"
870
- },
871
- {
872
- "name": "targetRepayAmount",
873
- "type": "uint256"
874
- }
875
- ]
876
- },
877
- {
878
- "name": "_yieldPosition",
879
- "type": "tuple",
880
- "components": [
881
- {
882
- "name": "legoId",
883
- "type": "uint256"
884
- },
885
- {
886
- "name": "vaultToken",
887
- "type": "address"
888
- },
889
- {
890
- "name": "vaultTokenAmount",
891
- "type": "uint256"
892
- }
893
- ]
894
- },
895
- {
896
- "name": "_swapInstructions",
897
- "type": "tuple[]",
898
- "components": [
899
- {
900
- "name": "legoId",
901
- "type": "uint256"
902
- },
903
- {
904
- "name": "amountIn",
905
- "type": "uint256"
906
- },
907
- {
908
- "name": "minAmountOut",
909
- "type": "uint256"
910
- },
911
- {
912
- "name": "tokenPath",
913
- "type": "address[]"
914
- },
915
- {
916
- "name": "poolPath",
917
- "type": "address[]"
918
- }
919
- ]
920
- }
921
- ],
922
- "outputs": []
923
- },
924
- {
925
- "stateMutability": "nonpayable",
926
- "type": "function",
927
- "name": "repayAndWithdraw",
928
- "inputs": [
929
- {
930
- "name": "_agentWrapper",
931
- "type": "address"
932
- },
933
- {
934
- "name": "_userWallet",
935
- "type": "address"
936
- },
937
- {
938
- "name": "_debtLegoId",
939
- "type": "uint256"
940
- },
941
- {
942
- "name": "_deleverageAssets",
943
- "type": "tuple[]",
944
- "components": [
945
- {
946
- "name": "vaultId",
947
- "type": "uint256"
948
- },
949
- {
950
- "name": "asset",
951
- "type": "address"
952
- },
953
- {
954
- "name": "targetRepayAmount",
955
- "type": "uint256"
956
- }
957
- ]
958
- },
959
- {
960
- "name": "_yieldPosition",
961
- "type": "tuple",
962
- "components": [
963
- {
964
- "name": "legoId",
965
- "type": "uint256"
966
- },
967
- {
968
- "name": "vaultToken",
969
- "type": "address"
970
- },
971
- {
972
- "name": "vaultTokenAmount",
973
- "type": "uint256"
974
- }
975
- ]
976
- },
977
- {
978
- "name": "_swapInstructions",
979
- "type": "tuple[]",
980
- "components": [
981
- {
982
- "name": "legoId",
983
- "type": "uint256"
984
- },
985
- {
986
- "name": "amountIn",
987
- "type": "uint256"
988
- },
989
- {
990
- "name": "minAmountOut",
991
- "type": "uint256"
992
- },
993
- {
994
- "name": "tokenPath",
995
- "type": "address[]"
996
- },
997
- {
998
- "name": "poolPath",
999
- "type": "address[]"
1000
- }
1001
- ]
1002
- },
1003
- {
1004
- "name": "_repayAsset",
1005
- "type": "address"
1006
- }
1007
- ],
1008
- "outputs": []
1009
- },
1010
- {
1011
- "stateMutability": "nonpayable",
1012
- "type": "function",
1013
- "name": "repayAndWithdraw",
1014
- "inputs": [
1015
- {
1016
- "name": "_agentWrapper",
1017
- "type": "address"
1018
- },
1019
- {
1020
- "name": "_userWallet",
1021
- "type": "address"
1022
- },
1023
- {
1024
- "name": "_debtLegoId",
1025
- "type": "uint256"
1026
- },
1027
- {
1028
- "name": "_deleverageAssets",
1029
- "type": "tuple[]",
1030
- "components": [
1031
- {
1032
- "name": "vaultId",
1033
- "type": "uint256"
1034
- },
1035
- {
1036
- "name": "asset",
1037
- "type": "address"
1038
- },
1039
- {
1040
- "name": "targetRepayAmount",
1041
- "type": "uint256"
1042
- }
1043
- ]
1044
- },
1045
- {
1046
- "name": "_yieldPosition",
1047
- "type": "tuple",
1048
- "components": [
1049
- {
1050
- "name": "legoId",
1051
- "type": "uint256"
1052
- },
1053
- {
1054
- "name": "vaultToken",
1055
- "type": "address"
1056
- },
1057
- {
1058
- "name": "vaultTokenAmount",
1059
- "type": "uint256"
1060
- }
1061
- ]
1062
- },
1063
- {
1064
- "name": "_swapInstructions",
1065
- "type": "tuple[]",
1066
- "components": [
1067
- {
1068
- "name": "legoId",
1069
- "type": "uint256"
1070
- },
1071
- {
1072
- "name": "amountIn",
1073
- "type": "uint256"
1074
- },
1075
- {
1076
- "name": "minAmountOut",
1077
- "type": "uint256"
1078
- },
1079
- {
1080
- "name": "tokenPath",
1081
- "type": "address[]"
1082
- },
1083
- {
1084
- "name": "poolPath",
1085
- "type": "address[]"
1086
- }
1087
- ]
1088
- },
1089
- {
1090
- "name": "_repayAsset",
1091
- "type": "address"
1092
- },
1093
- {
1094
- "name": "_repayAmount",
1095
- "type": "uint256"
1096
- }
1097
- ],
1098
- "outputs": []
1099
- },
1100
- {
1101
- "stateMutability": "nonpayable",
1102
- "type": "function",
1103
- "name": "repayAndWithdraw",
1104
- "inputs": [
1105
- {
1106
- "name": "_agentWrapper",
1107
- "type": "address"
1108
- },
1109
- {
1110
- "name": "_userWallet",
1111
- "type": "address"
1112
- },
1113
- {
1114
- "name": "_debtLegoId",
1115
- "type": "uint256"
1116
- },
1117
- {
1118
- "name": "_deleverageAssets",
1119
- "type": "tuple[]",
1120
- "components": [
1121
- {
1122
- "name": "vaultId",
1123
- "type": "uint256"
1124
- },
1125
- {
1126
- "name": "asset",
1127
- "type": "address"
1128
- },
1129
- {
1130
- "name": "targetRepayAmount",
1131
- "type": "uint256"
1132
- }
1133
- ]
1134
- },
1135
- {
1136
- "name": "_yieldPosition",
1137
- "type": "tuple",
1138
- "components": [
1139
- {
1140
- "name": "legoId",
1141
- "type": "uint256"
1142
- },
1143
- {
1144
- "name": "vaultToken",
1145
- "type": "address"
1146
- },
1147
- {
1148
- "name": "vaultTokenAmount",
1149
- "type": "uint256"
1150
- }
1151
- ]
1152
- },
1153
- {
1154
- "name": "_swapInstructions",
1155
- "type": "tuple[]",
1156
- "components": [
1157
- {
1158
- "name": "legoId",
1159
- "type": "uint256"
1160
- },
1161
- {
1162
- "name": "amountIn",
1163
- "type": "uint256"
1164
- },
1165
- {
1166
- "name": "minAmountOut",
1167
- "type": "uint256"
1168
- },
1169
- {
1170
- "name": "tokenPath",
1171
- "type": "address[]"
1172
- },
1173
- {
1174
- "name": "poolPath",
1175
- "type": "address[]"
1176
- }
1177
- ]
1178
- },
1179
- {
1180
- "name": "_repayAsset",
1181
- "type": "address"
1182
- },
1183
- {
1184
- "name": "_repayAmount",
1185
- "type": "uint256"
1186
- },
1187
- {
1188
- "name": "_removeCollateralAssets",
1189
- "type": "tuple[]",
1190
- "components": [
1191
- {
1192
- "name": "vaultId",
1193
- "type": "uint256"
1194
- },
1195
- {
1196
- "name": "asset",
1197
- "type": "address"
1198
- },
1199
- {
1200
- "name": "amount",
1201
- "type": "uint256"
1202
- }
1203
- ]
1204
- }
1205
- ],
1206
- "outputs": []
1207
- },
1208
- {
1209
- "stateMutability": "nonpayable",
1210
- "type": "function",
1211
- "name": "repayAndWithdraw",
1212
- "inputs": [
1213
- {
1214
- "name": "_agentWrapper",
1215
- "type": "address"
1216
- },
1217
- {
1218
- "name": "_userWallet",
1219
- "type": "address"
1220
- },
1221
- {
1222
- "name": "_debtLegoId",
1223
- "type": "uint256"
1224
- },
1225
- {
1226
- "name": "_deleverageAssets",
1227
- "type": "tuple[]",
1228
- "components": [
1229
- {
1230
- "name": "vaultId",
1231
- "type": "uint256"
1232
- },
1233
- {
1234
- "name": "asset",
1235
- "type": "address"
1236
- },
1237
- {
1238
- "name": "targetRepayAmount",
1239
- "type": "uint256"
1240
- }
1241
- ]
1242
- },
1243
- {
1244
- "name": "_yieldPosition",
1245
- "type": "tuple",
1246
- "components": [
1247
- {
1248
- "name": "legoId",
1249
- "type": "uint256"
1250
- },
1251
- {
1252
- "name": "vaultToken",
1253
- "type": "address"
1254
- },
1255
- {
1256
- "name": "vaultTokenAmount",
1257
- "type": "uint256"
1258
- }
1259
- ]
1260
- },
1261
- {
1262
- "name": "_swapInstructions",
1263
- "type": "tuple[]",
1264
- "components": [
1265
- {
1266
- "name": "legoId",
1267
- "type": "uint256"
1268
- },
1269
- {
1270
- "name": "amountIn",
1271
- "type": "uint256"
1272
- },
1273
- {
1274
- "name": "minAmountOut",
1275
- "type": "uint256"
1276
- },
1277
- {
1278
- "name": "tokenPath",
1279
- "type": "address[]"
1280
- },
1281
- {
1282
- "name": "poolPath",
1283
- "type": "address[]"
1284
- }
1285
- ]
1286
- },
1287
- {
1288
- "name": "_repayAsset",
1289
- "type": "address"
1290
- },
1291
- {
1292
- "name": "_repayAmount",
1293
- "type": "uint256"
1294
- },
1295
- {
1296
- "name": "_removeCollateralAssets",
1297
- "type": "tuple[]",
1298
- "components": [
1299
- {
1300
- "name": "vaultId",
1301
- "type": "uint256"
1302
- },
1303
- {
1304
- "name": "asset",
1305
- "type": "address"
1306
- },
1307
- {
1308
- "name": "amount",
1309
- "type": "uint256"
1310
- }
1311
- ]
1312
- },
1313
- {
1314
- "name": "_sig",
1315
- "type": "tuple",
1316
- "components": [
1317
- {
1318
- "name": "signature",
1319
- "type": "bytes"
1320
- },
1321
- {
1322
- "name": "nonce",
1323
- "type": "uint256"
1324
- },
1325
- {
1326
- "name": "expiration",
1327
- "type": "uint256"
1328
- }
1329
- ]
1330
- }
1331
- ],
1332
- "outputs": []
1333
- },
1334
- {
1335
- "stateMutability": "nonpayable",
1336
- "type": "function",
1337
- "name": "rebalanceYieldPositionsWithSwap",
1338
- "inputs": [
1339
- {
1340
- "name": "_agentWrapper",
1341
- "type": "address"
1342
- },
1343
- {
1344
- "name": "_userWallet",
1345
- "type": "address"
1346
- }
1347
- ],
1348
- "outputs": []
1349
- },
1350
- {
1351
- "stateMutability": "nonpayable",
1352
- "type": "function",
1353
- "name": "rebalanceYieldPositionsWithSwap",
1354
- "inputs": [
1355
- {
1356
- "name": "_agentWrapper",
1357
- "type": "address"
1358
- },
1359
- {
1360
- "name": "_userWallet",
1361
- "type": "address"
1362
- },
1363
- {
1364
- "name": "_withdrawFrom",
1365
- "type": "tuple[]",
1366
- "components": [
1367
- {
1368
- "name": "legoId",
1369
- "type": "uint256"
1370
- },
1371
- {
1372
- "name": "vaultToken",
1373
- "type": "address"
1374
- },
1375
- {
1376
- "name": "vaultTokenAmount",
1377
- "type": "uint256"
1378
- }
1379
- ]
1380
- }
1381
- ],
1382
- "outputs": []
1383
- },
1384
- {
1385
- "stateMutability": "nonpayable",
1386
- "type": "function",
1387
- "name": "rebalanceYieldPositionsWithSwap",
1388
- "inputs": [
1389
- {
1390
- "name": "_agentWrapper",
1391
- "type": "address"
1392
- },
1393
- {
1394
- "name": "_userWallet",
1395
- "type": "address"
1396
- },
1397
- {
1398
- "name": "_withdrawFrom",
1399
- "type": "tuple[]",
1400
- "components": [
1401
- {
1402
- "name": "legoId",
1403
- "type": "uint256"
1404
- },
1405
- {
1406
- "name": "vaultToken",
1407
- "type": "address"
1408
- },
1409
- {
1410
- "name": "vaultTokenAmount",
1411
- "type": "uint256"
1412
- }
1413
- ]
1414
- },
1415
- {
1416
- "name": "_swapInstructions",
1417
- "type": "tuple[]",
1418
- "components": [
1419
- {
1420
- "name": "legoId",
1421
- "type": "uint256"
1422
- },
1423
- {
1424
- "name": "amountIn",
1425
- "type": "uint256"
1426
- },
1427
- {
1428
- "name": "minAmountOut",
1429
- "type": "uint256"
1430
- },
1431
- {
1432
- "name": "tokenPath",
1433
- "type": "address[]"
1434
- },
1435
- {
1436
- "name": "poolPath",
1437
- "type": "address[]"
1438
- }
1439
- ]
1440
- }
1441
- ],
1442
- "outputs": []
1443
- },
1444
- {
1445
- "stateMutability": "nonpayable",
1446
- "type": "function",
1447
- "name": "rebalanceYieldPositionsWithSwap",
1448
- "inputs": [
1449
- {
1450
- "name": "_agentWrapper",
1451
- "type": "address"
1452
- },
1453
- {
1454
- "name": "_userWallet",
1455
- "type": "address"
1456
- },
1457
- {
1458
- "name": "_withdrawFrom",
1459
- "type": "tuple[]",
1460
- "components": [
1461
- {
1462
- "name": "legoId",
1463
- "type": "uint256"
1464
- },
1465
- {
1466
- "name": "vaultToken",
1467
- "type": "address"
1468
- },
1469
- {
1470
- "name": "vaultTokenAmount",
1471
- "type": "uint256"
1472
- }
1473
- ]
1474
- },
1475
- {
1476
- "name": "_swapInstructions",
1477
- "type": "tuple[]",
1478
- "components": [
1479
- {
1480
- "name": "legoId",
1481
- "type": "uint256"
1482
- },
1483
- {
1484
- "name": "amountIn",
1485
- "type": "uint256"
1486
- },
1487
- {
1488
- "name": "minAmountOut",
1489
- "type": "uint256"
1490
- },
1491
- {
1492
- "name": "tokenPath",
1493
- "type": "address[]"
1494
- },
1495
- {
1496
- "name": "poolPath",
1497
- "type": "address[]"
1498
- }
1499
- ]
1500
- },
1501
- {
1502
- "name": "_depositTo",
1503
- "type": "tuple[]",
1504
- "components": [
1505
- {
1506
- "name": "legoId",
1507
- "type": "uint256"
1508
- },
1509
- {
1510
- "name": "asset",
1511
- "type": "address"
1512
- },
1513
- {
1514
- "name": "amount",
1515
- "type": "uint256"
1516
- },
1517
- {
1518
- "name": "vaultAddr",
1519
- "type": "address"
1520
- }
1521
- ]
1522
- }
1523
- ],
1524
- "outputs": []
1525
- },
1526
- {
1527
- "stateMutability": "nonpayable",
1528
- "type": "function",
1529
- "name": "rebalanceYieldPositionsWithSwap",
1530
- "inputs": [
1531
- {
1532
- "name": "_agentWrapper",
1533
- "type": "address"
1534
- },
1535
- {
1536
- "name": "_userWallet",
1537
- "type": "address"
1538
- },
1539
- {
1540
- "name": "_withdrawFrom",
1541
- "type": "tuple[]",
1542
- "components": [
1543
- {
1544
- "name": "legoId",
1545
- "type": "uint256"
1546
- },
1547
- {
1548
- "name": "vaultToken",
1549
- "type": "address"
1550
- },
1551
- {
1552
- "name": "vaultTokenAmount",
1553
- "type": "uint256"
1554
- }
1555
- ]
1556
- },
1557
- {
1558
- "name": "_swapInstructions",
1559
- "type": "tuple[]",
1560
- "components": [
1561
- {
1562
- "name": "legoId",
1563
- "type": "uint256"
1564
- },
1565
- {
1566
- "name": "amountIn",
1567
- "type": "uint256"
1568
- },
1569
- {
1570
- "name": "minAmountOut",
1571
- "type": "uint256"
1572
- },
1573
- {
1574
- "name": "tokenPath",
1575
- "type": "address[]"
1576
- },
1577
- {
1578
- "name": "poolPath",
1579
- "type": "address[]"
1580
- }
1581
- ]
1582
- },
1583
- {
1584
- "name": "_depositTo",
1585
- "type": "tuple[]",
1586
- "components": [
1587
- {
1588
- "name": "legoId",
1589
- "type": "uint256"
1590
- },
1591
- {
1592
- "name": "asset",
1593
- "type": "address"
1594
- },
1595
- {
1596
- "name": "amount",
1597
- "type": "uint256"
1598
- },
1599
- {
1600
- "name": "vaultAddr",
1601
- "type": "address"
1602
- }
1603
- ]
1604
- },
1605
- {
1606
- "name": "_transferTo",
1607
- "type": "tuple[]",
1608
- "components": [
1609
- {
1610
- "name": "asset",
1611
- "type": "address"
1612
- },
1613
- {
1614
- "name": "amount",
1615
- "type": "uint256"
1616
- },
1617
- {
1618
- "name": "recipient",
1619
- "type": "address"
1620
- }
1621
- ]
1622
- }
1623
- ],
1624
- "outputs": []
1625
- },
1626
- {
1627
- "stateMutability": "nonpayable",
1628
- "type": "function",
1629
- "name": "rebalanceYieldPositionsWithSwap",
1630
- "inputs": [
1631
- {
1632
- "name": "_agentWrapper",
1633
- "type": "address"
1634
- },
1635
- {
1636
- "name": "_userWallet",
1637
- "type": "address"
1638
- },
1639
- {
1640
- "name": "_withdrawFrom",
1641
- "type": "tuple[]",
1642
- "components": [
1643
- {
1644
- "name": "legoId",
1645
- "type": "uint256"
1646
- },
1647
- {
1648
- "name": "vaultToken",
1649
- "type": "address"
1650
- },
1651
- {
1652
- "name": "vaultTokenAmount",
1653
- "type": "uint256"
1654
- }
1655
- ]
1656
- },
1657
- {
1658
- "name": "_swapInstructions",
1659
- "type": "tuple[]",
1660
- "components": [
1661
- {
1662
- "name": "legoId",
1663
- "type": "uint256"
1664
- },
1665
- {
1666
- "name": "amountIn",
1667
- "type": "uint256"
1668
- },
1669
- {
1670
- "name": "minAmountOut",
1671
- "type": "uint256"
1672
- },
1673
- {
1674
- "name": "tokenPath",
1675
- "type": "address[]"
1676
- },
1677
- {
1678
- "name": "poolPath",
1679
- "type": "address[]"
1680
- }
1681
- ]
1682
- },
1683
- {
1684
- "name": "_depositTo",
1685
- "type": "tuple[]",
1686
- "components": [
1687
- {
1688
- "name": "legoId",
1689
- "type": "uint256"
1690
- },
1691
- {
1692
- "name": "asset",
1693
- "type": "address"
1694
- },
1695
- {
1696
- "name": "amount",
1697
- "type": "uint256"
1698
- },
1699
- {
1700
- "name": "vaultAddr",
1701
- "type": "address"
1702
- }
1703
- ]
1704
- },
1705
- {
1706
- "name": "_transferTo",
1707
- "type": "tuple[]",
1708
- "components": [
1709
- {
1710
- "name": "asset",
1711
- "type": "address"
1712
- },
1713
- {
1714
- "name": "amount",
1715
- "type": "uint256"
1716
- },
1717
- {
1718
- "name": "recipient",
1719
- "type": "address"
1720
- }
1721
- ]
1722
- },
1723
- {
1724
- "name": "_sig",
1725
- "type": "tuple",
1726
- "components": [
1727
- {
1728
- "name": "signature",
1729
- "type": "bytes"
1730
- },
1731
- {
1732
- "name": "nonce",
1733
- "type": "uint256"
1734
- },
1735
- {
1736
- "name": "expiration",
1737
- "type": "uint256"
1738
- }
1739
- ]
1740
- }
1741
- ],
1742
- "outputs": []
1743
- },
1744
- {
1745
- "stateMutability": "nonpayable",
1746
- "type": "function",
1747
- "name": "claimIncentivesAndSwap",
1748
- "inputs": [
1749
- {
1750
- "name": "_agentWrapper",
1751
- "type": "address"
1752
- },
1753
- {
1754
- "name": "_userWallet",
1755
- "type": "address"
1756
- }
1757
- ],
1758
- "outputs": []
1759
- },
1760
- {
1761
- "stateMutability": "nonpayable",
1762
- "type": "function",
1763
- "name": "claimIncentivesAndSwap",
1764
- "inputs": [
1765
- {
1766
- "name": "_agentWrapper",
1767
- "type": "address"
1768
- },
1769
- {
1770
- "name": "_userWallet",
1771
- "type": "address"
1772
- },
1773
- {
1774
- "name": "_rewardLegoId",
1775
- "type": "uint256"
1776
- }
1777
- ],
1778
- "outputs": []
1779
- },
1780
- {
1781
- "stateMutability": "nonpayable",
1782
- "type": "function",
1783
- "name": "claimIncentivesAndSwap",
1784
- "inputs": [
1785
- {
1786
- "name": "_agentWrapper",
1787
- "type": "address"
1788
- },
1789
- {
1790
- "name": "_userWallet",
1791
- "type": "address"
1792
- },
1793
- {
1794
- "name": "_rewardLegoId",
1795
- "type": "uint256"
1796
- },
1797
- {
1798
- "name": "_rewardToken",
1799
- "type": "address"
1800
- }
1801
- ],
1802
- "outputs": []
1803
- },
1804
- {
1805
- "stateMutability": "nonpayable",
1806
- "type": "function",
1807
- "name": "claimIncentivesAndSwap",
1808
- "inputs": [
1809
- {
1810
- "name": "_agentWrapper",
1811
- "type": "address"
1812
- },
1813
- {
1814
- "name": "_userWallet",
1815
- "type": "address"
1816
- },
1817
- {
1818
- "name": "_rewardLegoId",
1819
- "type": "uint256"
1820
- },
1821
- {
1822
- "name": "_rewardToken",
1823
- "type": "address"
1824
- },
1825
- {
1826
- "name": "_rewardAmount",
1827
- "type": "uint256"
1828
- }
1829
- ],
1830
- "outputs": []
1831
- },
1832
- {
1833
- "stateMutability": "nonpayable",
1834
- "type": "function",
1835
- "name": "claimIncentivesAndSwap",
1836
- "inputs": [
1837
- {
1838
- "name": "_agentWrapper",
1839
- "type": "address"
1840
- },
1841
- {
1842
- "name": "_userWallet",
1843
- "type": "address"
1844
- },
1845
- {
1846
- "name": "_rewardLegoId",
1847
- "type": "uint256"
1848
- },
1849
- {
1850
- "name": "_rewardToken",
1851
- "type": "address"
1852
- },
1853
- {
1854
- "name": "_rewardAmount",
1855
- "type": "uint256"
1856
- },
1857
- {
1858
- "name": "_rewardProofs",
1859
- "type": "bytes32[]"
1860
- }
1861
- ],
1862
- "outputs": []
1863
- },
1864
- {
1865
- "stateMutability": "nonpayable",
1866
- "type": "function",
1867
- "name": "claimIncentivesAndSwap",
1868
- "inputs": [
1869
- {
1870
- "name": "_agentWrapper",
1871
- "type": "address"
1872
- },
1873
- {
1874
- "name": "_userWallet",
1875
- "type": "address"
1876
- },
1877
- {
1878
- "name": "_rewardLegoId",
1879
- "type": "uint256"
1880
- },
1881
- {
1882
- "name": "_rewardToken",
1883
- "type": "address"
1884
- },
1885
- {
1886
- "name": "_rewardAmount",
1887
- "type": "uint256"
1888
- },
1889
- {
1890
- "name": "_rewardProofs",
1891
- "type": "bytes32[]"
1892
- },
1893
- {
1894
- "name": "_swapInstructions",
1895
- "type": "tuple[]",
1896
- "components": [
1897
- {
1898
- "name": "legoId",
1899
- "type": "uint256"
1900
- },
1901
- {
1902
- "name": "amountIn",
1903
- "type": "uint256"
1904
- },
1905
- {
1906
- "name": "minAmountOut",
1907
- "type": "uint256"
1908
- },
1909
- {
1910
- "name": "tokenPath",
1911
- "type": "address[]"
1912
- },
1913
- {
1914
- "name": "poolPath",
1915
- "type": "address[]"
1916
- }
1917
- ]
1918
- }
1919
- ],
1920
- "outputs": []
1921
- },
1922
- {
1923
- "stateMutability": "nonpayable",
1924
- "type": "function",
1925
- "name": "claimIncentivesAndSwap",
1926
- "inputs": [
1927
- {
1928
- "name": "_agentWrapper",
1929
- "type": "address"
1930
- },
1931
- {
1932
- "name": "_userWallet",
1933
- "type": "address"
1934
- },
1935
- {
1936
- "name": "_rewardLegoId",
1937
- "type": "uint256"
1938
- },
1939
- {
1940
- "name": "_rewardToken",
1941
- "type": "address"
1942
- },
1943
- {
1944
- "name": "_rewardAmount",
1945
- "type": "uint256"
1946
- },
1947
- {
1948
- "name": "_rewardProofs",
1949
- "type": "bytes32[]"
1950
- },
1951
- {
1952
- "name": "_swapInstructions",
1953
- "type": "tuple[]",
1954
- "components": [
1955
- {
1956
- "name": "legoId",
1957
- "type": "uint256"
1958
- },
1959
- {
1960
- "name": "amountIn",
1961
- "type": "uint256"
1962
- },
1963
- {
1964
- "name": "minAmountOut",
1965
- "type": "uint256"
1966
- },
1967
- {
1968
- "name": "tokenPath",
1969
- "type": "address[]"
1970
- },
1971
- {
1972
- "name": "poolPath",
1973
- "type": "address[]"
1974
- }
1975
- ]
1976
- },
1977
- {
1978
- "name": "_depositTo",
1979
- "type": "tuple[]",
1980
- "components": [
1981
- {
1982
- "name": "legoId",
1983
- "type": "uint256"
1984
- },
1985
- {
1986
- "name": "asset",
1987
- "type": "address"
1988
- },
1989
- {
1990
- "name": "amount",
1991
- "type": "uint256"
1992
- },
1993
- {
1994
- "name": "vaultAddr",
1995
- "type": "address"
1996
- }
1997
- ]
1998
- }
1999
- ],
2000
- "outputs": []
2001
- },
2002
- {
2003
- "stateMutability": "nonpayable",
2004
- "type": "function",
2005
- "name": "claimIncentivesAndSwap",
2006
- "inputs": [
2007
- {
2008
- "name": "_agentWrapper",
2009
- "type": "address"
2010
- },
2011
- {
2012
- "name": "_userWallet",
2013
- "type": "address"
2014
- },
2015
- {
2016
- "name": "_rewardLegoId",
2017
- "type": "uint256"
2018
- },
2019
- {
2020
- "name": "_rewardToken",
2021
- "type": "address"
2022
- },
2023
- {
2024
- "name": "_rewardAmount",
2025
- "type": "uint256"
2026
- },
2027
- {
2028
- "name": "_rewardProofs",
2029
- "type": "bytes32[]"
2030
- },
2031
- {
2032
- "name": "_swapInstructions",
2033
- "type": "tuple[]",
2034
- "components": [
2035
- {
2036
- "name": "legoId",
2037
- "type": "uint256"
2038
- },
2039
- {
2040
- "name": "amountIn",
2041
- "type": "uint256"
2042
- },
2043
- {
2044
- "name": "minAmountOut",
2045
- "type": "uint256"
2046
- },
2047
- {
2048
- "name": "tokenPath",
2049
- "type": "address[]"
2050
- },
2051
- {
2052
- "name": "poolPath",
2053
- "type": "address[]"
2054
- }
2055
- ]
2056
- },
2057
- {
2058
- "name": "_depositTo",
2059
- "type": "tuple[]",
2060
- "components": [
2061
- {
2062
- "name": "legoId",
2063
- "type": "uint256"
2064
- },
2065
- {
2066
- "name": "asset",
2067
- "type": "address"
2068
- },
2069
- {
2070
- "name": "amount",
2071
- "type": "uint256"
2072
- },
2073
- {
2074
- "name": "vaultAddr",
2075
- "type": "address"
2076
- }
2077
- ]
2078
- },
2079
- {
2080
- "name": "_debtLegoId",
2081
- "type": "uint256"
2082
- }
2083
- ],
2084
- "outputs": []
2085
- },
2086
- {
2087
- "stateMutability": "nonpayable",
2088
- "type": "function",
2089
- "name": "claimIncentivesAndSwap",
2090
- "inputs": [
2091
- {
2092
- "name": "_agentWrapper",
2093
- "type": "address"
2094
- },
2095
- {
2096
- "name": "_userWallet",
2097
- "type": "address"
2098
- },
2099
- {
2100
- "name": "_rewardLegoId",
2101
- "type": "uint256"
2102
- },
2103
- {
2104
- "name": "_rewardToken",
2105
- "type": "address"
2106
- },
2107
- {
2108
- "name": "_rewardAmount",
2109
- "type": "uint256"
2110
- },
2111
- {
2112
- "name": "_rewardProofs",
2113
- "type": "bytes32[]"
2114
- },
2115
- {
2116
- "name": "_swapInstructions",
2117
- "type": "tuple[]",
2118
- "components": [
2119
- {
2120
- "name": "legoId",
2121
- "type": "uint256"
2122
- },
2123
- {
2124
- "name": "amountIn",
2125
- "type": "uint256"
2126
- },
2127
- {
2128
- "name": "minAmountOut",
2129
- "type": "uint256"
2130
- },
2131
- {
2132
- "name": "tokenPath",
2133
- "type": "address[]"
2134
- },
2135
- {
2136
- "name": "poolPath",
2137
- "type": "address[]"
2138
- }
2139
- ]
2140
- },
2141
- {
2142
- "name": "_depositTo",
2143
- "type": "tuple[]",
2144
- "components": [
2145
- {
2146
- "name": "legoId",
2147
- "type": "uint256"
2148
- },
2149
- {
2150
- "name": "asset",
2151
- "type": "address"
2152
- },
2153
- {
2154
- "name": "amount",
2155
- "type": "uint256"
2156
- },
2157
- {
2158
- "name": "vaultAddr",
2159
- "type": "address"
2160
- }
2161
- ]
2162
- },
2163
- {
2164
- "name": "_debtLegoId",
2165
- "type": "uint256"
2166
- },
2167
- {
2168
- "name": "_addCollateralAssets",
2169
- "type": "tuple[]",
2170
- "components": [
2171
- {
2172
- "name": "vaultId",
2173
- "type": "uint256"
2174
- },
2175
- {
2176
- "name": "asset",
2177
- "type": "address"
2178
- },
2179
- {
2180
- "name": "amount",
2181
- "type": "uint256"
2182
- }
2183
- ]
2184
- }
2185
- ],
2186
- "outputs": []
2187
- },
2188
- {
2189
- "stateMutability": "nonpayable",
2190
- "type": "function",
2191
- "name": "claimIncentivesAndSwap",
2192
- "inputs": [
2193
- {
2194
- "name": "_agentWrapper",
2195
- "type": "address"
2196
- },
2197
- {
2198
- "name": "_userWallet",
2199
- "type": "address"
2200
- },
2201
- {
2202
- "name": "_rewardLegoId",
2203
- "type": "uint256"
2204
- },
2205
- {
2206
- "name": "_rewardToken",
2207
- "type": "address"
2208
- },
2209
- {
2210
- "name": "_rewardAmount",
2211
- "type": "uint256"
2212
- },
2213
- {
2214
- "name": "_rewardProofs",
2215
- "type": "bytes32[]"
2216
- },
2217
- {
2218
- "name": "_swapInstructions",
2219
- "type": "tuple[]",
2220
- "components": [
2221
- {
2222
- "name": "legoId",
2223
- "type": "uint256"
2224
- },
2225
- {
2226
- "name": "amountIn",
2227
- "type": "uint256"
2228
- },
2229
- {
2230
- "name": "minAmountOut",
2231
- "type": "uint256"
2232
- },
2233
- {
2234
- "name": "tokenPath",
2235
- "type": "address[]"
2236
- },
2237
- {
2238
- "name": "poolPath",
2239
- "type": "address[]"
2240
- }
2241
- ]
2242
- },
2243
- {
2244
- "name": "_depositTo",
2245
- "type": "tuple[]",
2246
- "components": [
2247
- {
2248
- "name": "legoId",
2249
- "type": "uint256"
2250
- },
2251
- {
2252
- "name": "asset",
2253
- "type": "address"
2254
- },
2255
- {
2256
- "name": "amount",
2257
- "type": "uint256"
2258
- },
2259
- {
2260
- "name": "vaultAddr",
2261
- "type": "address"
2262
- }
2263
- ]
2264
- },
2265
- {
2266
- "name": "_debtLegoId",
2267
- "type": "uint256"
2268
- },
2269
- {
2270
- "name": "_addCollateralAssets",
2271
- "type": "tuple[]",
2272
- "components": [
2273
- {
2274
- "name": "vaultId",
2275
- "type": "uint256"
2276
- },
2277
- {
2278
- "name": "asset",
2279
- "type": "address"
2280
- },
2281
- {
2282
- "name": "amount",
2283
- "type": "uint256"
2284
- }
2285
- ]
2286
- },
2287
- {
2288
- "name": "_sig",
2289
- "type": "tuple",
2290
- "components": [
2291
- {
2292
- "name": "signature",
2293
- "type": "bytes"
2294
- },
2295
- {
2296
- "name": "nonce",
2297
- "type": "uint256"
2298
- },
2299
- {
2300
- "name": "expiration",
2301
- "type": "uint256"
2302
- }
2303
- ]
2304
- }
2305
- ],
2306
- "outputs": []
2307
- },
2308
- {
2309
- "stateMutability": "nonpayable",
2310
- "type": "function",
2311
- "name": "incrementNonce",
2312
- "inputs": [
2313
- {
2314
- "name": "_userWallet",
2315
- "type": "address"
2316
- }
2317
- ],
2318
- "outputs": []
2319
- },
2320
- {
2321
- "stateMutability": "view",
2322
- "type": "function",
2323
- "name": "getNonce",
2324
- "inputs": [
2325
- {
2326
- "name": "_userWallet",
2327
- "type": "address"
2328
- }
2329
- ],
2330
- "outputs": [
2331
- {
2332
- "name": "",
2333
- "type": "uint256"
2334
- }
2335
- ]
2336
- },
2337
- {
2338
- "stateMutability": "view",
2339
- "type": "function",
2340
- "name": "currentNonce",
2341
- "inputs": [
2342
- {
2343
- "name": "arg0",
2344
- "type": "address"
2345
- }
2346
- ],
2347
- "outputs": [
2348
- {
2349
- "name": "",
2350
- "type": "uint256"
2351
- }
2352
- ]
2353
- },
2354
- {
2355
- "stateMutability": "view",
2356
- "type": "function",
2357
- "name": "UNDY_HQ",
2358
- "inputs": [],
2359
- "outputs": [
2360
- {
2361
- "name": "",
2362
- "type": "address"
2363
- }
2364
- ]
2365
- },
2366
- {
2367
- "stateMutability": "view",
2368
- "type": "function",
2369
- "name": "RIPE_GREEN_TOKEN",
2370
- "inputs": [],
2371
- "outputs": [
2372
- {
2373
- "name": "",
2374
- "type": "address"
2375
- }
2376
- ]
2377
- },
2378
- {
2379
- "stateMutability": "view",
2380
- "type": "function",
2381
- "name": "RIPE_SAVINGS_GREEN",
2382
- "inputs": [],
2383
- "outputs": [
2384
- {
2385
- "name": "",
2386
- "type": "address"
2387
- }
2388
- ]
2389
- },
2390
- {
2391
- "stateMutability": "nonpayable",
2392
- "type": "constructor",
2393
- "inputs": [
2394
- {
2395
- "name": "_undyHq",
2396
- "type": "address"
2397
- },
2398
- {
2399
- "name": "_owner",
2400
- "type": "address"
2401
- },
2402
- {
2403
- "name": "_minTimeLock",
2404
- "type": "uint256"
2405
- },
2406
- {
2407
- "name": "_maxTimeLock",
2408
- "type": "uint256"
2409
- },
2410
- {
2411
- "name": "_greenToken",
2412
- "type": "address"
2413
- },
2414
- {
2415
- "name": "_savingsGreen",
2416
- "type": "address"
2417
- }
2418
- ],
2419
- "outputs": []
2420
- }
2421
- ];
2422
- export const deployAddress = '0xF02Bc5c9a1A57015C09c4e1B89A273a2849874D3';
2423
- function getRequest(method, args, contractAddressOrOptions) {
2424
- const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
2425
- const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
2426
- const call = {
2427
- contractName: 'AgentSenderSpecial',
2428
- method,
2429
- args,
2430
- address,
2431
- deployAddress,
2432
- defaultValue,
2433
- getAbi: () => abi,
2434
- with: (options) => {
2435
- call.address = options.contractAddress;
2436
- call.defaultValue = options.defaultValue;
2437
- return call;
2438
- },
2439
- defaultTo: (defaultValue) => {
2440
- call.defaultValue = defaultValue;
2441
- return call;
2442
- },
2443
- at: (address) => {
2444
- call.address = address;
2445
- return call;
2446
- },
2447
- };
2448
- return call;
2449
- }
2450
- export const call = {
2451
- hasPendingOwnerChange: (...args) => getRequest('hasPendingOwnerChange', args),
2452
- owner: (...args) => getRequest('owner', args),
2453
- ownershipTimeLock: (...args) => getRequest('ownershipTimeLock', args),
2454
- pendingOwner: (...args) => getRequest('pendingOwner', args),
2455
- MIN_OWNERSHIP_TIMELOCK: (...args) => getRequest('MIN_OWNERSHIP_TIMELOCK', args),
2456
- MAX_OWNERSHIP_TIMELOCK: (...args) => getRequest('MAX_OWNERSHIP_TIMELOCK', args),
2457
- getNonce: (...args) => getRequest('getNonce', args),
2458
- currentNonce: (...args) => getRequest('currentNonce', args),
2459
- UNDY_HQ: (...args) => getRequest('UNDY_HQ', args),
2460
- RIPE_GREEN_TOKEN: (...args) => getRequest('RIPE_GREEN_TOKEN', args),
2461
- RIPE_SAVINGS_GREEN: (...args) => getRequest('RIPE_SAVINGS_GREEN', args),
2462
- };
2463
- function getMutation(functionName) {
2464
- return {
2465
- contractName: 'AgentSenderSpecial',
2466
- functionName,
2467
- deployAddress,
2468
- argsType: undefined,
2469
- getAbi: () => abi,
2470
- };
2471
- }
2472
- export const mutation = {
2473
- changeOwnership: getMutation('changeOwnership'),
2474
- confirmOwnershipChange: getMutation('confirmOwnershipChange'),
2475
- cancelOwnershipChange: getMutation('cancelOwnershipChange'),
2476
- setOwnershipTimeLock: getMutation('setOwnershipTimeLock'),
2477
- addCollateralAndBorrow: getMutation('addCollateralAndBorrow'),
2478
- repayAndWithdraw: getMutation('repayAndWithdraw'),
2479
- rebalanceYieldPositionsWithSwap: getMutation('rebalanceYieldPositionsWithSwap'),
2480
- claimIncentivesAndSwap: getMutation('claimIncentivesAndSwap'),
2481
- incrementNonce: getMutation('incrementNonce'),
2482
- };
2483
- export function parseEvents(eventName, events) {
2484
- return events.map((event) => {
2485
- return {
2486
- event,
2487
- parsed: parseEventLogs({
2488
- abi,
2489
- eventName,
2490
- logs: [event],
2491
- }),
2492
- };
2493
- });
2494
- }
2495
- export function getEventTopic(eventName) {
2496
- return encodeEventTopics({ abi, eventName })[0];
2497
- }
2498
- export function toSdk(deployAddress, publicClient, walletClient, addressResolver) {
2499
- return {
2500
- deployAddress,
2501
- abi,
2502
- events: {
2503
- NonceIncremented: { topic: getEventTopic('NonceIncremented'), parse: (events) => parseEvents('NonceIncremented', events) },
2504
- OwnershipChangeInitiated: { topic: getEventTopic('OwnershipChangeInitiated'), parse: (events) => parseEvents('OwnershipChangeInitiated', events) },
2505
- OwnershipChangeConfirmed: { topic: getEventTopic('OwnershipChangeConfirmed'), parse: (events) => parseEvents('OwnershipChangeConfirmed', events) },
2506
- OwnershipChangeCancelled: { topic: getEventTopic('OwnershipChangeCancelled'), parse: (events) => parseEvents('OwnershipChangeCancelled', events) },
2507
- OwnershipTimeLockSet: { topic: getEventTopic('OwnershipTimeLockSet'), parse: (events) => parseEvents('OwnershipTimeLockSet', events) },
2508
- },
2509
- // Queries
2510
- hasPendingOwnerChange: (...args) => singleQuery(publicClient, call.hasPendingOwnerChange(...args).at(deployAddress), {}, addressResolver),
2511
- owner: (...args) => singleQuery(publicClient, call.owner(...args).at(deployAddress), {}, addressResolver),
2512
- ownershipTimeLock: (...args) => singleQuery(publicClient, call.ownershipTimeLock(...args).at(deployAddress), {}, addressResolver),
2513
- pendingOwner: (...args) => singleQuery(publicClient, call.pendingOwner(...args).at(deployAddress), {}, addressResolver),
2514
- MIN_OWNERSHIP_TIMELOCK: (...args) => singleQuery(publicClient, call.MIN_OWNERSHIP_TIMELOCK(...args).at(deployAddress), {}, addressResolver),
2515
- MAX_OWNERSHIP_TIMELOCK: (...args) => singleQuery(publicClient, call.MAX_OWNERSHIP_TIMELOCK(...args).at(deployAddress), {}, addressResolver),
2516
- getNonce: (...args) => singleQuery(publicClient, call.getNonce(...args).at(deployAddress), {}, addressResolver),
2517
- currentNonce: (...args) => singleQuery(publicClient, call.currentNonce(...args).at(deployAddress), {}, addressResolver),
2518
- UNDY_HQ: (...args) => singleQuery(publicClient, call.UNDY_HQ(...args).at(deployAddress), {}, addressResolver),
2519
- RIPE_GREEN_TOKEN: (...args) => singleQuery(publicClient, call.RIPE_GREEN_TOKEN(...args).at(deployAddress), {}, addressResolver),
2520
- RIPE_SAVINGS_GREEN: (...args) => singleQuery(publicClient, call.RIPE_SAVINGS_GREEN(...args).at(deployAddress), {}, addressResolver),
2521
- // Mutations
2522
- changeOwnership: (...args) => mutate(walletClient, mutation.changeOwnership, { address: deployAddress, addressResolver })(...args),
2523
- confirmOwnershipChange: (...args) => mutate(walletClient, mutation.confirmOwnershipChange, { address: deployAddress, addressResolver })(...args),
2524
- cancelOwnershipChange: (...args) => mutate(walletClient, mutation.cancelOwnershipChange, { address: deployAddress, addressResolver })(...args),
2525
- setOwnershipTimeLock: (...args) => mutate(walletClient, mutation.setOwnershipTimeLock, { address: deployAddress, addressResolver })(...args),
2526
- addCollateralAndBorrow: (...args) => mutate(walletClient, mutation.addCollateralAndBorrow, { address: deployAddress, addressResolver })(...args),
2527
- repayAndWithdraw: (...args) => mutate(walletClient, mutation.repayAndWithdraw, { address: deployAddress, addressResolver })(...args),
2528
- rebalanceYieldPositionsWithSwap: (...args) => mutate(walletClient, mutation.rebalanceYieldPositionsWithSwap, { address: deployAddress, addressResolver })(...args),
2529
- claimIncentivesAndSwap: (...args) => mutate(walletClient, mutation.claimIncentivesAndSwap, { address: deployAddress, addressResolver })(...args),
2530
- incrementNonce: (...args) => mutate(walletClient, mutation.incrementNonce, { address: deployAddress, addressResolver })(...args),
2531
- };
2532
- }