damm-sdk 1.4.35 → 1.4.37
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/dist/index.cjs +17187 -16747
- package/dist/index.cjs.map +84 -97
- package/dist/index.js +13222 -12265
- package/dist/index.js.map +77 -84
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/lagoonV1/delay.proxy.admin.d.ts +208 -0
- package/dist/integrations/lagoonV1/delay.proxy.admin.d.ts.map +1 -0
- package/dist/integrations/lagoonV1/index.d.ts +1 -0
- package/dist/integrations/lagoonV1/index.d.ts.map +1 -1
- package/dist/integrations/lagoonV1/lagoon.v1.d.ts +17 -0
- package/dist/integrations/lagoonV1/lagoon.v1.d.ts.map +1 -1
- package/dist/integrations/lagoonV2/addresses.d.ts +19 -0
- package/dist/integrations/lagoonV2/addresses.d.ts.map +1 -0
- package/dist/integrations/lagoonV2/factory.abi.d.ts +183 -0
- package/dist/integrations/lagoonV2/factory.abi.d.ts.map +1 -0
- package/dist/integrations/lagoonV2/index.d.ts +7 -0
- package/dist/integrations/lagoonV2/index.d.ts.map +1 -0
- package/dist/integrations/lagoonV2/lagoon.v2.d.ts +132 -0
- package/dist/integrations/lagoonV2/lagoon.v2.d.ts.map +1 -0
- package/dist/integrations/lagoonV2/lagoon.v2.permissions.d.ts +268 -0
- package/dist/integrations/lagoonV2/lagoon.v2.permissions.d.ts.map +1 -0
- package/dist/integrations/lagoonV2/lagoon.v2.setters.d.ts +293 -0
- package/dist/integrations/lagoonV2/lagoon.v2.setters.d.ts.map +1 -0
- package/dist/integrations/lagoonV2/vault.abi.d.ts +349 -0
- package/dist/integrations/lagoonV2/vault.abi.d.ts.map +1 -0
- package/dist/integrations/morphoVault/morpho.vault.d.ts +11 -0
- package/dist/integrations/morphoVault/morpho.vault.d.ts.map +1 -1
- package/dist/integrations/morphoVault/morpho.vault.v2.abi.d.ts +37 -0
- package/dist/integrations/morphoVault/morpho.vault.v2.abi.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/integrations/index.ts +1 -0
- package/src/integrations/lagoonV1/delay.proxy.admin.ts +358 -0
- package/src/integrations/lagoonV1/index.ts +1 -0
- package/src/integrations/lagoonV1/lagoon.v1.ts +109 -36
- package/src/integrations/lagoonV2/addresses.ts +35 -0
- package/src/integrations/lagoonV2/factory.abi.ts +110 -0
- package/src/integrations/lagoonV2/index.ts +6 -0
- package/src/integrations/lagoonV2/lagoon.v2.permissions.ts +578 -0
- package/src/integrations/lagoonV2/lagoon.v2.setters.ts +521 -0
- package/src/integrations/lagoonV2/lagoon.v2.ts +345 -0
- package/src/integrations/lagoonV2/vault.abi.ts +479 -0
- package/src/integrations/morphoVault/morpho.vault.ts +45 -0
- package/src/integrations/morphoVault/morpho.vault.v2.abi.ts +23 -0
- package/src/lib/contractsRegistry.json +4 -2
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal v0.6 Lagoon vault ABI — only functions targeted by the permission builders.
|
|
3
|
+
*
|
|
4
|
+
* All signatures verified against the deployed v0.6 implementations:
|
|
5
|
+
* Arbitrum: 0x3f5A9e1D82c595d14bA93c97eB8a77928cFdee70
|
|
6
|
+
* Ethereum: 0x6C77c47FB8168E22976C3B0338CB1769c952249f
|
|
7
|
+
*
|
|
8
|
+
* Selector verification (2026-06-08, via cast sig + bytecode grep on both impls):
|
|
9
|
+
* settleDeposit(uint256) 0xd24ca58a
|
|
10
|
+
* settleRedeem(uint256) 0xa627df66
|
|
11
|
+
* updateNewTotalAssets(uint256) 0xbcd1bf34
|
|
12
|
+
* expireTotalAssets() 0x927b15df
|
|
13
|
+
* pause() 0x8456cb59
|
|
14
|
+
* unpause() 0x3f4ba83a
|
|
15
|
+
* addToWhitelist(address[]) 0x7f649783
|
|
16
|
+
* revokeFromWhitelist(address[]) 0x86af6e68
|
|
17
|
+
* addToBlacklist(address[]) 0x935eb35f
|
|
18
|
+
* revokeFromBlacklist(address[]) 0x4cc724c2
|
|
19
|
+
* updateRates((uint16,uint16,uint16,uint16,uint16)) 0x0190b902
|
|
20
|
+
* updateWhitelistManager(address) 0xf1a76fcc
|
|
21
|
+
* updateValuationManager(address) 0x65ccfcef
|
|
22
|
+
* updateFeeReceiver(address) 0xc69bebe4
|
|
23
|
+
* updateSecurityCouncil(address) 0xdbfe3e96
|
|
24
|
+
* updateSuperOperator(address) 0x3a891d3b
|
|
25
|
+
*
|
|
26
|
+
* SDK-C additions (verified 2026-06-08, Arb impl 0x3f5A9e1D82c595d14bA93c97eB8a77928cFdee70):
|
|
27
|
+
* updateMaxCap(uint256) 0xe81ba080
|
|
28
|
+
* setSyncMode(uint8) 0x363d8de8
|
|
29
|
+
* updateTotalAssetsLifespan(uint128) 0xae16ea8c
|
|
30
|
+
* updateGuardrails((uint256,int256)) 0xced9a8de
|
|
31
|
+
* updateActivated(bool) 0xdc324cb2
|
|
32
|
+
* securityCouncilUpdateTotalAssets(uint256) 0xdeb337a5
|
|
33
|
+
* setExternalSanctionsList(address) 0x7de5c4f4
|
|
34
|
+
* lockUpdateSafe() 0x8c9881a9
|
|
35
|
+
* lockSuperOperator() 0x32c06a4e
|
|
36
|
+
* claimSharesOnBehalf(address[]) 0xf15be6f9
|
|
37
|
+
* claimAssetsOnBehalf(address[]) 0x26d6c82f
|
|
38
|
+
* updateName(string) 0x84da92a7
|
|
39
|
+
* updateSymbol(string) 0x537f5312
|
|
40
|
+
*
|
|
41
|
+
* Key v0.6 differences from v0.5:
|
|
42
|
+
* - updateRates takes a 5-field Rates struct (not 2 fields)
|
|
43
|
+
* - addToWhitelist / revokeFromWhitelist retained for Whitelist mode
|
|
44
|
+
* - addToBlacklist / revokeFromBlacklist are NEW (Blacklist mode)
|
|
45
|
+
* - updateSecurityCouncil and updateSuperOperator are NEW roles
|
|
46
|
+
*/
|
|
47
|
+
export default [
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
// Settler (Safe) functions
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
{
|
|
52
|
+
type: "function",
|
|
53
|
+
name: "settleDeposit",
|
|
54
|
+
inputs: [
|
|
55
|
+
{
|
|
56
|
+
name: "epoch",
|
|
57
|
+
type: "uint256",
|
|
58
|
+
internalType: "uint256",
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
outputs: [],
|
|
62
|
+
stateMutability: "nonpayable",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: "function",
|
|
66
|
+
name: "settleRedeem",
|
|
67
|
+
inputs: [
|
|
68
|
+
{
|
|
69
|
+
name: "epoch",
|
|
70
|
+
type: "uint256",
|
|
71
|
+
internalType: "uint256",
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
outputs: [],
|
|
75
|
+
stateMutability: "nonpayable",
|
|
76
|
+
},
|
|
77
|
+
// ---------------------------------------------------------------------------
|
|
78
|
+
// Valuation Manager functions
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
{
|
|
81
|
+
type: "function",
|
|
82
|
+
name: "updateNewTotalAssets",
|
|
83
|
+
inputs: [
|
|
84
|
+
{
|
|
85
|
+
name: "newTotalAssets",
|
|
86
|
+
type: "uint256",
|
|
87
|
+
internalType: "uint256",
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
outputs: [],
|
|
91
|
+
stateMutability: "nonpayable",
|
|
92
|
+
},
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
// Safe (NAV expiry) functions
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
{
|
|
97
|
+
type: "function",
|
|
98
|
+
name: "expireTotalAssets",
|
|
99
|
+
inputs: [],
|
|
100
|
+
outputs: [],
|
|
101
|
+
stateMutability: "nonpayable",
|
|
102
|
+
},
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
// Guardian / Owner functions
|
|
105
|
+
// ---------------------------------------------------------------------------
|
|
106
|
+
{
|
|
107
|
+
type: "function",
|
|
108
|
+
name: "pause",
|
|
109
|
+
inputs: [],
|
|
110
|
+
outputs: [],
|
|
111
|
+
stateMutability: "nonpayable",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: "function",
|
|
115
|
+
name: "unpause",
|
|
116
|
+
inputs: [],
|
|
117
|
+
outputs: [],
|
|
118
|
+
stateMutability: "nonpayable",
|
|
119
|
+
},
|
|
120
|
+
// ---------------------------------------------------------------------------
|
|
121
|
+
// Whitelist Manager — whitelist operations (Whitelist mode)
|
|
122
|
+
// ---------------------------------------------------------------------------
|
|
123
|
+
{
|
|
124
|
+
type: "function",
|
|
125
|
+
name: "addToWhitelist",
|
|
126
|
+
inputs: [
|
|
127
|
+
{
|
|
128
|
+
name: "accounts",
|
|
129
|
+
type: "address[]",
|
|
130
|
+
internalType: "address[]",
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
outputs: [],
|
|
134
|
+
stateMutability: "nonpayable",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: "function",
|
|
138
|
+
name: "revokeFromWhitelist",
|
|
139
|
+
inputs: [
|
|
140
|
+
{
|
|
141
|
+
name: "accounts",
|
|
142
|
+
type: "address[]",
|
|
143
|
+
internalType: "address[]",
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
outputs: [],
|
|
147
|
+
stateMutability: "nonpayable",
|
|
148
|
+
},
|
|
149
|
+
// ---------------------------------------------------------------------------
|
|
150
|
+
// Whitelist Manager — blacklist operations (Blacklist mode — NEW in v0.6)
|
|
151
|
+
// ---------------------------------------------------------------------------
|
|
152
|
+
{
|
|
153
|
+
type: "function",
|
|
154
|
+
name: "addToBlacklist",
|
|
155
|
+
inputs: [
|
|
156
|
+
{
|
|
157
|
+
name: "accounts",
|
|
158
|
+
type: "address[]",
|
|
159
|
+
internalType: "address[]",
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
outputs: [],
|
|
163
|
+
stateMutability: "nonpayable",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: "function",
|
|
167
|
+
name: "revokeFromBlacklist",
|
|
168
|
+
inputs: [
|
|
169
|
+
{
|
|
170
|
+
name: "accounts",
|
|
171
|
+
type: "address[]",
|
|
172
|
+
internalType: "address[]",
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
outputs: [],
|
|
176
|
+
stateMutability: "nonpayable",
|
|
177
|
+
},
|
|
178
|
+
// ---------------------------------------------------------------------------
|
|
179
|
+
// Admin — fee rate update (5-field Rates struct, NEW in v0.6)
|
|
180
|
+
// v0.5 had updateRates(uint16,uint16); v0.6 uses a tuple with 5 fields.
|
|
181
|
+
// ---------------------------------------------------------------------------
|
|
182
|
+
{
|
|
183
|
+
type: "function",
|
|
184
|
+
name: "updateRates",
|
|
185
|
+
inputs: [
|
|
186
|
+
{
|
|
187
|
+
name: "rates",
|
|
188
|
+
type: "tuple",
|
|
189
|
+
internalType: "struct Rates",
|
|
190
|
+
components: [
|
|
191
|
+
{
|
|
192
|
+
name: "managementRate",
|
|
193
|
+
type: "uint16",
|
|
194
|
+
internalType: "uint16",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: "performanceRate",
|
|
198
|
+
type: "uint16",
|
|
199
|
+
internalType: "uint16",
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "entryRate",
|
|
203
|
+
type: "uint16",
|
|
204
|
+
internalType: "uint16",
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: "exitRate",
|
|
208
|
+
type: "uint16",
|
|
209
|
+
internalType: "uint16",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "haircutRate",
|
|
213
|
+
type: "uint16",
|
|
214
|
+
internalType: "uint16",
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
outputs: [],
|
|
220
|
+
stateMutability: "nonpayable",
|
|
221
|
+
},
|
|
222
|
+
// ---------------------------------------------------------------------------
|
|
223
|
+
// Admin — role setters
|
|
224
|
+
// ---------------------------------------------------------------------------
|
|
225
|
+
{
|
|
226
|
+
type: "function",
|
|
227
|
+
name: "updateWhitelistManager",
|
|
228
|
+
inputs: [
|
|
229
|
+
{
|
|
230
|
+
name: "newWhitelistManager",
|
|
231
|
+
type: "address",
|
|
232
|
+
internalType: "address",
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
outputs: [],
|
|
236
|
+
stateMutability: "nonpayable",
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
type: "function",
|
|
240
|
+
name: "updateValuationManager",
|
|
241
|
+
inputs: [
|
|
242
|
+
{
|
|
243
|
+
name: "newValuationManager",
|
|
244
|
+
type: "address",
|
|
245
|
+
internalType: "address",
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
outputs: [],
|
|
249
|
+
stateMutability: "nonpayable",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
type: "function",
|
|
253
|
+
name: "updateFeeReceiver",
|
|
254
|
+
inputs: [
|
|
255
|
+
{
|
|
256
|
+
name: "newFeeReceiver",
|
|
257
|
+
type: "address",
|
|
258
|
+
internalType: "address",
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
outputs: [],
|
|
262
|
+
stateMutability: "nonpayable",
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
type: "function",
|
|
266
|
+
name: "updateSecurityCouncil",
|
|
267
|
+
inputs: [
|
|
268
|
+
{
|
|
269
|
+
name: "newSecurityCouncil",
|
|
270
|
+
type: "address",
|
|
271
|
+
internalType: "address",
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
outputs: [],
|
|
275
|
+
stateMutability: "nonpayable",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
type: "function",
|
|
279
|
+
name: "updateSuperOperator",
|
|
280
|
+
inputs: [
|
|
281
|
+
{
|
|
282
|
+
name: "newSuperOperator",
|
|
283
|
+
type: "address",
|
|
284
|
+
internalType: "address",
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
outputs: [],
|
|
288
|
+
stateMutability: "nonpayable",
|
|
289
|
+
},
|
|
290
|
+
// ---------------------------------------------------------------------------
|
|
291
|
+
// SDK-C additions: MaxCap, sync, guardrails, sanctions, kill-switches,
|
|
292
|
+
// batch claim, metadata (verified 2026-06-08)
|
|
293
|
+
// ---------------------------------------------------------------------------
|
|
294
|
+
|
|
295
|
+
// Admin — cap management
|
|
296
|
+
{
|
|
297
|
+
type: "function",
|
|
298
|
+
name: "updateMaxCap",
|
|
299
|
+
inputs: [
|
|
300
|
+
{
|
|
301
|
+
name: "maxCap",
|
|
302
|
+
type: "uint256",
|
|
303
|
+
internalType: "uint256",
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
outputs: [],
|
|
307
|
+
stateMutability: "nonpayable",
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
// Admin — sync configuration
|
|
311
|
+
{
|
|
312
|
+
type: "function",
|
|
313
|
+
name: "setSyncMode",
|
|
314
|
+
inputs: [
|
|
315
|
+
{
|
|
316
|
+
name: "syncMode",
|
|
317
|
+
type: "uint8",
|
|
318
|
+
internalType: "uint8",
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
outputs: [],
|
|
322
|
+
stateMutability: "nonpayable",
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
type: "function",
|
|
326
|
+
name: "updateTotalAssetsLifespan",
|
|
327
|
+
inputs: [
|
|
328
|
+
{
|
|
329
|
+
name: "lifespan",
|
|
330
|
+
type: "uint128",
|
|
331
|
+
internalType: "uint128",
|
|
332
|
+
},
|
|
333
|
+
],
|
|
334
|
+
outputs: [],
|
|
335
|
+
stateMutability: "nonpayable",
|
|
336
|
+
},
|
|
337
|
+
|
|
338
|
+
// Admin — guardrails
|
|
339
|
+
{
|
|
340
|
+
type: "function",
|
|
341
|
+
name: "updateGuardrails",
|
|
342
|
+
inputs: [
|
|
343
|
+
{
|
|
344
|
+
name: "guardrails",
|
|
345
|
+
type: "tuple",
|
|
346
|
+
internalType: "struct Guardrails",
|
|
347
|
+
components: [
|
|
348
|
+
{
|
|
349
|
+
name: "upperRate",
|
|
350
|
+
type: "uint256",
|
|
351
|
+
internalType: "uint256",
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
name: "lowerRate",
|
|
355
|
+
type: "int256",
|
|
356
|
+
internalType: "int256",
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
outputs: [],
|
|
362
|
+
stateMutability: "nonpayable",
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
type: "function",
|
|
366
|
+
name: "updateActivated",
|
|
367
|
+
inputs: [
|
|
368
|
+
{
|
|
369
|
+
name: "activated",
|
|
370
|
+
type: "bool",
|
|
371
|
+
internalType: "bool",
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
outputs: [],
|
|
375
|
+
stateMutability: "nonpayable",
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
// Security Council — guardrail bypass NAV update
|
|
379
|
+
{
|
|
380
|
+
type: "function",
|
|
381
|
+
name: "securityCouncilUpdateTotalAssets",
|
|
382
|
+
inputs: [
|
|
383
|
+
{
|
|
384
|
+
name: "newTotalAssets",
|
|
385
|
+
type: "uint256",
|
|
386
|
+
internalType: "uint256",
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
outputs: [],
|
|
390
|
+
stateMutability: "nonpayable",
|
|
391
|
+
},
|
|
392
|
+
|
|
393
|
+
// Admin — sanctions list
|
|
394
|
+
{
|
|
395
|
+
type: "function",
|
|
396
|
+
name: "setExternalSanctionsList",
|
|
397
|
+
inputs: [
|
|
398
|
+
{
|
|
399
|
+
name: "sanctionsList",
|
|
400
|
+
type: "address",
|
|
401
|
+
internalType: "address",
|
|
402
|
+
},
|
|
403
|
+
],
|
|
404
|
+
outputs: [],
|
|
405
|
+
stateMutability: "nonpayable",
|
|
406
|
+
},
|
|
407
|
+
|
|
408
|
+
// Admin — one-way kill-switches
|
|
409
|
+
{
|
|
410
|
+
type: "function",
|
|
411
|
+
name: "lockUpdateSafe",
|
|
412
|
+
inputs: [],
|
|
413
|
+
outputs: [],
|
|
414
|
+
stateMutability: "nonpayable",
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
type: "function",
|
|
418
|
+
name: "lockSuperOperator",
|
|
419
|
+
inputs: [],
|
|
420
|
+
outputs: [],
|
|
421
|
+
stateMutability: "nonpayable",
|
|
422
|
+
},
|
|
423
|
+
|
|
424
|
+
// Super Operator — batch claim on behalf of depositors/redeemers
|
|
425
|
+
{
|
|
426
|
+
type: "function",
|
|
427
|
+
name: "claimSharesOnBehalf",
|
|
428
|
+
inputs: [
|
|
429
|
+
{
|
|
430
|
+
name: "receivers",
|
|
431
|
+
type: "address[]",
|
|
432
|
+
internalType: "address[]",
|
|
433
|
+
},
|
|
434
|
+
],
|
|
435
|
+
outputs: [],
|
|
436
|
+
stateMutability: "nonpayable",
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
type: "function",
|
|
440
|
+
name: "claimAssetsOnBehalf",
|
|
441
|
+
inputs: [
|
|
442
|
+
{
|
|
443
|
+
name: "receivers",
|
|
444
|
+
type: "address[]",
|
|
445
|
+
internalType: "address[]",
|
|
446
|
+
},
|
|
447
|
+
],
|
|
448
|
+
outputs: [],
|
|
449
|
+
stateMutability: "nonpayable",
|
|
450
|
+
},
|
|
451
|
+
|
|
452
|
+
// Admin — vault metadata
|
|
453
|
+
{
|
|
454
|
+
type: "function",
|
|
455
|
+
name: "updateName",
|
|
456
|
+
inputs: [
|
|
457
|
+
{
|
|
458
|
+
name: "name",
|
|
459
|
+
type: "string",
|
|
460
|
+
internalType: "string",
|
|
461
|
+
},
|
|
462
|
+
],
|
|
463
|
+
outputs: [],
|
|
464
|
+
stateMutability: "nonpayable",
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
type: "function",
|
|
468
|
+
name: "updateSymbol",
|
|
469
|
+
inputs: [
|
|
470
|
+
{
|
|
471
|
+
name: "symbol",
|
|
472
|
+
type: "string",
|
|
473
|
+
internalType: "string",
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
outputs: [],
|
|
477
|
+
stateMutability: "nonpayable",
|
|
478
|
+
},
|
|
479
|
+
] as const;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
2
|
import MorphoVaultAbi from "./morpho.vault.abi";
|
|
3
|
+
import { MorphoVaultV2Abi } from "./morpho.vault.v2.abi";
|
|
3
4
|
import type { Address } from "viem";
|
|
4
5
|
import type { HexString, Unwrapable, Call } from "../../types";
|
|
5
6
|
import { createCall } from "../../types";
|
|
6
7
|
|
|
7
8
|
const morphoVaultInterface = new ethers.utils.Interface(MorphoVaultAbi);
|
|
9
|
+
const morphoVaultV2Interface = new ethers.utils.Interface(MorphoVaultV2Abi);
|
|
8
10
|
|
|
9
11
|
// ============================================================================
|
|
10
12
|
// Deposit (ERC4626)
|
|
@@ -138,3 +140,46 @@ export const WithdrawMorphoVaultCalldata = RedeemMorphoVaultCalldata;
|
|
|
138
140
|
* is the correct ERC4626 method for shares-based withdrawals.
|
|
139
141
|
*/
|
|
140
142
|
export const withdrawMorphoVaultTrx = redeemMorphoVaultTrx;
|
|
143
|
+
|
|
144
|
+
// ============================================================================
|
|
145
|
+
// Force Deallocate (Morpho Vault V2 only)
|
|
146
|
+
//
|
|
147
|
+
// `forceDeallocate(adapter, data, assets, onBehalf)` pays the curator-set
|
|
148
|
+
// `forceDeallocatePenalty(adapter)` and pulls `assets` worth of underlying
|
|
149
|
+
// from the named adapter back to vault idle. Caller-supplied `data` is
|
|
150
|
+
// adapter-specific (often empty bytes `0x`); `onBehalf` is typically the
|
|
151
|
+
// avatar safe (the LP whose position absorbs the penalty).
|
|
152
|
+
//
|
|
153
|
+
// V2-only — calling this against a V1 vault reverts (function not present).
|
|
154
|
+
// ============================================================================
|
|
155
|
+
|
|
156
|
+
export type ForceDeallocateMorphoVaultArgs = Readonly<{
|
|
157
|
+
adapter: Address;
|
|
158
|
+
data: HexString;
|
|
159
|
+
assets: bigint;
|
|
160
|
+
onBehalf: Address;
|
|
161
|
+
}>;
|
|
162
|
+
|
|
163
|
+
export const ForceDeallocateMorphoVaultCalldata = ({
|
|
164
|
+
adapter,
|
|
165
|
+
data,
|
|
166
|
+
assets,
|
|
167
|
+
onBehalf,
|
|
168
|
+
}: ForceDeallocateMorphoVaultArgs): HexString => {
|
|
169
|
+
return morphoVaultV2Interface.encodeFunctionData("forceDeallocate", [adapter, data, assets, onBehalf]) as HexString;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export const forceDeallocateMorphoVaultTrx = ({
|
|
173
|
+
args,
|
|
174
|
+
morphoVaultAddress,
|
|
175
|
+
}: {
|
|
176
|
+
args: ForceDeallocateMorphoVaultArgs;
|
|
177
|
+
morphoVaultAddress: Address;
|
|
178
|
+
}): Unwrapable<Call> => {
|
|
179
|
+
return createCall({
|
|
180
|
+
operation: 0,
|
|
181
|
+
to: morphoVaultAddress,
|
|
182
|
+
value: 0n,
|
|
183
|
+
data: ForceDeallocateMorphoVaultCalldata(args),
|
|
184
|
+
});
|
|
185
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Morpho Vault V2-only ABI fragments. These are not present on V1 vaults.
|
|
3
|
+
*
|
|
4
|
+
* `forceDeallocate(adapter, data, assets, onBehalf)` is the LP escape hatch
|
|
5
|
+
* — it pays the curator-set `forceDeallocatePenalty(adapter)` and pulls
|
|
6
|
+
* `assets` worth of underlying out of the named adapter back to vault idle.
|
|
7
|
+
* V2 vaults expose this so a depositor can force liquidity from a single
|
|
8
|
+
* adapter without waiting for the curator's reallocation.
|
|
9
|
+
*/
|
|
10
|
+
export const MorphoVaultV2Abi = [
|
|
11
|
+
{
|
|
12
|
+
inputs: [
|
|
13
|
+
{ internalType: "address", name: "adapter", type: "address" },
|
|
14
|
+
{ internalType: "bytes", name: "data", type: "bytes" },
|
|
15
|
+
{ internalType: "uint256", name: "assets", type: "uint256" },
|
|
16
|
+
{ internalType: "address", name: "onBehalf", type: "address" },
|
|
17
|
+
],
|
|
18
|
+
name: "forceDeallocate",
|
|
19
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
20
|
+
stateMutability: "nonpayable",
|
|
21
|
+
type: "function",
|
|
22
|
+
},
|
|
23
|
+
] as const;
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"positionManager": "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
|
|
9
9
|
},
|
|
10
10
|
"lagoonV0_5": {
|
|
11
|
-
"factory": "
|
|
11
|
+
"factory": "0x9De724B0efEe0FbA07FE21a16B9Bf9bBb5204Fb4",
|
|
12
|
+
"legacyBeaconFactory": "0x58a7729125acA9e5E9C687018E66bfDd5b2D4490",
|
|
12
13
|
"registry": "0x6dA4D1859bA1d02D095D2246142CdAd52233e27C",
|
|
13
14
|
"vaultImpl": "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf"
|
|
14
15
|
},
|
|
@@ -480,7 +481,8 @@
|
|
|
480
481
|
"routerV2": "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"
|
|
481
482
|
},
|
|
482
483
|
"lagoonV0_5": {
|
|
483
|
-
"factory": "
|
|
484
|
+
"factory": "0x8D6f5479B14348186faE9BC7E636e947c260f9B1",
|
|
485
|
+
"legacyBeaconFactory": "0x09C8803f7Dc251f9FaAE5f56E3B91f8A6d0b70ee",
|
|
484
486
|
"vaultImpl": "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
|
|
485
487
|
"registry": "0x6dA4D1859bA1d02D095D2246142CdAd52233e27C"
|
|
486
488
|
},
|