@usdu-finance/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,459 @@
|
|
|
1
|
+
export const VaultAdapterV1_ABI = [
|
|
2
|
+
{
|
|
3
|
+
inputs: [
|
|
4
|
+
{
|
|
5
|
+
internalType: 'contract Stablecoin',
|
|
6
|
+
name: '_stable',
|
|
7
|
+
type: 'address',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
internalType: 'contract IERC4626',
|
|
11
|
+
name: '_vault',
|
|
12
|
+
type: 'address',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
internalType: 'address[5]',
|
|
16
|
+
name: '_receivers',
|
|
17
|
+
type: 'address[5]',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
internalType: 'uint32[5]',
|
|
21
|
+
name: '_weights',
|
|
22
|
+
type: 'uint32[5]',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
stateMutability: 'nonpayable',
|
|
26
|
+
type: 'constructor',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
inputs: [],
|
|
30
|
+
name: 'AlreadyPending',
|
|
31
|
+
type: 'error',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
inputs: [],
|
|
35
|
+
name: 'NoPendingValue',
|
|
36
|
+
type: 'error',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
inputs: [
|
|
40
|
+
{
|
|
41
|
+
internalType: 'uint256',
|
|
42
|
+
name: 'assets',
|
|
43
|
+
type: 'uint256',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
internalType: 'uint256',
|
|
47
|
+
name: 'minted',
|
|
48
|
+
type: 'uint256',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
name: 'NothingToReconcile',
|
|
52
|
+
type: 'error',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
inputs: [
|
|
56
|
+
{
|
|
57
|
+
internalType: 'address',
|
|
58
|
+
name: 'token',
|
|
59
|
+
type: 'address',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
name: 'SafeERC20FailedOperation',
|
|
63
|
+
type: 'error',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
inputs: [],
|
|
67
|
+
name: 'TimelockNotElapsed',
|
|
68
|
+
type: 'error',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
anonymous: false,
|
|
72
|
+
inputs: [
|
|
73
|
+
{
|
|
74
|
+
indexed: false,
|
|
75
|
+
internalType: 'uint256',
|
|
76
|
+
name: 'amount',
|
|
77
|
+
type: 'uint256',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
indexed: false,
|
|
81
|
+
internalType: 'uint256',
|
|
82
|
+
name: 'sharesCore',
|
|
83
|
+
type: 'uint256',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
indexed: false,
|
|
87
|
+
internalType: 'uint256',
|
|
88
|
+
name: 'totalMinted',
|
|
89
|
+
type: 'uint256',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
name: 'Deposit',
|
|
93
|
+
type: 'event',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
anonymous: false,
|
|
97
|
+
inputs: [
|
|
98
|
+
{
|
|
99
|
+
indexed: true,
|
|
100
|
+
internalType: 'address',
|
|
101
|
+
name: 'receiver',
|
|
102
|
+
type: 'address',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
indexed: false,
|
|
106
|
+
internalType: 'uint256',
|
|
107
|
+
name: 'amount',
|
|
108
|
+
type: 'uint256',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
indexed: false,
|
|
112
|
+
internalType: 'uint256',
|
|
113
|
+
name: 'ratio',
|
|
114
|
+
type: 'uint256',
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
name: 'Distribution',
|
|
118
|
+
type: 'event',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
anonymous: false,
|
|
122
|
+
inputs: [
|
|
123
|
+
{
|
|
124
|
+
indexed: false,
|
|
125
|
+
internalType: 'uint256',
|
|
126
|
+
name: 'amount',
|
|
127
|
+
type: 'uint256',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
indexed: false,
|
|
131
|
+
internalType: 'uint256',
|
|
132
|
+
name: 'sharesCore',
|
|
133
|
+
type: 'uint256',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
indexed: false,
|
|
137
|
+
internalType: 'uint256',
|
|
138
|
+
name: 'totalMinted',
|
|
139
|
+
type: 'uint256',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
name: 'Redeem',
|
|
143
|
+
type: 'event',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
anonymous: false,
|
|
147
|
+
inputs: [
|
|
148
|
+
{
|
|
149
|
+
indexed: false,
|
|
150
|
+
internalType: 'uint256',
|
|
151
|
+
name: 'amount',
|
|
152
|
+
type: 'uint256',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
indexed: false,
|
|
156
|
+
internalType: 'uint256',
|
|
157
|
+
name: 'totalRevenue',
|
|
158
|
+
type: 'uint256',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
indexed: false,
|
|
162
|
+
internalType: 'uint256',
|
|
163
|
+
name: 'totalMinted',
|
|
164
|
+
type: 'uint256',
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
name: 'Revenue',
|
|
168
|
+
type: 'event',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
anonymous: false,
|
|
172
|
+
inputs: [
|
|
173
|
+
{
|
|
174
|
+
indexed: true,
|
|
175
|
+
internalType: 'address',
|
|
176
|
+
name: 'caller',
|
|
177
|
+
type: 'address',
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
name: 'RevokeDistribution',
|
|
181
|
+
type: 'event',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
anonymous: false,
|
|
185
|
+
inputs: [
|
|
186
|
+
{
|
|
187
|
+
indexed: true,
|
|
188
|
+
internalType: 'address',
|
|
189
|
+
name: 'caller',
|
|
190
|
+
type: 'address',
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
name: 'SetDistribution',
|
|
194
|
+
type: 'event',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
anonymous: false,
|
|
198
|
+
inputs: [
|
|
199
|
+
{
|
|
200
|
+
indexed: true,
|
|
201
|
+
internalType: 'address',
|
|
202
|
+
name: 'caller',
|
|
203
|
+
type: 'address',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
indexed: false,
|
|
207
|
+
internalType: 'address[5]',
|
|
208
|
+
name: 'receivers',
|
|
209
|
+
type: 'address[5]',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
indexed: false,
|
|
213
|
+
internalType: 'uint32[5]',
|
|
214
|
+
name: 'weights',
|
|
215
|
+
type: 'uint32[5]',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
indexed: false,
|
|
219
|
+
internalType: 'uint256',
|
|
220
|
+
name: 'timelock',
|
|
221
|
+
type: 'uint256',
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
name: 'SubmitDistribution',
|
|
225
|
+
type: 'event',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
inputs: [],
|
|
229
|
+
name: 'applyDistribution',
|
|
230
|
+
outputs: [],
|
|
231
|
+
stateMutability: 'nonpayable',
|
|
232
|
+
type: 'function',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
inputs: [
|
|
236
|
+
{
|
|
237
|
+
internalType: 'uint256',
|
|
238
|
+
name: 'amount',
|
|
239
|
+
type: 'uint256',
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
name: 'deposit',
|
|
243
|
+
outputs: [],
|
|
244
|
+
stateMutability: 'nonpayable',
|
|
245
|
+
type: 'function',
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
inputs: [
|
|
249
|
+
{
|
|
250
|
+
internalType: 'uint256',
|
|
251
|
+
name: '',
|
|
252
|
+
type: 'uint256',
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
name: 'pendingReceivers',
|
|
256
|
+
outputs: [
|
|
257
|
+
{
|
|
258
|
+
internalType: 'address',
|
|
259
|
+
name: '',
|
|
260
|
+
type: 'address',
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
stateMutability: 'view',
|
|
264
|
+
type: 'function',
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
inputs: [],
|
|
268
|
+
name: 'pendingValidAt',
|
|
269
|
+
outputs: [
|
|
270
|
+
{
|
|
271
|
+
internalType: 'uint256',
|
|
272
|
+
name: '',
|
|
273
|
+
type: 'uint256',
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
stateMutability: 'view',
|
|
277
|
+
type: 'function',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
inputs: [
|
|
281
|
+
{
|
|
282
|
+
internalType: 'uint256',
|
|
283
|
+
name: '',
|
|
284
|
+
type: 'uint256',
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
name: 'pendingWeights',
|
|
288
|
+
outputs: [
|
|
289
|
+
{
|
|
290
|
+
internalType: 'uint32',
|
|
291
|
+
name: '',
|
|
292
|
+
type: 'uint32',
|
|
293
|
+
},
|
|
294
|
+
],
|
|
295
|
+
stateMutability: 'view',
|
|
296
|
+
type: 'function',
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
inputs: [
|
|
300
|
+
{
|
|
301
|
+
internalType: 'uint256',
|
|
302
|
+
name: '',
|
|
303
|
+
type: 'uint256',
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
name: 'receivers',
|
|
307
|
+
outputs: [
|
|
308
|
+
{
|
|
309
|
+
internalType: 'address',
|
|
310
|
+
name: '',
|
|
311
|
+
type: 'address',
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
stateMutability: 'view',
|
|
315
|
+
type: 'function',
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
inputs: [],
|
|
319
|
+
name: 'reconcile',
|
|
320
|
+
outputs: [],
|
|
321
|
+
stateMutability: 'nonpayable',
|
|
322
|
+
type: 'function',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
inputs: [
|
|
326
|
+
{
|
|
327
|
+
internalType: 'uint256',
|
|
328
|
+
name: 'sharesCore',
|
|
329
|
+
type: 'uint256',
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
name: 'redeem',
|
|
333
|
+
outputs: [],
|
|
334
|
+
stateMutability: 'nonpayable',
|
|
335
|
+
type: 'function',
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
inputs: [],
|
|
339
|
+
name: 'revokePendingDistribution',
|
|
340
|
+
outputs: [],
|
|
341
|
+
stateMutability: 'nonpayable',
|
|
342
|
+
type: 'function',
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
inputs: [
|
|
346
|
+
{
|
|
347
|
+
internalType: 'address[5]',
|
|
348
|
+
name: '_receivers',
|
|
349
|
+
type: 'address[5]',
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
internalType: 'uint32[5]',
|
|
353
|
+
name: '_weights',
|
|
354
|
+
type: 'uint32[5]',
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
name: 'setDistribution',
|
|
358
|
+
outputs: [],
|
|
359
|
+
stateMutability: 'nonpayable',
|
|
360
|
+
type: 'function',
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
inputs: [],
|
|
364
|
+
name: 'stable',
|
|
365
|
+
outputs: [
|
|
366
|
+
{
|
|
367
|
+
internalType: 'contract Stablecoin',
|
|
368
|
+
name: '',
|
|
369
|
+
type: 'address',
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
stateMutability: 'view',
|
|
373
|
+
type: 'function',
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
inputs: [],
|
|
377
|
+
name: 'totalAssets',
|
|
378
|
+
outputs: [
|
|
379
|
+
{
|
|
380
|
+
internalType: 'uint256',
|
|
381
|
+
name: '',
|
|
382
|
+
type: 'uint256',
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
stateMutability: 'view',
|
|
386
|
+
type: 'function',
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
inputs: [],
|
|
390
|
+
name: 'totalMinted',
|
|
391
|
+
outputs: [
|
|
392
|
+
{
|
|
393
|
+
internalType: 'uint256',
|
|
394
|
+
name: '',
|
|
395
|
+
type: 'uint256',
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
stateMutability: 'view',
|
|
399
|
+
type: 'function',
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
inputs: [],
|
|
403
|
+
name: 'totalRevenue',
|
|
404
|
+
outputs: [
|
|
405
|
+
{
|
|
406
|
+
internalType: 'uint256',
|
|
407
|
+
name: '',
|
|
408
|
+
type: 'uint256',
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
stateMutability: 'view',
|
|
412
|
+
type: 'function',
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
inputs: [],
|
|
416
|
+
name: 'totalWeights',
|
|
417
|
+
outputs: [
|
|
418
|
+
{
|
|
419
|
+
internalType: 'uint256',
|
|
420
|
+
name: '',
|
|
421
|
+
type: 'uint256',
|
|
422
|
+
},
|
|
423
|
+
],
|
|
424
|
+
stateMutability: 'view',
|
|
425
|
+
type: 'function',
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
inputs: [],
|
|
429
|
+
name: 'vault',
|
|
430
|
+
outputs: [
|
|
431
|
+
{
|
|
432
|
+
internalType: 'contract IERC4626',
|
|
433
|
+
name: '',
|
|
434
|
+
type: 'address',
|
|
435
|
+
},
|
|
436
|
+
],
|
|
437
|
+
stateMutability: 'view',
|
|
438
|
+
type: 'function',
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
inputs: [
|
|
442
|
+
{
|
|
443
|
+
internalType: 'uint256',
|
|
444
|
+
name: '',
|
|
445
|
+
type: 'uint256',
|
|
446
|
+
},
|
|
447
|
+
],
|
|
448
|
+
name: 'weights',
|
|
449
|
+
outputs: [
|
|
450
|
+
{
|
|
451
|
+
internalType: 'uint32',
|
|
452
|
+
name: '',
|
|
453
|
+
type: 'uint32',
|
|
454
|
+
},
|
|
455
|
+
],
|
|
456
|
+
stateMutability: 'view',
|
|
457
|
+
type: 'function',
|
|
458
|
+
},
|
|
459
|
+
] as const;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { arbitrum, avalanche, base, gnosis, mainnet, optimism, polygon, sonic } from 'viem/chains';
|
|
2
|
+
import { ChainAddressMap } from './address.types';
|
|
3
|
+
import { zeroAddress } from 'viem';
|
|
4
|
+
|
|
5
|
+
export const ADDRESS: ChainAddressMap = {
|
|
6
|
+
[mainnet.id]: {
|
|
7
|
+
// identifier
|
|
8
|
+
chainId: 1,
|
|
9
|
+
chainSelector: '5009297550715157269',
|
|
10
|
+
|
|
11
|
+
// curator / DAO
|
|
12
|
+
curator: '0x9fe66037c44236c87D9Ac8345F489b4413fDFf06',
|
|
13
|
+
|
|
14
|
+
// deployer and stable
|
|
15
|
+
usduDeployer: '0x745211a1e1a58b2b11b932855b30d411c31e25d5',
|
|
16
|
+
usduStable: '0xdde3ec717f220fc6a29d6a4be73f91da5b718e55',
|
|
17
|
+
|
|
18
|
+
// morpho related
|
|
19
|
+
morphoBlue: '0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb',
|
|
20
|
+
morphoIrm: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
|
|
21
|
+
morphoChainlinkOracleV2Factory: '0x3A7bB36Ee3f3eE32A60e9f2b33c1e5f2E83ad766',
|
|
22
|
+
morphoMetaMorphoFactory1_1: '0x1897A8997241C1cD4bD0698647e4EB7213535c24',
|
|
23
|
+
morphoPublicAllocator: '0xfd32fA2ca22c76dD6E550706Ad913FC6CE91c75D',
|
|
24
|
+
morphoURD: '0x330eefa8a787552DC5cAd3C3cA644844B1E61Ddb',
|
|
25
|
+
|
|
26
|
+
// morpho vaults
|
|
27
|
+
usduCoreVault: '0xce22b5fb17ccbc0c5d87dc2e0df47dd71e3adc0a',
|
|
28
|
+
usduStakedVault: '0x0b5281e1fa7fc7c1f0890f311d5f04d55c0fd63c',
|
|
29
|
+
|
|
30
|
+
// morpho adapters
|
|
31
|
+
usduMorphoAdapterV1: '0x6D6525D8e234D840b2699f7107f14fa0D6C62c42', // set to expire, deprecated
|
|
32
|
+
usduMorphoAdapterV1_1: '0xab6523Cd7fa669EC35Bd5358dF505382b810CDB5', // set to expire, deprecated
|
|
33
|
+
usduMorphoAdapterV1_2: '0xFb46481A9819e068Af0EB64a2C2824FCecAAAA45',
|
|
34
|
+
|
|
35
|
+
// morpho core vault market ids
|
|
36
|
+
marketIdUSDUIdle: '0x0F2C33F9074109B75B88617534E6AC6DFA8EBF97270C716782221A27CBF0D880',
|
|
37
|
+
marketIdUSDUUSDC: '0x60f855f6b8c6919c2a4f3ab5f367fc923e3172e6dc8f4e8b6c448eb2d43421a1',
|
|
38
|
+
marketIdUSDUWETH: '0xa6b5b5cc24a40900156a503afc6c898118b6d37ae545c2c144326fb95ac68e7a',
|
|
39
|
+
marketIdUSDUCBBTC: '0x5BFC5484227F34C205E652C0426192DDE746FDB709D8947125A06C03F07EA4C7',
|
|
40
|
+
marketIdUSDUCurveLPUSDC: '0xC12387D79D5D7BA35C5D2ED60B71DC4D6341889A30AFEA50A790C4E8967C209C',
|
|
41
|
+
|
|
42
|
+
// morpho cross market ids
|
|
43
|
+
marketIdUSDCUSDU: '0x6E988863B5C88C6A0038E07F346D79A941BA30E6BAB0E1267F3BCF72275D572A',
|
|
44
|
+
marketIdUSDCSUSDU: '0xAC3DB6E1B107B3239C6356F7018058BA66DFC8BB9D619F90A567CA58D33FFA36',
|
|
45
|
+
|
|
46
|
+
// reward mgm
|
|
47
|
+
usduRewardRouterV0: '0xFA6d71ED122a7b3b494116317C2aC3B4E5269339', // deprecated
|
|
48
|
+
|
|
49
|
+
// curve pools
|
|
50
|
+
// https://www.curve.finance/dex/ethereum/pools/factory-stable-ng-506
|
|
51
|
+
curveStableSwapNG_USDUUSDC: '0x771c91e699B4B23420de3F81dE2aA38C4041632b',
|
|
52
|
+
curveStableSwapNG_USDUUSDC_LP_PriceAdapter: '0xe0fd8C8E137daf400cD00ff9b461d60FB3C92F8A',
|
|
53
|
+
curveStableSwapNG_USDUUSDC_LP_PriceOracle: '0x3544BdF11EE46261e4a7823D9100B4F66B0450B4',
|
|
54
|
+
|
|
55
|
+
// https://www.curve.finance/dex/ethereum/pools/factory-stable-ng-596
|
|
56
|
+
curveStableSwapNG_USDUUSDC_2: '0x6C5Ff8DCe52BE77b4eCE6B51996018f0C1713bA9',
|
|
57
|
+
|
|
58
|
+
// curve adapters
|
|
59
|
+
usduCurveAdapterV1_USDC: '0x6f05782a28cDa7f01B054b014cF6cd92023937e4', // set to expire, deprecated
|
|
60
|
+
usduCurveAdapterV1_1_USDC: '0x77eBb1D7a7f5371a61b7D21D7734b6dDE6F0f94F', // set to expire, deprecated
|
|
61
|
+
usduCurveAdapterV1_1_USDC_2: '0x77cBb2f180F55dd2916bfC78F879A2C2dE37f638',
|
|
62
|
+
|
|
63
|
+
// term-max vaults
|
|
64
|
+
termmaxVaultUSDU_Core: '0x18d91B5e3218AB16Ef86fB7Cb054CB48bA1e8b8e',
|
|
65
|
+
termmaxVaultUSDU_RWA: zeroAddress,
|
|
66
|
+
termmaxVaultUSDU_Yield: '0xa231215C8a78E18205Ec5Ba2B52e98d99Bf43236',
|
|
67
|
+
|
|
68
|
+
// term-max adapters
|
|
69
|
+
termmaxVaultAdapterRecoverV1_Core: '0x8F36bbEe57aCB4857CB97898020B529969FDF221',
|
|
70
|
+
termmaxVaultAdapterRecoverV1_RWA: zeroAddress,
|
|
71
|
+
termmaxVaultAdapterRecoverV1_Yield: '0x5febEFD5AeCFefB3352c5Edd49d634B1456c4bD7',
|
|
72
|
+
|
|
73
|
+
// erc20 tokens
|
|
74
|
+
usdc: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
75
|
+
WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
76
|
+
cbBTC: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf',
|
|
77
|
+
},
|
|
78
|
+
[polygon.id]: {
|
|
79
|
+
// identifier
|
|
80
|
+
chainId: 137,
|
|
81
|
+
chainSelector: '4051577828743386545',
|
|
82
|
+
},
|
|
83
|
+
[arbitrum.id]: {
|
|
84
|
+
// identifier
|
|
85
|
+
chainId: 42161,
|
|
86
|
+
chainSelector: '4949039107694359620',
|
|
87
|
+
},
|
|
88
|
+
[optimism.id]: {
|
|
89
|
+
// identifier
|
|
90
|
+
chainId: 10,
|
|
91
|
+
chainSelector: '3734403246176062136',
|
|
92
|
+
},
|
|
93
|
+
[base.id]: {
|
|
94
|
+
// identifier
|
|
95
|
+
chainId: 8453,
|
|
96
|
+
chainSelector: '15971525489660198786',
|
|
97
|
+
},
|
|
98
|
+
[avalanche.id]: {
|
|
99
|
+
// identifier
|
|
100
|
+
chainId: 43114,
|
|
101
|
+
chainSelector: '6433500567565415381',
|
|
102
|
+
},
|
|
103
|
+
[gnosis.id]: {
|
|
104
|
+
// identifier
|
|
105
|
+
chainId: 100,
|
|
106
|
+
chainSelector: '465200170687744372',
|
|
107
|
+
},
|
|
108
|
+
[sonic.id]: {
|
|
109
|
+
// identifier
|
|
110
|
+
chainId: 146,
|
|
111
|
+
chainSelector: '1673871237479749969',
|
|
112
|
+
},
|
|
113
|
+
} as const;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { arbitrum, avalanche, base, gnosis, mainnet, optimism, polygon, sonic } from 'viem/chains';
|
|
2
|
+
import { Address } from 'viem';
|
|
3
|
+
|
|
4
|
+
export type ChainIdMain = typeof mainnet.id;
|
|
5
|
+
|
|
6
|
+
export type ChainIdSide =
|
|
7
|
+
| typeof polygon.id
|
|
8
|
+
| typeof arbitrum.id
|
|
9
|
+
| typeof optimism.id
|
|
10
|
+
| typeof base.id
|
|
11
|
+
| typeof avalanche.id
|
|
12
|
+
| typeof gnosis.id
|
|
13
|
+
| typeof sonic.id;
|
|
14
|
+
|
|
15
|
+
export type ChainId = ChainIdMain | ChainIdSide;
|
|
16
|
+
|
|
17
|
+
export type ChainAddressMainnet = {
|
|
18
|
+
// identifier
|
|
19
|
+
chainId: typeof mainnet.id;
|
|
20
|
+
chainSelector: string;
|
|
21
|
+
|
|
22
|
+
// curator
|
|
23
|
+
curator: Address;
|
|
24
|
+
|
|
25
|
+
// morpho related
|
|
26
|
+
morphoBlue: Address;
|
|
27
|
+
morphoIrm: Address;
|
|
28
|
+
morphoChainlinkOracleV2Factory: Address;
|
|
29
|
+
morphoMetaMorphoFactory1_1: Address;
|
|
30
|
+
morphoPublicAllocator: Address;
|
|
31
|
+
morphoURD: Address;
|
|
32
|
+
|
|
33
|
+
// USDU related
|
|
34
|
+
usduDeployer: Address;
|
|
35
|
+
usduStable: Address;
|
|
36
|
+
usduCoreVault: Address;
|
|
37
|
+
usduStakedVault: Address;
|
|
38
|
+
usduRewardRouterV0: Address;
|
|
39
|
+
usduMorphoAdapterV1: Address;
|
|
40
|
+
usduMorphoAdapterV1_1: Address;
|
|
41
|
+
usduMorphoAdapterV1_2: Address;
|
|
42
|
+
usduCurveAdapterV1_USDC: Address;
|
|
43
|
+
usduCurveAdapterV1_1_USDC: Address;
|
|
44
|
+
usduCurveAdapterV1_1_USDC_2: Address;
|
|
45
|
+
|
|
46
|
+
// core vault market ids
|
|
47
|
+
marketIdUSDUIdle: Address;
|
|
48
|
+
marketIdUSDUUSDC: Address;
|
|
49
|
+
marketIdUSDUWETH: Address;
|
|
50
|
+
marketIdUSDUCBBTC: Address;
|
|
51
|
+
marketIdUSDUCurveLPUSDC: Address;
|
|
52
|
+
|
|
53
|
+
// cross market ids
|
|
54
|
+
marketIdUSDCUSDU: Address;
|
|
55
|
+
marketIdUSDCSUSDU: Address;
|
|
56
|
+
|
|
57
|
+
// curve pools
|
|
58
|
+
curveStableSwapNG_USDUUSDC: Address;
|
|
59
|
+
curveStableSwapNG_USDUUSDC_2: Address;
|
|
60
|
+
curveStableSwapNG_USDUUSDC_LP_PriceAdapter: Address;
|
|
61
|
+
curveStableSwapNG_USDUUSDC_LP_PriceOracle: Address;
|
|
62
|
+
|
|
63
|
+
// term-max vaults
|
|
64
|
+
termmaxVaultUSDU_Core: Address;
|
|
65
|
+
termmaxVaultUSDU_RWA: Address;
|
|
66
|
+
termmaxVaultUSDU_Yield: Address;
|
|
67
|
+
|
|
68
|
+
// term-max adapters
|
|
69
|
+
termmaxVaultAdapterRecoverV1_Core: Address;
|
|
70
|
+
termmaxVaultAdapterRecoverV1_RWA: Address;
|
|
71
|
+
termmaxVaultAdapterRecoverV1_Yield: Address;
|
|
72
|
+
|
|
73
|
+
// erc20 tokens
|
|
74
|
+
usdc: Address;
|
|
75
|
+
WETH: Address;
|
|
76
|
+
cbBTC: Address;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export type ChainAddressPolygon = {
|
|
80
|
+
// identifier
|
|
81
|
+
chainId: typeof polygon.id;
|
|
82
|
+
chainSelector: string;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export type ChainAddressArbitrum = {
|
|
86
|
+
// identifier
|
|
87
|
+
chainId: typeof arbitrum.id;
|
|
88
|
+
chainSelector: string;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type ChainAddressOptimism = {
|
|
92
|
+
// identifier
|
|
93
|
+
chainId: typeof optimism.id;
|
|
94
|
+
chainSelector: string;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export type ChainAddressBase = {
|
|
98
|
+
// identifier
|
|
99
|
+
chainId: typeof base.id;
|
|
100
|
+
chainSelector: string;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export type ChainAddressAvalanche = {
|
|
104
|
+
// identifier
|
|
105
|
+
chainId: typeof avalanche.id;
|
|
106
|
+
chainSelector: string;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export type ChainAddressGnosis = {
|
|
110
|
+
// identifier
|
|
111
|
+
chainId: typeof gnosis.id;
|
|
112
|
+
chainSelector: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export type ChainAddressSonic = {
|
|
116
|
+
// identifier
|
|
117
|
+
chainId: typeof sonic.id;
|
|
118
|
+
chainSelector: string;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export type ChainAddressMap = {
|
|
122
|
+
[mainnet.id]: ChainAddressMainnet;
|
|
123
|
+
[polygon.id]: ChainAddressPolygon;
|
|
124
|
+
[arbitrum.id]: ChainAddressArbitrum;
|
|
125
|
+
[optimism.id]: ChainAddressOptimism;
|
|
126
|
+
[base.id]: ChainAddressBase;
|
|
127
|
+
[avalanche.id]: ChainAddressAvalanche;
|
|
128
|
+
[gnosis.id]: ChainAddressGnosis;
|
|
129
|
+
[sonic.id]: ChainAddressSonic;
|
|
130
|
+
};
|