@usdu-core/usdu-core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +12 -0
- package/.env.example +6 -0
- package/.prettierrc.json +7 -0
- package/LICENSE +674 -0
- package/README.md +244 -0
- package/contracts/curve/CurveAdapterV1.sol +310 -0
- package/contracts/curve/CurveAdapterV1_1.sol +198 -0
- package/contracts/curve/helpers/ICurveStableSwapNG.json +566 -0
- package/contracts/curve/helpers/ICurveStableSwapNG.sol +177 -0
- package/contracts/deploy/VaultDeployer.sol +110 -0
- package/contracts/morpho/MorphoAdapterV1.sol +255 -0
- package/contracts/morpho/MorphoAdapterV1_1.sol +137 -0
- package/contracts/morpho/MorphoAdapterV1_2.sol +126 -0
- package/contracts/morpho/helpers/AggregatorV3Interface.sol +24 -0
- package/contracts/morpho/helpers/ChainlinkDataFeedLib.sol +36 -0
- package/contracts/morpho/helpers/ConstantsLib.sol +20 -0
- package/contracts/morpho/helpers/ErrorsLib.sol +17 -0
- package/contracts/morpho/helpers/IERC4626.sol +6 -0
- package/contracts/morpho/helpers/IMetaMorphoV1_1.sol +229 -0
- package/contracts/morpho/helpers/IMetaMorphoV1_1Factory.sol +32 -0
- package/contracts/morpho/helpers/IMorpho.sol +361 -0
- package/contracts/morpho/helpers/IMorphoCallbacks.sol +52 -0
- package/contracts/morpho/helpers/IMorphoChainlinkOracleV2.sol +39 -0
- package/contracts/morpho/helpers/IMorphoChainlinkOracleV2Factory.sol +56 -0
- package/contracts/morpho/helpers/IOracle.sol +15 -0
- package/contracts/morpho/helpers/MarketParamsLib.sol +21 -0
- package/contracts/morpho/helpers/MathLib.sol +45 -0
- package/contracts/morpho/helpers/Morpho.sol.bak +517 -0
- package/contracts/morpho/helpers/MorphoChainlinkOracleV2.sol +157 -0
- package/contracts/morpho/helpers/PendingLib.sol +47 -0
- package/contracts/morpho/helpers/SharesMathLib.sol +45 -0
- package/contracts/morpho/helpers/VaultLib.sol +18 -0
- package/contracts/reward/RewardDistributionV1.sol +110 -0
- package/contracts/reward/RewardRouterV0.sol +63 -0
- package/contracts/reward/Rewards.example.json +72 -0
- package/contracts/stablecoin/IStablecoin.sol +211 -0
- package/contracts/stablecoin/IStablecoinMetadata.sol +27 -0
- package/contracts/stablecoin/IStablecoinModifier.sol +52 -0
- package/contracts/stablecoin/Stablecoin.sol +376 -0
- package/contracts/stablecoin/libraries/ConstantsLib.sol +13 -0
- package/contracts/stablecoin/libraries/ErrorsLib.sol +45 -0
- package/contracts/stablecoin/libraries/EventsLib.sol +74 -0
- package/contracts/stablecoin/libraries/PendingLib.sol +38 -0
- package/contracts/vault/VaultAdapterRecoverV1.sol +29 -0
- package/contracts/vault/VaultAdapterV1.sol +126 -0
- package/dist/index.d.mts +16154 -0
- package/dist/index.d.ts +16154 -0
- package/dist/index.js +21134 -0
- package/dist/index.mjs +21061 -0
- package/docs/CoreVault: Integration of new Markets.md +197 -0
- package/docs/CoreVault: SupplyQueue.md +11 -0
- package/docs/Markets USDC Vault.md +35 -0
- package/docs/Markets USDU Vault.md +89 -0
- package/docs/Markets WETH Vault.md +35 -0
- package/docs/Overview.drawio +117 -0
- package/exports/abis/curve/CurveAdapterV1.ts +599 -0
- package/exports/abis/curve/CurveAdapterV1_1.ts +609 -0
- package/exports/abis/curve/CurveAdapterV1_2.ts +721 -0
- package/exports/abis/curve/helper/ICurveStableSwapNG.ts +1589 -0
- package/exports/abis/morpho/MorphoAdapterV1.ts +516 -0
- package/exports/abis/morpho/MorphoAdapterV1_1.ts +489 -0
- package/exports/abis/morpho/MorphoAdapterV1_2.ts +459 -0
- package/exports/abis/morpho/helper/AggregatorV3Interface.ts +113 -0
- package/exports/abis/morpho/helper/IMetaMorphoV1_1.ts +1483 -0
- package/exports/abis/morpho/helper/IMetaMorphoV1_1Base.ts +607 -0
- package/exports/abis/morpho/helper/IMetaMorphoV1_1StaticTyping.ts +696 -0
- package/exports/abis/morpho/helper/IMorpho.ts +1024 -0
- package/exports/abis/morpho/helper/IMorphoBase.ts +886 -0
- package/exports/abis/morpho/helper/IMorphoChainlinkOracleV2.ts +132 -0
- package/exports/abis/morpho/helper/IMorphoChainlinkOracleV2Factory.ts +109 -0
- package/exports/abis/morpho/helper/IMorphoFlashLoanCallback.ts +20 -0
- package/exports/abis/morpho/helper/IMorphoLiquidateCallback.ts +20 -0
- package/exports/abis/morpho/helper/IMorphoRepayCallback.ts +20 -0
- package/exports/abis/morpho/helper/IMorphoStaticTyping.ts +1003 -0
- package/exports/abis/morpho/helper/IMorphoSupplyCallback.ts +20 -0
- package/exports/abis/morpho/helper/IMorphoSupplyCollateralCallback.ts +20 -0
- package/exports/abis/morpho/helper/IMulticall.ts +21 -0
- package/exports/abis/morpho/helper/IOracle.ts +15 -0
- package/exports/abis/morpho/helper/IOwnable.ts +55 -0
- package/exports/abis/morpho/helper/MorphoChainlinkOracleV2.ts +188 -0
- package/exports/abis/openzeppelin/ERC20.ts +310 -0
- package/exports/abis/openzeppelin/ERC20Permit.ts +520 -0
- package/exports/abis/openzeppelin/IERC20.ts +185 -0
- package/exports/abis/openzeppelin/IERC20Metadata.ts +224 -0
- package/exports/abis/openzeppelin/IERC20Permit.ts +77 -0
- package/exports/abis/openzeppelin/IERC4626.ts +614 -0
- package/exports/abis/reward/RewardDistributionV1.ts +246 -0
- package/exports/abis/stablecoin/ErrorsLib.ts +114 -0
- package/exports/abis/stablecoin/EventsLib.ts +372 -0
- package/exports/abis/stablecoin/IStablecoin.ts +642 -0
- package/exports/abis/stablecoin/IStablecoinMetadata.ts +856 -0
- package/exports/abis/stablecoin/IStablecoinModifier.ts +15 -0
- package/exports/abis/stablecoin/Stablecoin.ts +1922 -0
- package/exports/abis/termmax/ITermMaxVault.ts +2335 -0
- package/exports/abis/vault/VaultAdapterRecoverV1.ts +490 -0
- package/exports/abis/vault/VaultAdapterV1.ts +459 -0
- package/exports/address.config.ts +113 -0
- package/exports/address.types.ts +130 -0
- package/exports/index.ts +61 -0
- package/hardhat.config.ts +231 -0
- package/helper/store.args.ts +17 -0
- package/helper/wallet.info.ts +3 -0
- package/helper/wallet.ts +41 -0
- package/install-macos.sh +46 -0
- package/package.json +73 -0
- package/tsconfig.json +15 -0
- package/tsup.config.ts +10 -0
|
@@ -0,0 +1,886 @@
|
|
|
1
|
+
export const IMorphoBase_ABI = [
|
|
2
|
+
{
|
|
3
|
+
inputs: [],
|
|
4
|
+
name: 'DOMAIN_SEPARATOR',
|
|
5
|
+
outputs: [
|
|
6
|
+
{
|
|
7
|
+
internalType: 'bytes32',
|
|
8
|
+
name: '',
|
|
9
|
+
type: 'bytes32',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
stateMutability: 'view',
|
|
13
|
+
type: 'function',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
inputs: [
|
|
17
|
+
{
|
|
18
|
+
components: [
|
|
19
|
+
{
|
|
20
|
+
internalType: 'address',
|
|
21
|
+
name: 'loanToken',
|
|
22
|
+
type: 'address',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
internalType: 'address',
|
|
26
|
+
name: 'collateralToken',
|
|
27
|
+
type: 'address',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
internalType: 'address',
|
|
31
|
+
name: 'oracle',
|
|
32
|
+
type: 'address',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
internalType: 'address',
|
|
36
|
+
name: 'irm',
|
|
37
|
+
type: 'address',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
internalType: 'uint256',
|
|
41
|
+
name: 'lltv',
|
|
42
|
+
type: 'uint256',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
internalType: 'struct MarketParams',
|
|
46
|
+
name: 'marketParams',
|
|
47
|
+
type: 'tuple',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
name: 'accrueInterest',
|
|
51
|
+
outputs: [],
|
|
52
|
+
stateMutability: 'nonpayable',
|
|
53
|
+
type: 'function',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
inputs: [
|
|
57
|
+
{
|
|
58
|
+
components: [
|
|
59
|
+
{
|
|
60
|
+
internalType: 'address',
|
|
61
|
+
name: 'loanToken',
|
|
62
|
+
type: 'address',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
internalType: 'address',
|
|
66
|
+
name: 'collateralToken',
|
|
67
|
+
type: 'address',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
internalType: 'address',
|
|
71
|
+
name: 'oracle',
|
|
72
|
+
type: 'address',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
internalType: 'address',
|
|
76
|
+
name: 'irm',
|
|
77
|
+
type: 'address',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
internalType: 'uint256',
|
|
81
|
+
name: 'lltv',
|
|
82
|
+
type: 'uint256',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
internalType: 'struct MarketParams',
|
|
86
|
+
name: 'marketParams',
|
|
87
|
+
type: 'tuple',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
internalType: 'uint256',
|
|
91
|
+
name: 'assets',
|
|
92
|
+
type: 'uint256',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
internalType: 'uint256',
|
|
96
|
+
name: 'shares',
|
|
97
|
+
type: 'uint256',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
internalType: 'address',
|
|
101
|
+
name: 'onBehalf',
|
|
102
|
+
type: 'address',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
internalType: 'address',
|
|
106
|
+
name: 'receiver',
|
|
107
|
+
type: 'address',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
name: 'borrow',
|
|
111
|
+
outputs: [
|
|
112
|
+
{
|
|
113
|
+
internalType: 'uint256',
|
|
114
|
+
name: 'assetsBorrowed',
|
|
115
|
+
type: 'uint256',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
internalType: 'uint256',
|
|
119
|
+
name: 'sharesBorrowed',
|
|
120
|
+
type: 'uint256',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
stateMutability: 'nonpayable',
|
|
124
|
+
type: 'function',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
inputs: [
|
|
128
|
+
{
|
|
129
|
+
components: [
|
|
130
|
+
{
|
|
131
|
+
internalType: 'address',
|
|
132
|
+
name: 'loanToken',
|
|
133
|
+
type: 'address',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
internalType: 'address',
|
|
137
|
+
name: 'collateralToken',
|
|
138
|
+
type: 'address',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
internalType: 'address',
|
|
142
|
+
name: 'oracle',
|
|
143
|
+
type: 'address',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
internalType: 'address',
|
|
147
|
+
name: 'irm',
|
|
148
|
+
type: 'address',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
internalType: 'uint256',
|
|
152
|
+
name: 'lltv',
|
|
153
|
+
type: 'uint256',
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
internalType: 'struct MarketParams',
|
|
157
|
+
name: 'marketParams',
|
|
158
|
+
type: 'tuple',
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
name: 'createMarket',
|
|
162
|
+
outputs: [],
|
|
163
|
+
stateMutability: 'nonpayable',
|
|
164
|
+
type: 'function',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
inputs: [
|
|
168
|
+
{
|
|
169
|
+
internalType: 'address',
|
|
170
|
+
name: 'irm',
|
|
171
|
+
type: 'address',
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
name: 'enableIrm',
|
|
175
|
+
outputs: [],
|
|
176
|
+
stateMutability: 'nonpayable',
|
|
177
|
+
type: 'function',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
inputs: [
|
|
181
|
+
{
|
|
182
|
+
internalType: 'uint256',
|
|
183
|
+
name: 'lltv',
|
|
184
|
+
type: 'uint256',
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
name: 'enableLltv',
|
|
188
|
+
outputs: [],
|
|
189
|
+
stateMutability: 'nonpayable',
|
|
190
|
+
type: 'function',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
inputs: [
|
|
194
|
+
{
|
|
195
|
+
internalType: 'bytes32[]',
|
|
196
|
+
name: 'slots',
|
|
197
|
+
type: 'bytes32[]',
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
name: 'extSloads',
|
|
201
|
+
outputs: [
|
|
202
|
+
{
|
|
203
|
+
internalType: 'bytes32[]',
|
|
204
|
+
name: '',
|
|
205
|
+
type: 'bytes32[]',
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
stateMutability: 'view',
|
|
209
|
+
type: 'function',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
inputs: [],
|
|
213
|
+
name: 'feeRecipient',
|
|
214
|
+
outputs: [
|
|
215
|
+
{
|
|
216
|
+
internalType: 'address',
|
|
217
|
+
name: '',
|
|
218
|
+
type: 'address',
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
stateMutability: 'view',
|
|
222
|
+
type: 'function',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
inputs: [
|
|
226
|
+
{
|
|
227
|
+
internalType: 'address',
|
|
228
|
+
name: 'token',
|
|
229
|
+
type: 'address',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
internalType: 'uint256',
|
|
233
|
+
name: 'assets',
|
|
234
|
+
type: 'uint256',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
internalType: 'bytes',
|
|
238
|
+
name: 'data',
|
|
239
|
+
type: 'bytes',
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
name: 'flashLoan',
|
|
243
|
+
outputs: [],
|
|
244
|
+
stateMutability: 'nonpayable',
|
|
245
|
+
type: 'function',
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
inputs: [
|
|
249
|
+
{
|
|
250
|
+
internalType: 'address',
|
|
251
|
+
name: 'authorizer',
|
|
252
|
+
type: 'address',
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
internalType: 'address',
|
|
256
|
+
name: 'authorized',
|
|
257
|
+
type: 'address',
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
name: 'isAuthorized',
|
|
261
|
+
outputs: [
|
|
262
|
+
{
|
|
263
|
+
internalType: 'bool',
|
|
264
|
+
name: '',
|
|
265
|
+
type: 'bool',
|
|
266
|
+
},
|
|
267
|
+
],
|
|
268
|
+
stateMutability: 'view',
|
|
269
|
+
type: 'function',
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
inputs: [
|
|
273
|
+
{
|
|
274
|
+
internalType: 'address',
|
|
275
|
+
name: 'irm',
|
|
276
|
+
type: 'address',
|
|
277
|
+
},
|
|
278
|
+
],
|
|
279
|
+
name: 'isIrmEnabled',
|
|
280
|
+
outputs: [
|
|
281
|
+
{
|
|
282
|
+
internalType: 'bool',
|
|
283
|
+
name: '',
|
|
284
|
+
type: 'bool',
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
stateMutability: 'view',
|
|
288
|
+
type: 'function',
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
inputs: [
|
|
292
|
+
{
|
|
293
|
+
internalType: 'uint256',
|
|
294
|
+
name: 'lltv',
|
|
295
|
+
type: 'uint256',
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
name: 'isLltvEnabled',
|
|
299
|
+
outputs: [
|
|
300
|
+
{
|
|
301
|
+
internalType: 'bool',
|
|
302
|
+
name: '',
|
|
303
|
+
type: 'bool',
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
stateMutability: 'view',
|
|
307
|
+
type: 'function',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
inputs: [
|
|
311
|
+
{
|
|
312
|
+
components: [
|
|
313
|
+
{
|
|
314
|
+
internalType: 'address',
|
|
315
|
+
name: 'loanToken',
|
|
316
|
+
type: 'address',
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
internalType: 'address',
|
|
320
|
+
name: 'collateralToken',
|
|
321
|
+
type: 'address',
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
internalType: 'address',
|
|
325
|
+
name: 'oracle',
|
|
326
|
+
type: 'address',
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
internalType: 'address',
|
|
330
|
+
name: 'irm',
|
|
331
|
+
type: 'address',
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
internalType: 'uint256',
|
|
335
|
+
name: 'lltv',
|
|
336
|
+
type: 'uint256',
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
internalType: 'struct MarketParams',
|
|
340
|
+
name: 'marketParams',
|
|
341
|
+
type: 'tuple',
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
internalType: 'address',
|
|
345
|
+
name: 'borrower',
|
|
346
|
+
type: 'address',
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
internalType: 'uint256',
|
|
350
|
+
name: 'seizedAssets',
|
|
351
|
+
type: 'uint256',
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
internalType: 'uint256',
|
|
355
|
+
name: 'repaidShares',
|
|
356
|
+
type: 'uint256',
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
internalType: 'bytes',
|
|
360
|
+
name: 'data',
|
|
361
|
+
type: 'bytes',
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
name: 'liquidate',
|
|
365
|
+
outputs: [
|
|
366
|
+
{
|
|
367
|
+
internalType: 'uint256',
|
|
368
|
+
name: '',
|
|
369
|
+
type: 'uint256',
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
internalType: 'uint256',
|
|
373
|
+
name: '',
|
|
374
|
+
type: 'uint256',
|
|
375
|
+
},
|
|
376
|
+
],
|
|
377
|
+
stateMutability: 'nonpayable',
|
|
378
|
+
type: 'function',
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
inputs: [
|
|
382
|
+
{
|
|
383
|
+
internalType: 'address',
|
|
384
|
+
name: 'authorizer',
|
|
385
|
+
type: 'address',
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
name: 'nonce',
|
|
389
|
+
outputs: [
|
|
390
|
+
{
|
|
391
|
+
internalType: 'uint256',
|
|
392
|
+
name: '',
|
|
393
|
+
type: 'uint256',
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
stateMutability: 'view',
|
|
397
|
+
type: 'function',
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
inputs: [],
|
|
401
|
+
name: 'owner',
|
|
402
|
+
outputs: [
|
|
403
|
+
{
|
|
404
|
+
internalType: 'address',
|
|
405
|
+
name: '',
|
|
406
|
+
type: 'address',
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
stateMutability: 'view',
|
|
410
|
+
type: 'function',
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
inputs: [
|
|
414
|
+
{
|
|
415
|
+
components: [
|
|
416
|
+
{
|
|
417
|
+
internalType: 'address',
|
|
418
|
+
name: 'loanToken',
|
|
419
|
+
type: 'address',
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
internalType: 'address',
|
|
423
|
+
name: 'collateralToken',
|
|
424
|
+
type: 'address',
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
internalType: 'address',
|
|
428
|
+
name: 'oracle',
|
|
429
|
+
type: 'address',
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
internalType: 'address',
|
|
433
|
+
name: 'irm',
|
|
434
|
+
type: 'address',
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
internalType: 'uint256',
|
|
438
|
+
name: 'lltv',
|
|
439
|
+
type: 'uint256',
|
|
440
|
+
},
|
|
441
|
+
],
|
|
442
|
+
internalType: 'struct MarketParams',
|
|
443
|
+
name: 'marketParams',
|
|
444
|
+
type: 'tuple',
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
internalType: 'uint256',
|
|
448
|
+
name: 'assets',
|
|
449
|
+
type: 'uint256',
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
internalType: 'uint256',
|
|
453
|
+
name: 'shares',
|
|
454
|
+
type: 'uint256',
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
internalType: 'address',
|
|
458
|
+
name: 'onBehalf',
|
|
459
|
+
type: 'address',
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
internalType: 'bytes',
|
|
463
|
+
name: 'data',
|
|
464
|
+
type: 'bytes',
|
|
465
|
+
},
|
|
466
|
+
],
|
|
467
|
+
name: 'repay',
|
|
468
|
+
outputs: [
|
|
469
|
+
{
|
|
470
|
+
internalType: 'uint256',
|
|
471
|
+
name: 'assetsRepaid',
|
|
472
|
+
type: 'uint256',
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
internalType: 'uint256',
|
|
476
|
+
name: 'sharesRepaid',
|
|
477
|
+
type: 'uint256',
|
|
478
|
+
},
|
|
479
|
+
],
|
|
480
|
+
stateMutability: 'nonpayable',
|
|
481
|
+
type: 'function',
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
inputs: [
|
|
485
|
+
{
|
|
486
|
+
internalType: 'address',
|
|
487
|
+
name: 'authorized',
|
|
488
|
+
type: 'address',
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
internalType: 'bool',
|
|
492
|
+
name: 'newIsAuthorized',
|
|
493
|
+
type: 'bool',
|
|
494
|
+
},
|
|
495
|
+
],
|
|
496
|
+
name: 'setAuthorization',
|
|
497
|
+
outputs: [],
|
|
498
|
+
stateMutability: 'nonpayable',
|
|
499
|
+
type: 'function',
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
inputs: [
|
|
503
|
+
{
|
|
504
|
+
components: [
|
|
505
|
+
{
|
|
506
|
+
internalType: 'address',
|
|
507
|
+
name: 'authorizer',
|
|
508
|
+
type: 'address',
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
internalType: 'address',
|
|
512
|
+
name: 'authorized',
|
|
513
|
+
type: 'address',
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
internalType: 'bool',
|
|
517
|
+
name: 'isAuthorized',
|
|
518
|
+
type: 'bool',
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
internalType: 'uint256',
|
|
522
|
+
name: 'nonce',
|
|
523
|
+
type: 'uint256',
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
internalType: 'uint256',
|
|
527
|
+
name: 'deadline',
|
|
528
|
+
type: 'uint256',
|
|
529
|
+
},
|
|
530
|
+
],
|
|
531
|
+
internalType: 'struct Authorization',
|
|
532
|
+
name: 'authorization',
|
|
533
|
+
type: 'tuple',
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
components: [
|
|
537
|
+
{
|
|
538
|
+
internalType: 'uint8',
|
|
539
|
+
name: 'v',
|
|
540
|
+
type: 'uint8',
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
internalType: 'bytes32',
|
|
544
|
+
name: 'r',
|
|
545
|
+
type: 'bytes32',
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
internalType: 'bytes32',
|
|
549
|
+
name: 's',
|
|
550
|
+
type: 'bytes32',
|
|
551
|
+
},
|
|
552
|
+
],
|
|
553
|
+
internalType: 'struct Signature',
|
|
554
|
+
name: 'signature',
|
|
555
|
+
type: 'tuple',
|
|
556
|
+
},
|
|
557
|
+
],
|
|
558
|
+
name: 'setAuthorizationWithSig',
|
|
559
|
+
outputs: [],
|
|
560
|
+
stateMutability: 'nonpayable',
|
|
561
|
+
type: 'function',
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
inputs: [
|
|
565
|
+
{
|
|
566
|
+
components: [
|
|
567
|
+
{
|
|
568
|
+
internalType: 'address',
|
|
569
|
+
name: 'loanToken',
|
|
570
|
+
type: 'address',
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
internalType: 'address',
|
|
574
|
+
name: 'collateralToken',
|
|
575
|
+
type: 'address',
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
internalType: 'address',
|
|
579
|
+
name: 'oracle',
|
|
580
|
+
type: 'address',
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
internalType: 'address',
|
|
584
|
+
name: 'irm',
|
|
585
|
+
type: 'address',
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
internalType: 'uint256',
|
|
589
|
+
name: 'lltv',
|
|
590
|
+
type: 'uint256',
|
|
591
|
+
},
|
|
592
|
+
],
|
|
593
|
+
internalType: 'struct MarketParams',
|
|
594
|
+
name: 'marketParams',
|
|
595
|
+
type: 'tuple',
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
internalType: 'uint256',
|
|
599
|
+
name: 'newFee',
|
|
600
|
+
type: 'uint256',
|
|
601
|
+
},
|
|
602
|
+
],
|
|
603
|
+
name: 'setFee',
|
|
604
|
+
outputs: [],
|
|
605
|
+
stateMutability: 'nonpayable',
|
|
606
|
+
type: 'function',
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
inputs: [
|
|
610
|
+
{
|
|
611
|
+
internalType: 'address',
|
|
612
|
+
name: 'newFeeRecipient',
|
|
613
|
+
type: 'address',
|
|
614
|
+
},
|
|
615
|
+
],
|
|
616
|
+
name: 'setFeeRecipient',
|
|
617
|
+
outputs: [],
|
|
618
|
+
stateMutability: 'nonpayable',
|
|
619
|
+
type: 'function',
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
inputs: [
|
|
623
|
+
{
|
|
624
|
+
internalType: 'address',
|
|
625
|
+
name: 'newOwner',
|
|
626
|
+
type: 'address',
|
|
627
|
+
},
|
|
628
|
+
],
|
|
629
|
+
name: 'setOwner',
|
|
630
|
+
outputs: [],
|
|
631
|
+
stateMutability: 'nonpayable',
|
|
632
|
+
type: 'function',
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
inputs: [
|
|
636
|
+
{
|
|
637
|
+
components: [
|
|
638
|
+
{
|
|
639
|
+
internalType: 'address',
|
|
640
|
+
name: 'loanToken',
|
|
641
|
+
type: 'address',
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
internalType: 'address',
|
|
645
|
+
name: 'collateralToken',
|
|
646
|
+
type: 'address',
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
internalType: 'address',
|
|
650
|
+
name: 'oracle',
|
|
651
|
+
type: 'address',
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
internalType: 'address',
|
|
655
|
+
name: 'irm',
|
|
656
|
+
type: 'address',
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
internalType: 'uint256',
|
|
660
|
+
name: 'lltv',
|
|
661
|
+
type: 'uint256',
|
|
662
|
+
},
|
|
663
|
+
],
|
|
664
|
+
internalType: 'struct MarketParams',
|
|
665
|
+
name: 'marketParams',
|
|
666
|
+
type: 'tuple',
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
internalType: 'uint256',
|
|
670
|
+
name: 'assets',
|
|
671
|
+
type: 'uint256',
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
internalType: 'uint256',
|
|
675
|
+
name: 'shares',
|
|
676
|
+
type: 'uint256',
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
internalType: 'address',
|
|
680
|
+
name: 'onBehalf',
|
|
681
|
+
type: 'address',
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
internalType: 'bytes',
|
|
685
|
+
name: 'data',
|
|
686
|
+
type: 'bytes',
|
|
687
|
+
},
|
|
688
|
+
],
|
|
689
|
+
name: 'supply',
|
|
690
|
+
outputs: [
|
|
691
|
+
{
|
|
692
|
+
internalType: 'uint256',
|
|
693
|
+
name: 'assetsSupplied',
|
|
694
|
+
type: 'uint256',
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
internalType: 'uint256',
|
|
698
|
+
name: 'sharesSupplied',
|
|
699
|
+
type: 'uint256',
|
|
700
|
+
},
|
|
701
|
+
],
|
|
702
|
+
stateMutability: 'nonpayable',
|
|
703
|
+
type: 'function',
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
inputs: [
|
|
707
|
+
{
|
|
708
|
+
components: [
|
|
709
|
+
{
|
|
710
|
+
internalType: 'address',
|
|
711
|
+
name: 'loanToken',
|
|
712
|
+
type: 'address',
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
internalType: 'address',
|
|
716
|
+
name: 'collateralToken',
|
|
717
|
+
type: 'address',
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
internalType: 'address',
|
|
721
|
+
name: 'oracle',
|
|
722
|
+
type: 'address',
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
internalType: 'address',
|
|
726
|
+
name: 'irm',
|
|
727
|
+
type: 'address',
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
internalType: 'uint256',
|
|
731
|
+
name: 'lltv',
|
|
732
|
+
type: 'uint256',
|
|
733
|
+
},
|
|
734
|
+
],
|
|
735
|
+
internalType: 'struct MarketParams',
|
|
736
|
+
name: 'marketParams',
|
|
737
|
+
type: 'tuple',
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
internalType: 'uint256',
|
|
741
|
+
name: 'assets',
|
|
742
|
+
type: 'uint256',
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
internalType: 'address',
|
|
746
|
+
name: 'onBehalf',
|
|
747
|
+
type: 'address',
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
internalType: 'bytes',
|
|
751
|
+
name: 'data',
|
|
752
|
+
type: 'bytes',
|
|
753
|
+
},
|
|
754
|
+
],
|
|
755
|
+
name: 'supplyCollateral',
|
|
756
|
+
outputs: [],
|
|
757
|
+
stateMutability: 'nonpayable',
|
|
758
|
+
type: 'function',
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
inputs: [
|
|
762
|
+
{
|
|
763
|
+
components: [
|
|
764
|
+
{
|
|
765
|
+
internalType: 'address',
|
|
766
|
+
name: 'loanToken',
|
|
767
|
+
type: 'address',
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
internalType: 'address',
|
|
771
|
+
name: 'collateralToken',
|
|
772
|
+
type: 'address',
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
internalType: 'address',
|
|
776
|
+
name: 'oracle',
|
|
777
|
+
type: 'address',
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
internalType: 'address',
|
|
781
|
+
name: 'irm',
|
|
782
|
+
type: 'address',
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
internalType: 'uint256',
|
|
786
|
+
name: 'lltv',
|
|
787
|
+
type: 'uint256',
|
|
788
|
+
},
|
|
789
|
+
],
|
|
790
|
+
internalType: 'struct MarketParams',
|
|
791
|
+
name: 'marketParams',
|
|
792
|
+
type: 'tuple',
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
internalType: 'uint256',
|
|
796
|
+
name: 'assets',
|
|
797
|
+
type: 'uint256',
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
internalType: 'uint256',
|
|
801
|
+
name: 'shares',
|
|
802
|
+
type: 'uint256',
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
internalType: 'address',
|
|
806
|
+
name: 'onBehalf',
|
|
807
|
+
type: 'address',
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
internalType: 'address',
|
|
811
|
+
name: 'receiver',
|
|
812
|
+
type: 'address',
|
|
813
|
+
},
|
|
814
|
+
],
|
|
815
|
+
name: 'withdraw',
|
|
816
|
+
outputs: [
|
|
817
|
+
{
|
|
818
|
+
internalType: 'uint256',
|
|
819
|
+
name: 'assetsWithdrawn',
|
|
820
|
+
type: 'uint256',
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
internalType: 'uint256',
|
|
824
|
+
name: 'sharesWithdrawn',
|
|
825
|
+
type: 'uint256',
|
|
826
|
+
},
|
|
827
|
+
],
|
|
828
|
+
stateMutability: 'nonpayable',
|
|
829
|
+
type: 'function',
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
inputs: [
|
|
833
|
+
{
|
|
834
|
+
components: [
|
|
835
|
+
{
|
|
836
|
+
internalType: 'address',
|
|
837
|
+
name: 'loanToken',
|
|
838
|
+
type: 'address',
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
internalType: 'address',
|
|
842
|
+
name: 'collateralToken',
|
|
843
|
+
type: 'address',
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
internalType: 'address',
|
|
847
|
+
name: 'oracle',
|
|
848
|
+
type: 'address',
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
internalType: 'address',
|
|
852
|
+
name: 'irm',
|
|
853
|
+
type: 'address',
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
internalType: 'uint256',
|
|
857
|
+
name: 'lltv',
|
|
858
|
+
type: 'uint256',
|
|
859
|
+
},
|
|
860
|
+
],
|
|
861
|
+
internalType: 'struct MarketParams',
|
|
862
|
+
name: 'marketParams',
|
|
863
|
+
type: 'tuple',
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
internalType: 'uint256',
|
|
867
|
+
name: 'assets',
|
|
868
|
+
type: 'uint256',
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
internalType: 'address',
|
|
872
|
+
name: 'onBehalf',
|
|
873
|
+
type: 'address',
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
internalType: 'address',
|
|
877
|
+
name: 'receiver',
|
|
878
|
+
type: 'address',
|
|
879
|
+
},
|
|
880
|
+
],
|
|
881
|
+
name: 'withdrawCollateral',
|
|
882
|
+
outputs: [],
|
|
883
|
+
stateMutability: 'nonpayable',
|
|
884
|
+
type: 'function',
|
|
885
|
+
},
|
|
886
|
+
] as const;
|