@gitmyabi/yspendle-lpt 1.0.0
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/README.md +108 -0
- package/contracts/PendleLPCompounder_json.d.ts +1675 -0
- package/contracts/PendleLPCompounder_json.js +1575 -0
- package/contracts/PendleLPCompounder_json.ts +2181 -0
- package/contracts/TokenizedStrategy_json.d.ts +2144 -0
- package/contracts/TokenizedStrategy_json.js +2338 -0
- package/contracts/TokenizedStrategy_json.ts +2872 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,2872 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TokenizedStrategy_json ABI
|
|
6
|
+
*
|
|
7
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
8
|
+
*/
|
|
9
|
+
export const TokenizedStrategy_jsonAbi = [
|
|
10
|
+
{
|
|
11
|
+
"inputs": [
|
|
12
|
+
{
|
|
13
|
+
"internalType": "address",
|
|
14
|
+
"name": "_factory",
|
|
15
|
+
"type": "address"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"stateMutability": "nonpayable",
|
|
19
|
+
"type": "constructor"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"anonymous": false,
|
|
23
|
+
"inputs": [
|
|
24
|
+
{
|
|
25
|
+
"indexed": true,
|
|
26
|
+
"internalType": "address",
|
|
27
|
+
"name": "owner",
|
|
28
|
+
"type": "address"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"indexed": true,
|
|
32
|
+
"internalType": "address",
|
|
33
|
+
"name": "spender",
|
|
34
|
+
"type": "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"indexed": false,
|
|
38
|
+
"internalType": "uint256",
|
|
39
|
+
"name": "value",
|
|
40
|
+
"type": "uint256"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"name": "Approval",
|
|
44
|
+
"type": "event"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"anonymous": false,
|
|
48
|
+
"inputs": [
|
|
49
|
+
{
|
|
50
|
+
"indexed": true,
|
|
51
|
+
"internalType": "address",
|
|
52
|
+
"name": "caller",
|
|
53
|
+
"type": "address"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"indexed": true,
|
|
57
|
+
"internalType": "address",
|
|
58
|
+
"name": "owner",
|
|
59
|
+
"type": "address"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"indexed": false,
|
|
63
|
+
"internalType": "uint256",
|
|
64
|
+
"name": "assets",
|
|
65
|
+
"type": "uint256"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"indexed": false,
|
|
69
|
+
"internalType": "uint256",
|
|
70
|
+
"name": "shares",
|
|
71
|
+
"type": "uint256"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"name": "Deposit",
|
|
75
|
+
"type": "event"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"anonymous": false,
|
|
79
|
+
"inputs": [
|
|
80
|
+
{
|
|
81
|
+
"indexed": true,
|
|
82
|
+
"internalType": "address",
|
|
83
|
+
"name": "strategy",
|
|
84
|
+
"type": "address"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"indexed": true,
|
|
88
|
+
"internalType": "address",
|
|
89
|
+
"name": "asset",
|
|
90
|
+
"type": "address"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"indexed": false,
|
|
94
|
+
"internalType": "string",
|
|
95
|
+
"name": "apiVersion",
|
|
96
|
+
"type": "string"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"name": "NewTokenizedStrategy",
|
|
100
|
+
"type": "event"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"anonymous": false,
|
|
104
|
+
"inputs": [
|
|
105
|
+
{
|
|
106
|
+
"indexed": false,
|
|
107
|
+
"internalType": "uint256",
|
|
108
|
+
"name": "profit",
|
|
109
|
+
"type": "uint256"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"indexed": false,
|
|
113
|
+
"internalType": "uint256",
|
|
114
|
+
"name": "loss",
|
|
115
|
+
"type": "uint256"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"indexed": false,
|
|
119
|
+
"internalType": "uint256",
|
|
120
|
+
"name": "protocolFees",
|
|
121
|
+
"type": "uint256"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"indexed": false,
|
|
125
|
+
"internalType": "uint256",
|
|
126
|
+
"name": "performanceFees",
|
|
127
|
+
"type": "uint256"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"name": "Reported",
|
|
131
|
+
"type": "event"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"anonymous": false,
|
|
135
|
+
"inputs": [],
|
|
136
|
+
"name": "StrategyShutdown",
|
|
137
|
+
"type": "event"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"anonymous": false,
|
|
141
|
+
"inputs": [
|
|
142
|
+
{
|
|
143
|
+
"indexed": true,
|
|
144
|
+
"internalType": "address",
|
|
145
|
+
"name": "from",
|
|
146
|
+
"type": "address"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"indexed": true,
|
|
150
|
+
"internalType": "address",
|
|
151
|
+
"name": "to",
|
|
152
|
+
"type": "address"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"indexed": false,
|
|
156
|
+
"internalType": "uint256",
|
|
157
|
+
"name": "value",
|
|
158
|
+
"type": "uint256"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"name": "Transfer",
|
|
162
|
+
"type": "event"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"anonymous": false,
|
|
166
|
+
"inputs": [
|
|
167
|
+
{
|
|
168
|
+
"indexed": true,
|
|
169
|
+
"internalType": "address",
|
|
170
|
+
"name": "newEmergencyAdmin",
|
|
171
|
+
"type": "address"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"name": "UpdateEmergencyAdmin",
|
|
175
|
+
"type": "event"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"anonymous": false,
|
|
179
|
+
"inputs": [
|
|
180
|
+
{
|
|
181
|
+
"indexed": true,
|
|
182
|
+
"internalType": "address",
|
|
183
|
+
"name": "newKeeper",
|
|
184
|
+
"type": "address"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"name": "UpdateKeeper",
|
|
188
|
+
"type": "event"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"anonymous": false,
|
|
192
|
+
"inputs": [
|
|
193
|
+
{
|
|
194
|
+
"indexed": true,
|
|
195
|
+
"internalType": "address",
|
|
196
|
+
"name": "newManagement",
|
|
197
|
+
"type": "address"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"name": "UpdateManagement",
|
|
201
|
+
"type": "event"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"anonymous": false,
|
|
205
|
+
"inputs": [
|
|
206
|
+
{
|
|
207
|
+
"indexed": true,
|
|
208
|
+
"internalType": "address",
|
|
209
|
+
"name": "newPendingManagement",
|
|
210
|
+
"type": "address"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"name": "UpdatePendingManagement",
|
|
214
|
+
"type": "event"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"anonymous": false,
|
|
218
|
+
"inputs": [
|
|
219
|
+
{
|
|
220
|
+
"indexed": false,
|
|
221
|
+
"internalType": "uint16",
|
|
222
|
+
"name": "newPerformanceFee",
|
|
223
|
+
"type": "uint16"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"name": "UpdatePerformanceFee",
|
|
227
|
+
"type": "event"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"anonymous": false,
|
|
231
|
+
"inputs": [
|
|
232
|
+
{
|
|
233
|
+
"indexed": true,
|
|
234
|
+
"internalType": "address",
|
|
235
|
+
"name": "newPerformanceFeeRecipient",
|
|
236
|
+
"type": "address"
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"name": "UpdatePerformanceFeeRecipient",
|
|
240
|
+
"type": "event"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"anonymous": false,
|
|
244
|
+
"inputs": [
|
|
245
|
+
{
|
|
246
|
+
"indexed": false,
|
|
247
|
+
"internalType": "uint256",
|
|
248
|
+
"name": "newProfitMaxUnlockTime",
|
|
249
|
+
"type": "uint256"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"name": "UpdateProfitMaxUnlockTime",
|
|
253
|
+
"type": "event"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"anonymous": false,
|
|
257
|
+
"inputs": [
|
|
258
|
+
{
|
|
259
|
+
"indexed": true,
|
|
260
|
+
"internalType": "address",
|
|
261
|
+
"name": "caller",
|
|
262
|
+
"type": "address"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"indexed": true,
|
|
266
|
+
"internalType": "address",
|
|
267
|
+
"name": "receiver",
|
|
268
|
+
"type": "address"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"indexed": true,
|
|
272
|
+
"internalType": "address",
|
|
273
|
+
"name": "owner",
|
|
274
|
+
"type": "address"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"indexed": false,
|
|
278
|
+
"internalType": "uint256",
|
|
279
|
+
"name": "assets",
|
|
280
|
+
"type": "uint256"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"indexed": false,
|
|
284
|
+
"internalType": "uint256",
|
|
285
|
+
"name": "shares",
|
|
286
|
+
"type": "uint256"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"name": "Withdraw",
|
|
290
|
+
"type": "event"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"inputs": [],
|
|
294
|
+
"name": "DOMAIN_SEPARATOR",
|
|
295
|
+
"outputs": [
|
|
296
|
+
{
|
|
297
|
+
"internalType": "bytes32",
|
|
298
|
+
"name": "",
|
|
299
|
+
"type": "bytes32"
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
"stateMutability": "view",
|
|
303
|
+
"type": "function"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"inputs": [],
|
|
307
|
+
"name": "FACTORY",
|
|
308
|
+
"outputs": [
|
|
309
|
+
{
|
|
310
|
+
"internalType": "address",
|
|
311
|
+
"name": "",
|
|
312
|
+
"type": "address"
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
"stateMutability": "view",
|
|
316
|
+
"type": "function"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"inputs": [],
|
|
320
|
+
"name": "MAX_FEE",
|
|
321
|
+
"outputs": [
|
|
322
|
+
{
|
|
323
|
+
"internalType": "uint16",
|
|
324
|
+
"name": "",
|
|
325
|
+
"type": "uint16"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"stateMutability": "view",
|
|
329
|
+
"type": "function"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"inputs": [],
|
|
333
|
+
"name": "acceptManagement",
|
|
334
|
+
"outputs": [],
|
|
335
|
+
"stateMutability": "nonpayable",
|
|
336
|
+
"type": "function"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"inputs": [
|
|
340
|
+
{
|
|
341
|
+
"internalType": "address",
|
|
342
|
+
"name": "owner",
|
|
343
|
+
"type": "address"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"internalType": "address",
|
|
347
|
+
"name": "spender",
|
|
348
|
+
"type": "address"
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"name": "allowance",
|
|
352
|
+
"outputs": [
|
|
353
|
+
{
|
|
354
|
+
"internalType": "uint256",
|
|
355
|
+
"name": "",
|
|
356
|
+
"type": "uint256"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"stateMutability": "view",
|
|
360
|
+
"type": "function"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"inputs": [],
|
|
364
|
+
"name": "apiVersion",
|
|
365
|
+
"outputs": [
|
|
366
|
+
{
|
|
367
|
+
"internalType": "string",
|
|
368
|
+
"name": "",
|
|
369
|
+
"type": "string"
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"stateMutability": "pure",
|
|
373
|
+
"type": "function"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"inputs": [
|
|
377
|
+
{
|
|
378
|
+
"internalType": "address",
|
|
379
|
+
"name": "spender",
|
|
380
|
+
"type": "address"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"internalType": "uint256",
|
|
384
|
+
"name": "amount",
|
|
385
|
+
"type": "uint256"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"name": "approve",
|
|
389
|
+
"outputs": [
|
|
390
|
+
{
|
|
391
|
+
"internalType": "bool",
|
|
392
|
+
"name": "",
|
|
393
|
+
"type": "bool"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"stateMutability": "nonpayable",
|
|
397
|
+
"type": "function"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"inputs": [],
|
|
401
|
+
"name": "asset",
|
|
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
|
+
"internalType": "address",
|
|
416
|
+
"name": "account",
|
|
417
|
+
"type": "address"
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"name": "balanceOf",
|
|
421
|
+
"outputs": [
|
|
422
|
+
{
|
|
423
|
+
"internalType": "uint256",
|
|
424
|
+
"name": "",
|
|
425
|
+
"type": "uint256"
|
|
426
|
+
}
|
|
427
|
+
],
|
|
428
|
+
"stateMutability": "view",
|
|
429
|
+
"type": "function"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"inputs": [
|
|
433
|
+
{
|
|
434
|
+
"internalType": "uint256",
|
|
435
|
+
"name": "shares",
|
|
436
|
+
"type": "uint256"
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
"name": "convertToAssets",
|
|
440
|
+
"outputs": [
|
|
441
|
+
{
|
|
442
|
+
"internalType": "uint256",
|
|
443
|
+
"name": "",
|
|
444
|
+
"type": "uint256"
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"stateMutability": "view",
|
|
448
|
+
"type": "function"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"inputs": [
|
|
452
|
+
{
|
|
453
|
+
"internalType": "uint256",
|
|
454
|
+
"name": "assets",
|
|
455
|
+
"type": "uint256"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"name": "convertToShares",
|
|
459
|
+
"outputs": [
|
|
460
|
+
{
|
|
461
|
+
"internalType": "uint256",
|
|
462
|
+
"name": "",
|
|
463
|
+
"type": "uint256"
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
"stateMutability": "view",
|
|
467
|
+
"type": "function"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"inputs": [],
|
|
471
|
+
"name": "decimals",
|
|
472
|
+
"outputs": [
|
|
473
|
+
{
|
|
474
|
+
"internalType": "uint8",
|
|
475
|
+
"name": "",
|
|
476
|
+
"type": "uint8"
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"stateMutability": "view",
|
|
480
|
+
"type": "function"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"inputs": [
|
|
484
|
+
{
|
|
485
|
+
"internalType": "uint256",
|
|
486
|
+
"name": "assets",
|
|
487
|
+
"type": "uint256"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"internalType": "address",
|
|
491
|
+
"name": "receiver",
|
|
492
|
+
"type": "address"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
"name": "deposit",
|
|
496
|
+
"outputs": [
|
|
497
|
+
{
|
|
498
|
+
"internalType": "uint256",
|
|
499
|
+
"name": "shares",
|
|
500
|
+
"type": "uint256"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
"stateMutability": "nonpayable",
|
|
504
|
+
"type": "function"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"inputs": [],
|
|
508
|
+
"name": "emergencyAdmin",
|
|
509
|
+
"outputs": [
|
|
510
|
+
{
|
|
511
|
+
"internalType": "address",
|
|
512
|
+
"name": "",
|
|
513
|
+
"type": "address"
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"stateMutability": "view",
|
|
517
|
+
"type": "function"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"inputs": [
|
|
521
|
+
{
|
|
522
|
+
"internalType": "uint256",
|
|
523
|
+
"name": "amount",
|
|
524
|
+
"type": "uint256"
|
|
525
|
+
}
|
|
526
|
+
],
|
|
527
|
+
"name": "emergencyWithdraw",
|
|
528
|
+
"outputs": [],
|
|
529
|
+
"stateMutability": "nonpayable",
|
|
530
|
+
"type": "function"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"inputs": [],
|
|
534
|
+
"name": "fullProfitUnlockDate",
|
|
535
|
+
"outputs": [
|
|
536
|
+
{
|
|
537
|
+
"internalType": "uint256",
|
|
538
|
+
"name": "",
|
|
539
|
+
"type": "uint256"
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
"stateMutability": "view",
|
|
543
|
+
"type": "function"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"inputs": [
|
|
547
|
+
{
|
|
548
|
+
"internalType": "address",
|
|
549
|
+
"name": "_asset",
|
|
550
|
+
"type": "address"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"internalType": "string",
|
|
554
|
+
"name": "_name",
|
|
555
|
+
"type": "string"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"internalType": "address",
|
|
559
|
+
"name": "_management",
|
|
560
|
+
"type": "address"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"internalType": "address",
|
|
564
|
+
"name": "_performanceFeeRecipient",
|
|
565
|
+
"type": "address"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"internalType": "address",
|
|
569
|
+
"name": "_keeper",
|
|
570
|
+
"type": "address"
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
"name": "initialize",
|
|
574
|
+
"outputs": [],
|
|
575
|
+
"stateMutability": "nonpayable",
|
|
576
|
+
"type": "function"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"inputs": [],
|
|
580
|
+
"name": "isShutdown",
|
|
581
|
+
"outputs": [
|
|
582
|
+
{
|
|
583
|
+
"internalType": "bool",
|
|
584
|
+
"name": "",
|
|
585
|
+
"type": "bool"
|
|
586
|
+
}
|
|
587
|
+
],
|
|
588
|
+
"stateMutability": "view",
|
|
589
|
+
"type": "function"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"inputs": [],
|
|
593
|
+
"name": "keeper",
|
|
594
|
+
"outputs": [
|
|
595
|
+
{
|
|
596
|
+
"internalType": "address",
|
|
597
|
+
"name": "",
|
|
598
|
+
"type": "address"
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
"stateMutability": "view",
|
|
602
|
+
"type": "function"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"inputs": [],
|
|
606
|
+
"name": "lastReport",
|
|
607
|
+
"outputs": [
|
|
608
|
+
{
|
|
609
|
+
"internalType": "uint256",
|
|
610
|
+
"name": "",
|
|
611
|
+
"type": "uint256"
|
|
612
|
+
}
|
|
613
|
+
],
|
|
614
|
+
"stateMutability": "view",
|
|
615
|
+
"type": "function"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"inputs": [],
|
|
619
|
+
"name": "management",
|
|
620
|
+
"outputs": [
|
|
621
|
+
{
|
|
622
|
+
"internalType": "address",
|
|
623
|
+
"name": "",
|
|
624
|
+
"type": "address"
|
|
625
|
+
}
|
|
626
|
+
],
|
|
627
|
+
"stateMutability": "view",
|
|
628
|
+
"type": "function"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"inputs": [
|
|
632
|
+
{
|
|
633
|
+
"internalType": "address",
|
|
634
|
+
"name": "owner",
|
|
635
|
+
"type": "address"
|
|
636
|
+
}
|
|
637
|
+
],
|
|
638
|
+
"name": "maxDeposit",
|
|
639
|
+
"outputs": [
|
|
640
|
+
{
|
|
641
|
+
"internalType": "uint256",
|
|
642
|
+
"name": "",
|
|
643
|
+
"type": "uint256"
|
|
644
|
+
}
|
|
645
|
+
],
|
|
646
|
+
"stateMutability": "view",
|
|
647
|
+
"type": "function"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"inputs": [
|
|
651
|
+
{
|
|
652
|
+
"internalType": "address",
|
|
653
|
+
"name": "owner",
|
|
654
|
+
"type": "address"
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
"name": "maxMint",
|
|
658
|
+
"outputs": [
|
|
659
|
+
{
|
|
660
|
+
"internalType": "uint256",
|
|
661
|
+
"name": "",
|
|
662
|
+
"type": "uint256"
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
"stateMutability": "view",
|
|
666
|
+
"type": "function"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"inputs": [
|
|
670
|
+
{
|
|
671
|
+
"internalType": "address",
|
|
672
|
+
"name": "owner",
|
|
673
|
+
"type": "address"
|
|
674
|
+
}
|
|
675
|
+
],
|
|
676
|
+
"name": "maxRedeem",
|
|
677
|
+
"outputs": [
|
|
678
|
+
{
|
|
679
|
+
"internalType": "uint256",
|
|
680
|
+
"name": "",
|
|
681
|
+
"type": "uint256"
|
|
682
|
+
}
|
|
683
|
+
],
|
|
684
|
+
"stateMutability": "view",
|
|
685
|
+
"type": "function"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"inputs": [
|
|
689
|
+
{
|
|
690
|
+
"internalType": "address",
|
|
691
|
+
"name": "owner",
|
|
692
|
+
"type": "address"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"name": "maxWithdraw",
|
|
696
|
+
"outputs": [
|
|
697
|
+
{
|
|
698
|
+
"internalType": "uint256",
|
|
699
|
+
"name": "",
|
|
700
|
+
"type": "uint256"
|
|
701
|
+
}
|
|
702
|
+
],
|
|
703
|
+
"stateMutability": "view",
|
|
704
|
+
"type": "function"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"inputs": [
|
|
708
|
+
{
|
|
709
|
+
"internalType": "uint256",
|
|
710
|
+
"name": "shares",
|
|
711
|
+
"type": "uint256"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"internalType": "address",
|
|
715
|
+
"name": "receiver",
|
|
716
|
+
"type": "address"
|
|
717
|
+
}
|
|
718
|
+
],
|
|
719
|
+
"name": "mint",
|
|
720
|
+
"outputs": [
|
|
721
|
+
{
|
|
722
|
+
"internalType": "uint256",
|
|
723
|
+
"name": "assets",
|
|
724
|
+
"type": "uint256"
|
|
725
|
+
}
|
|
726
|
+
],
|
|
727
|
+
"stateMutability": "nonpayable",
|
|
728
|
+
"type": "function"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"inputs": [],
|
|
732
|
+
"name": "name",
|
|
733
|
+
"outputs": [
|
|
734
|
+
{
|
|
735
|
+
"internalType": "string",
|
|
736
|
+
"name": "",
|
|
737
|
+
"type": "string"
|
|
738
|
+
}
|
|
739
|
+
],
|
|
740
|
+
"stateMutability": "view",
|
|
741
|
+
"type": "function"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"inputs": [
|
|
745
|
+
{
|
|
746
|
+
"internalType": "address",
|
|
747
|
+
"name": "_owner",
|
|
748
|
+
"type": "address"
|
|
749
|
+
}
|
|
750
|
+
],
|
|
751
|
+
"name": "nonces",
|
|
752
|
+
"outputs": [
|
|
753
|
+
{
|
|
754
|
+
"internalType": "uint256",
|
|
755
|
+
"name": "",
|
|
756
|
+
"type": "uint256"
|
|
757
|
+
}
|
|
758
|
+
],
|
|
759
|
+
"stateMutability": "view",
|
|
760
|
+
"type": "function"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"inputs": [],
|
|
764
|
+
"name": "pendingManagement",
|
|
765
|
+
"outputs": [
|
|
766
|
+
{
|
|
767
|
+
"internalType": "address",
|
|
768
|
+
"name": "",
|
|
769
|
+
"type": "address"
|
|
770
|
+
}
|
|
771
|
+
],
|
|
772
|
+
"stateMutability": "view",
|
|
773
|
+
"type": "function"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"inputs": [],
|
|
777
|
+
"name": "performanceFee",
|
|
778
|
+
"outputs": [
|
|
779
|
+
{
|
|
780
|
+
"internalType": "uint16",
|
|
781
|
+
"name": "",
|
|
782
|
+
"type": "uint16"
|
|
783
|
+
}
|
|
784
|
+
],
|
|
785
|
+
"stateMutability": "view",
|
|
786
|
+
"type": "function"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"inputs": [],
|
|
790
|
+
"name": "performanceFeeRecipient",
|
|
791
|
+
"outputs": [
|
|
792
|
+
{
|
|
793
|
+
"internalType": "address",
|
|
794
|
+
"name": "",
|
|
795
|
+
"type": "address"
|
|
796
|
+
}
|
|
797
|
+
],
|
|
798
|
+
"stateMutability": "view",
|
|
799
|
+
"type": "function"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"inputs": [
|
|
803
|
+
{
|
|
804
|
+
"internalType": "address",
|
|
805
|
+
"name": "owner",
|
|
806
|
+
"type": "address"
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"internalType": "address",
|
|
810
|
+
"name": "spender",
|
|
811
|
+
"type": "address"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"internalType": "uint256",
|
|
815
|
+
"name": "value",
|
|
816
|
+
"type": "uint256"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"internalType": "uint256",
|
|
820
|
+
"name": "deadline",
|
|
821
|
+
"type": "uint256"
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"internalType": "uint8",
|
|
825
|
+
"name": "v",
|
|
826
|
+
"type": "uint8"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"internalType": "bytes32",
|
|
830
|
+
"name": "r",
|
|
831
|
+
"type": "bytes32"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"internalType": "bytes32",
|
|
835
|
+
"name": "s",
|
|
836
|
+
"type": "bytes32"
|
|
837
|
+
}
|
|
838
|
+
],
|
|
839
|
+
"name": "permit",
|
|
840
|
+
"outputs": [],
|
|
841
|
+
"stateMutability": "nonpayable",
|
|
842
|
+
"type": "function"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"inputs": [
|
|
846
|
+
{
|
|
847
|
+
"internalType": "uint256",
|
|
848
|
+
"name": "assets",
|
|
849
|
+
"type": "uint256"
|
|
850
|
+
}
|
|
851
|
+
],
|
|
852
|
+
"name": "previewDeposit",
|
|
853
|
+
"outputs": [
|
|
854
|
+
{
|
|
855
|
+
"internalType": "uint256",
|
|
856
|
+
"name": "",
|
|
857
|
+
"type": "uint256"
|
|
858
|
+
}
|
|
859
|
+
],
|
|
860
|
+
"stateMutability": "view",
|
|
861
|
+
"type": "function"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"inputs": [
|
|
865
|
+
{
|
|
866
|
+
"internalType": "uint256",
|
|
867
|
+
"name": "shares",
|
|
868
|
+
"type": "uint256"
|
|
869
|
+
}
|
|
870
|
+
],
|
|
871
|
+
"name": "previewMint",
|
|
872
|
+
"outputs": [
|
|
873
|
+
{
|
|
874
|
+
"internalType": "uint256",
|
|
875
|
+
"name": "",
|
|
876
|
+
"type": "uint256"
|
|
877
|
+
}
|
|
878
|
+
],
|
|
879
|
+
"stateMutability": "view",
|
|
880
|
+
"type": "function"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"inputs": [
|
|
884
|
+
{
|
|
885
|
+
"internalType": "uint256",
|
|
886
|
+
"name": "shares",
|
|
887
|
+
"type": "uint256"
|
|
888
|
+
}
|
|
889
|
+
],
|
|
890
|
+
"name": "previewRedeem",
|
|
891
|
+
"outputs": [
|
|
892
|
+
{
|
|
893
|
+
"internalType": "uint256",
|
|
894
|
+
"name": "",
|
|
895
|
+
"type": "uint256"
|
|
896
|
+
}
|
|
897
|
+
],
|
|
898
|
+
"stateMutability": "view",
|
|
899
|
+
"type": "function"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"inputs": [
|
|
903
|
+
{
|
|
904
|
+
"internalType": "uint256",
|
|
905
|
+
"name": "assets",
|
|
906
|
+
"type": "uint256"
|
|
907
|
+
}
|
|
908
|
+
],
|
|
909
|
+
"name": "previewWithdraw",
|
|
910
|
+
"outputs": [
|
|
911
|
+
{
|
|
912
|
+
"internalType": "uint256",
|
|
913
|
+
"name": "",
|
|
914
|
+
"type": "uint256"
|
|
915
|
+
}
|
|
916
|
+
],
|
|
917
|
+
"stateMutability": "view",
|
|
918
|
+
"type": "function"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"inputs": [],
|
|
922
|
+
"name": "pricePerShare",
|
|
923
|
+
"outputs": [
|
|
924
|
+
{
|
|
925
|
+
"internalType": "uint256",
|
|
926
|
+
"name": "",
|
|
927
|
+
"type": "uint256"
|
|
928
|
+
}
|
|
929
|
+
],
|
|
930
|
+
"stateMutability": "view",
|
|
931
|
+
"type": "function"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"inputs": [],
|
|
935
|
+
"name": "profitMaxUnlockTime",
|
|
936
|
+
"outputs": [
|
|
937
|
+
{
|
|
938
|
+
"internalType": "uint256",
|
|
939
|
+
"name": "",
|
|
940
|
+
"type": "uint256"
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
"stateMutability": "view",
|
|
944
|
+
"type": "function"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"inputs": [],
|
|
948
|
+
"name": "profitUnlockingRate",
|
|
949
|
+
"outputs": [
|
|
950
|
+
{
|
|
951
|
+
"internalType": "uint256",
|
|
952
|
+
"name": "",
|
|
953
|
+
"type": "uint256"
|
|
954
|
+
}
|
|
955
|
+
],
|
|
956
|
+
"stateMutability": "view",
|
|
957
|
+
"type": "function"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"inputs": [
|
|
961
|
+
{
|
|
962
|
+
"internalType": "uint256",
|
|
963
|
+
"name": "shares",
|
|
964
|
+
"type": "uint256"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"internalType": "address",
|
|
968
|
+
"name": "receiver",
|
|
969
|
+
"type": "address"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"internalType": "address",
|
|
973
|
+
"name": "owner",
|
|
974
|
+
"type": "address"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"internalType": "uint256",
|
|
978
|
+
"name": "maxLoss",
|
|
979
|
+
"type": "uint256"
|
|
980
|
+
}
|
|
981
|
+
],
|
|
982
|
+
"name": "redeem",
|
|
983
|
+
"outputs": [
|
|
984
|
+
{
|
|
985
|
+
"internalType": "uint256",
|
|
986
|
+
"name": "",
|
|
987
|
+
"type": "uint256"
|
|
988
|
+
}
|
|
989
|
+
],
|
|
990
|
+
"stateMutability": "nonpayable",
|
|
991
|
+
"type": "function"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"inputs": [
|
|
995
|
+
{
|
|
996
|
+
"internalType": "uint256",
|
|
997
|
+
"name": "shares",
|
|
998
|
+
"type": "uint256"
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"internalType": "address",
|
|
1002
|
+
"name": "receiver",
|
|
1003
|
+
"type": "address"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"internalType": "address",
|
|
1007
|
+
"name": "owner",
|
|
1008
|
+
"type": "address"
|
|
1009
|
+
}
|
|
1010
|
+
],
|
|
1011
|
+
"name": "redeem",
|
|
1012
|
+
"outputs": [
|
|
1013
|
+
{
|
|
1014
|
+
"internalType": "uint256",
|
|
1015
|
+
"name": "",
|
|
1016
|
+
"type": "uint256"
|
|
1017
|
+
}
|
|
1018
|
+
],
|
|
1019
|
+
"stateMutability": "nonpayable",
|
|
1020
|
+
"type": "function"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"inputs": [],
|
|
1024
|
+
"name": "report",
|
|
1025
|
+
"outputs": [
|
|
1026
|
+
{
|
|
1027
|
+
"internalType": "uint256",
|
|
1028
|
+
"name": "profit",
|
|
1029
|
+
"type": "uint256"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"internalType": "uint256",
|
|
1033
|
+
"name": "loss",
|
|
1034
|
+
"type": "uint256"
|
|
1035
|
+
}
|
|
1036
|
+
],
|
|
1037
|
+
"stateMutability": "nonpayable",
|
|
1038
|
+
"type": "function"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"inputs": [
|
|
1042
|
+
{
|
|
1043
|
+
"internalType": "address",
|
|
1044
|
+
"name": "_sender",
|
|
1045
|
+
"type": "address"
|
|
1046
|
+
}
|
|
1047
|
+
],
|
|
1048
|
+
"name": "requireEmergencyAuthorized",
|
|
1049
|
+
"outputs": [],
|
|
1050
|
+
"stateMutability": "view",
|
|
1051
|
+
"type": "function"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"inputs": [
|
|
1055
|
+
{
|
|
1056
|
+
"internalType": "address",
|
|
1057
|
+
"name": "_sender",
|
|
1058
|
+
"type": "address"
|
|
1059
|
+
}
|
|
1060
|
+
],
|
|
1061
|
+
"name": "requireKeeperOrManagement",
|
|
1062
|
+
"outputs": [],
|
|
1063
|
+
"stateMutability": "view",
|
|
1064
|
+
"type": "function"
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"inputs": [
|
|
1068
|
+
{
|
|
1069
|
+
"internalType": "address",
|
|
1070
|
+
"name": "_sender",
|
|
1071
|
+
"type": "address"
|
|
1072
|
+
}
|
|
1073
|
+
],
|
|
1074
|
+
"name": "requireManagement",
|
|
1075
|
+
"outputs": [],
|
|
1076
|
+
"stateMutability": "view",
|
|
1077
|
+
"type": "function"
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"inputs": [
|
|
1081
|
+
{
|
|
1082
|
+
"internalType": "address",
|
|
1083
|
+
"name": "_emergencyAdmin",
|
|
1084
|
+
"type": "address"
|
|
1085
|
+
}
|
|
1086
|
+
],
|
|
1087
|
+
"name": "setEmergencyAdmin",
|
|
1088
|
+
"outputs": [],
|
|
1089
|
+
"stateMutability": "nonpayable",
|
|
1090
|
+
"type": "function"
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"inputs": [
|
|
1094
|
+
{
|
|
1095
|
+
"internalType": "address",
|
|
1096
|
+
"name": "_keeper",
|
|
1097
|
+
"type": "address"
|
|
1098
|
+
}
|
|
1099
|
+
],
|
|
1100
|
+
"name": "setKeeper",
|
|
1101
|
+
"outputs": [],
|
|
1102
|
+
"stateMutability": "nonpayable",
|
|
1103
|
+
"type": "function"
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"inputs": [
|
|
1107
|
+
{
|
|
1108
|
+
"internalType": "address",
|
|
1109
|
+
"name": "_management",
|
|
1110
|
+
"type": "address"
|
|
1111
|
+
}
|
|
1112
|
+
],
|
|
1113
|
+
"name": "setPendingManagement",
|
|
1114
|
+
"outputs": [],
|
|
1115
|
+
"stateMutability": "nonpayable",
|
|
1116
|
+
"type": "function"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"inputs": [
|
|
1120
|
+
{
|
|
1121
|
+
"internalType": "uint16",
|
|
1122
|
+
"name": "_performanceFee",
|
|
1123
|
+
"type": "uint16"
|
|
1124
|
+
}
|
|
1125
|
+
],
|
|
1126
|
+
"name": "setPerformanceFee",
|
|
1127
|
+
"outputs": [],
|
|
1128
|
+
"stateMutability": "nonpayable",
|
|
1129
|
+
"type": "function"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"inputs": [
|
|
1133
|
+
{
|
|
1134
|
+
"internalType": "address",
|
|
1135
|
+
"name": "_performanceFeeRecipient",
|
|
1136
|
+
"type": "address"
|
|
1137
|
+
}
|
|
1138
|
+
],
|
|
1139
|
+
"name": "setPerformanceFeeRecipient",
|
|
1140
|
+
"outputs": [],
|
|
1141
|
+
"stateMutability": "nonpayable",
|
|
1142
|
+
"type": "function"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
"inputs": [
|
|
1146
|
+
{
|
|
1147
|
+
"internalType": "uint256",
|
|
1148
|
+
"name": "_profitMaxUnlockTime",
|
|
1149
|
+
"type": "uint256"
|
|
1150
|
+
}
|
|
1151
|
+
],
|
|
1152
|
+
"name": "setProfitMaxUnlockTime",
|
|
1153
|
+
"outputs": [],
|
|
1154
|
+
"stateMutability": "nonpayable",
|
|
1155
|
+
"type": "function"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
"inputs": [],
|
|
1159
|
+
"name": "shutdownStrategy",
|
|
1160
|
+
"outputs": [],
|
|
1161
|
+
"stateMutability": "nonpayable",
|
|
1162
|
+
"type": "function"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"inputs": [],
|
|
1166
|
+
"name": "symbol",
|
|
1167
|
+
"outputs": [
|
|
1168
|
+
{
|
|
1169
|
+
"internalType": "string",
|
|
1170
|
+
"name": "",
|
|
1171
|
+
"type": "string"
|
|
1172
|
+
}
|
|
1173
|
+
],
|
|
1174
|
+
"stateMutability": "view",
|
|
1175
|
+
"type": "function"
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"inputs": [],
|
|
1179
|
+
"name": "tend",
|
|
1180
|
+
"outputs": [],
|
|
1181
|
+
"stateMutability": "nonpayable",
|
|
1182
|
+
"type": "function"
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
"inputs": [],
|
|
1186
|
+
"name": "totalAssets",
|
|
1187
|
+
"outputs": [
|
|
1188
|
+
{
|
|
1189
|
+
"internalType": "uint256",
|
|
1190
|
+
"name": "",
|
|
1191
|
+
"type": "uint256"
|
|
1192
|
+
}
|
|
1193
|
+
],
|
|
1194
|
+
"stateMutability": "view",
|
|
1195
|
+
"type": "function"
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"inputs": [],
|
|
1199
|
+
"name": "totalSupply",
|
|
1200
|
+
"outputs": [
|
|
1201
|
+
{
|
|
1202
|
+
"internalType": "uint256",
|
|
1203
|
+
"name": "",
|
|
1204
|
+
"type": "uint256"
|
|
1205
|
+
}
|
|
1206
|
+
],
|
|
1207
|
+
"stateMutability": "view",
|
|
1208
|
+
"type": "function"
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
"inputs": [
|
|
1212
|
+
{
|
|
1213
|
+
"internalType": "address",
|
|
1214
|
+
"name": "to",
|
|
1215
|
+
"type": "address"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"internalType": "uint256",
|
|
1219
|
+
"name": "amount",
|
|
1220
|
+
"type": "uint256"
|
|
1221
|
+
}
|
|
1222
|
+
],
|
|
1223
|
+
"name": "transfer",
|
|
1224
|
+
"outputs": [
|
|
1225
|
+
{
|
|
1226
|
+
"internalType": "bool",
|
|
1227
|
+
"name": "",
|
|
1228
|
+
"type": "bool"
|
|
1229
|
+
}
|
|
1230
|
+
],
|
|
1231
|
+
"stateMutability": "nonpayable",
|
|
1232
|
+
"type": "function"
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
"inputs": [
|
|
1236
|
+
{
|
|
1237
|
+
"internalType": "address",
|
|
1238
|
+
"name": "from",
|
|
1239
|
+
"type": "address"
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
"internalType": "address",
|
|
1243
|
+
"name": "to",
|
|
1244
|
+
"type": "address"
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"internalType": "uint256",
|
|
1248
|
+
"name": "amount",
|
|
1249
|
+
"type": "uint256"
|
|
1250
|
+
}
|
|
1251
|
+
],
|
|
1252
|
+
"name": "transferFrom",
|
|
1253
|
+
"outputs": [
|
|
1254
|
+
{
|
|
1255
|
+
"internalType": "bool",
|
|
1256
|
+
"name": "",
|
|
1257
|
+
"type": "bool"
|
|
1258
|
+
}
|
|
1259
|
+
],
|
|
1260
|
+
"stateMutability": "nonpayable",
|
|
1261
|
+
"type": "function"
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"inputs": [],
|
|
1265
|
+
"name": "unlockedShares",
|
|
1266
|
+
"outputs": [
|
|
1267
|
+
{
|
|
1268
|
+
"internalType": "uint256",
|
|
1269
|
+
"name": "",
|
|
1270
|
+
"type": "uint256"
|
|
1271
|
+
}
|
|
1272
|
+
],
|
|
1273
|
+
"stateMutability": "view",
|
|
1274
|
+
"type": "function"
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"inputs": [
|
|
1278
|
+
{
|
|
1279
|
+
"internalType": "uint256",
|
|
1280
|
+
"name": "assets",
|
|
1281
|
+
"type": "uint256"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"internalType": "address",
|
|
1285
|
+
"name": "receiver",
|
|
1286
|
+
"type": "address"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"internalType": "address",
|
|
1290
|
+
"name": "owner",
|
|
1291
|
+
"type": "address"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"internalType": "uint256",
|
|
1295
|
+
"name": "maxLoss",
|
|
1296
|
+
"type": "uint256"
|
|
1297
|
+
}
|
|
1298
|
+
],
|
|
1299
|
+
"name": "withdraw",
|
|
1300
|
+
"outputs": [
|
|
1301
|
+
{
|
|
1302
|
+
"internalType": "uint256",
|
|
1303
|
+
"name": "shares",
|
|
1304
|
+
"type": "uint256"
|
|
1305
|
+
}
|
|
1306
|
+
],
|
|
1307
|
+
"stateMutability": "nonpayable",
|
|
1308
|
+
"type": "function"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
"inputs": [
|
|
1312
|
+
{
|
|
1313
|
+
"internalType": "uint256",
|
|
1314
|
+
"name": "assets",
|
|
1315
|
+
"type": "uint256"
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
"internalType": "address",
|
|
1319
|
+
"name": "receiver",
|
|
1320
|
+
"type": "address"
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"internalType": "address",
|
|
1324
|
+
"name": "owner",
|
|
1325
|
+
"type": "address"
|
|
1326
|
+
}
|
|
1327
|
+
],
|
|
1328
|
+
"name": "withdraw",
|
|
1329
|
+
"outputs": [
|
|
1330
|
+
{
|
|
1331
|
+
"internalType": "uint256",
|
|
1332
|
+
"name": "shares",
|
|
1333
|
+
"type": "uint256"
|
|
1334
|
+
}
|
|
1335
|
+
],
|
|
1336
|
+
"stateMutability": "nonpayable",
|
|
1337
|
+
"type": "function"
|
|
1338
|
+
}
|
|
1339
|
+
] as const satisfies Abi;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Type-safe ABI for TokenizedStrategy_json
|
|
1343
|
+
*/
|
|
1344
|
+
export type TokenizedStrategy_jsonAbi = typeof TokenizedStrategy_jsonAbi;
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* Contract instance type for TokenizedStrategy_json
|
|
1348
|
+
*/
|
|
1349
|
+
// Use any for contract type to avoid complex viem type issues
|
|
1350
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
1351
|
+
export type TokenizedStrategy_jsonContract = any;
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* TokenizedStrategy_json Contract Class
|
|
1355
|
+
*
|
|
1356
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1357
|
+
*
|
|
1358
|
+
* @example
|
|
1359
|
+
* ```typescript
|
|
1360
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1361
|
+
* import { mainnet } from 'viem/chains';
|
|
1362
|
+
* import { TokenizedStrategy_json } from 'TokenizedStrategy_json';
|
|
1363
|
+
*
|
|
1364
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1365
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1366
|
+
*
|
|
1367
|
+
* const contract = new TokenizedStrategy_json('0x...', { publicClient, walletClient });
|
|
1368
|
+
*
|
|
1369
|
+
* // Read functions
|
|
1370
|
+
* const result = await contract.balanceOf('0x...');
|
|
1371
|
+
*
|
|
1372
|
+
* // Write functions
|
|
1373
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
1374
|
+
*
|
|
1375
|
+
* // Simulate transactions (dry-run)
|
|
1376
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1377
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
1378
|
+
*
|
|
1379
|
+
* // Watch events
|
|
1380
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1381
|
+
* console.log('Transfer event:', event);
|
|
1382
|
+
* });
|
|
1383
|
+
* ```
|
|
1384
|
+
*/
|
|
1385
|
+
export class TokenizedStrategy_json {
|
|
1386
|
+
private contract: TokenizedStrategy_jsonContract;
|
|
1387
|
+
private contractAddress: Address;
|
|
1388
|
+
private publicClient: PublicClient;
|
|
1389
|
+
|
|
1390
|
+
constructor(
|
|
1391
|
+
address: Address,
|
|
1392
|
+
clients: {
|
|
1393
|
+
publicClient: PublicClient;
|
|
1394
|
+
walletClient?: WalletClient;
|
|
1395
|
+
}
|
|
1396
|
+
) {
|
|
1397
|
+
this.contractAddress = address;
|
|
1398
|
+
this.publicClient = clients.publicClient;
|
|
1399
|
+
this.contract = getContract({
|
|
1400
|
+
address,
|
|
1401
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
1402
|
+
client: {
|
|
1403
|
+
public: clients.publicClient,
|
|
1404
|
+
wallet: clients.walletClient,
|
|
1405
|
+
},
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* Get the contract address
|
|
1411
|
+
*/
|
|
1412
|
+
get address(): Address {
|
|
1413
|
+
return this.contractAddress;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* Get the underlying viem contract instance
|
|
1418
|
+
*/
|
|
1419
|
+
getContract(): TokenizedStrategy_jsonContract {
|
|
1420
|
+
return this.contract;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* DOMAIN_SEPARATOR
|
|
1425
|
+
* view
|
|
1426
|
+
*/
|
|
1427
|
+
async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
|
|
1428
|
+
return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* FACTORY
|
|
1433
|
+
* view
|
|
1434
|
+
*/
|
|
1435
|
+
async FACTORY(): Promise<`0x${string}`> {
|
|
1436
|
+
return this.contract.read.FACTORY() as Promise<`0x${string}`>;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
/**
|
|
1440
|
+
* MAX_FEE
|
|
1441
|
+
* view
|
|
1442
|
+
*/
|
|
1443
|
+
async MAX_FEE(): Promise<bigint> {
|
|
1444
|
+
return this.contract.read.MAX_FEE() as Promise<bigint>;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* allowance
|
|
1449
|
+
* view
|
|
1450
|
+
*/
|
|
1451
|
+
async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
|
|
1452
|
+
return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* apiVersion
|
|
1457
|
+
* pure
|
|
1458
|
+
*/
|
|
1459
|
+
async apiVersion(): Promise<string> {
|
|
1460
|
+
return this.contract.read.apiVersion() as Promise<string>;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* asset
|
|
1465
|
+
* view
|
|
1466
|
+
*/
|
|
1467
|
+
async asset(): Promise<`0x${string}`> {
|
|
1468
|
+
return this.contract.read.asset() as Promise<`0x${string}`>;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* balanceOf
|
|
1473
|
+
* view
|
|
1474
|
+
*/
|
|
1475
|
+
async balanceOf(account: `0x${string}`): Promise<bigint> {
|
|
1476
|
+
return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* convertToAssets
|
|
1481
|
+
* view
|
|
1482
|
+
*/
|
|
1483
|
+
async convertToAssets(shares: bigint): Promise<bigint> {
|
|
1484
|
+
return this.contract.read.convertToAssets([shares] as const) as Promise<bigint>;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* convertToShares
|
|
1489
|
+
* view
|
|
1490
|
+
*/
|
|
1491
|
+
async convertToShares(assets: bigint): Promise<bigint> {
|
|
1492
|
+
return this.contract.read.convertToShares([assets] as const) as Promise<bigint>;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* decimals
|
|
1497
|
+
* view
|
|
1498
|
+
*/
|
|
1499
|
+
async decimals(): Promise<bigint> {
|
|
1500
|
+
return this.contract.read.decimals() as Promise<bigint>;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
* emergencyAdmin
|
|
1505
|
+
* view
|
|
1506
|
+
*/
|
|
1507
|
+
async emergencyAdmin(): Promise<`0x${string}`> {
|
|
1508
|
+
return this.contract.read.emergencyAdmin() as Promise<`0x${string}`>;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* fullProfitUnlockDate
|
|
1513
|
+
* view
|
|
1514
|
+
*/
|
|
1515
|
+
async fullProfitUnlockDate(): Promise<bigint> {
|
|
1516
|
+
return this.contract.read.fullProfitUnlockDate() as Promise<bigint>;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* isShutdown
|
|
1521
|
+
* view
|
|
1522
|
+
*/
|
|
1523
|
+
async isShutdown(): Promise<boolean> {
|
|
1524
|
+
return this.contract.read.isShutdown() as Promise<boolean>;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* keeper
|
|
1529
|
+
* view
|
|
1530
|
+
*/
|
|
1531
|
+
async keeper(): Promise<`0x${string}`> {
|
|
1532
|
+
return this.contract.read.keeper() as Promise<`0x${string}`>;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* lastReport
|
|
1537
|
+
* view
|
|
1538
|
+
*/
|
|
1539
|
+
async lastReport(): Promise<bigint> {
|
|
1540
|
+
return this.contract.read.lastReport() as Promise<bigint>;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* management
|
|
1545
|
+
* view
|
|
1546
|
+
*/
|
|
1547
|
+
async management(): Promise<`0x${string}`> {
|
|
1548
|
+
return this.contract.read.management() as Promise<`0x${string}`>;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* maxDeposit
|
|
1553
|
+
* view
|
|
1554
|
+
*/
|
|
1555
|
+
async maxDeposit(owner: `0x${string}`): Promise<bigint> {
|
|
1556
|
+
return this.contract.read.maxDeposit([owner] as const) as Promise<bigint>;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* maxMint
|
|
1561
|
+
* view
|
|
1562
|
+
*/
|
|
1563
|
+
async maxMint(owner: `0x${string}`): Promise<bigint> {
|
|
1564
|
+
return this.contract.read.maxMint([owner] as const) as Promise<bigint>;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
/**
|
|
1568
|
+
* maxRedeem
|
|
1569
|
+
* view
|
|
1570
|
+
*/
|
|
1571
|
+
async maxRedeem(owner: `0x${string}`): Promise<bigint> {
|
|
1572
|
+
return this.contract.read.maxRedeem([owner] as const) as Promise<bigint>;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* maxWithdraw
|
|
1577
|
+
* view
|
|
1578
|
+
*/
|
|
1579
|
+
async maxWithdraw(owner: `0x${string}`): Promise<bigint> {
|
|
1580
|
+
return this.contract.read.maxWithdraw([owner] as const) as Promise<bigint>;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
/**
|
|
1584
|
+
* name
|
|
1585
|
+
* view
|
|
1586
|
+
*/
|
|
1587
|
+
async name(): Promise<string> {
|
|
1588
|
+
return this.contract.read.name() as Promise<string>;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
/**
|
|
1592
|
+
* nonces
|
|
1593
|
+
* view
|
|
1594
|
+
*/
|
|
1595
|
+
async nonces(_owner: `0x${string}`): Promise<bigint> {
|
|
1596
|
+
return this.contract.read.nonces([_owner] as const) as Promise<bigint>;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
* pendingManagement
|
|
1601
|
+
* view
|
|
1602
|
+
*/
|
|
1603
|
+
async pendingManagement(): Promise<`0x${string}`> {
|
|
1604
|
+
return this.contract.read.pendingManagement() as Promise<`0x${string}`>;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* performanceFee
|
|
1609
|
+
* view
|
|
1610
|
+
*/
|
|
1611
|
+
async performanceFee(): Promise<bigint> {
|
|
1612
|
+
return this.contract.read.performanceFee() as Promise<bigint>;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* performanceFeeRecipient
|
|
1617
|
+
* view
|
|
1618
|
+
*/
|
|
1619
|
+
async performanceFeeRecipient(): Promise<`0x${string}`> {
|
|
1620
|
+
return this.contract.read.performanceFeeRecipient() as Promise<`0x${string}`>;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* previewDeposit
|
|
1625
|
+
* view
|
|
1626
|
+
*/
|
|
1627
|
+
async previewDeposit(assets: bigint): Promise<bigint> {
|
|
1628
|
+
return this.contract.read.previewDeposit([assets] as const) as Promise<bigint>;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* previewMint
|
|
1633
|
+
* view
|
|
1634
|
+
*/
|
|
1635
|
+
async previewMint(shares: bigint): Promise<bigint> {
|
|
1636
|
+
return this.contract.read.previewMint([shares] as const) as Promise<bigint>;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* previewRedeem
|
|
1641
|
+
* view
|
|
1642
|
+
*/
|
|
1643
|
+
async previewRedeem(shares: bigint): Promise<bigint> {
|
|
1644
|
+
return this.contract.read.previewRedeem([shares] as const) as Promise<bigint>;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* previewWithdraw
|
|
1649
|
+
* view
|
|
1650
|
+
*/
|
|
1651
|
+
async previewWithdraw(assets: bigint): Promise<bigint> {
|
|
1652
|
+
return this.contract.read.previewWithdraw([assets] as const) as Promise<bigint>;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* pricePerShare
|
|
1657
|
+
* view
|
|
1658
|
+
*/
|
|
1659
|
+
async pricePerShare(): Promise<bigint> {
|
|
1660
|
+
return this.contract.read.pricePerShare() as Promise<bigint>;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* profitMaxUnlockTime
|
|
1665
|
+
* view
|
|
1666
|
+
*/
|
|
1667
|
+
async profitMaxUnlockTime(): Promise<bigint> {
|
|
1668
|
+
return this.contract.read.profitMaxUnlockTime() as Promise<bigint>;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* profitUnlockingRate
|
|
1673
|
+
* view
|
|
1674
|
+
*/
|
|
1675
|
+
async profitUnlockingRate(): Promise<bigint> {
|
|
1676
|
+
return this.contract.read.profitUnlockingRate() as Promise<bigint>;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* requireEmergencyAuthorized
|
|
1681
|
+
* view
|
|
1682
|
+
*/
|
|
1683
|
+
async requireEmergencyAuthorized(_sender: `0x${string}`): Promise<void> {
|
|
1684
|
+
return this.contract.read.requireEmergencyAuthorized([_sender] as const) as Promise<void>;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* requireKeeperOrManagement
|
|
1689
|
+
* view
|
|
1690
|
+
*/
|
|
1691
|
+
async requireKeeperOrManagement(_sender: `0x${string}`): Promise<void> {
|
|
1692
|
+
return this.contract.read.requireKeeperOrManagement([_sender] as const) as Promise<void>;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* requireManagement
|
|
1697
|
+
* view
|
|
1698
|
+
*/
|
|
1699
|
+
async requireManagement(_sender: `0x${string}`): Promise<void> {
|
|
1700
|
+
return this.contract.read.requireManagement([_sender] as const) as Promise<void>;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* symbol
|
|
1705
|
+
* view
|
|
1706
|
+
*/
|
|
1707
|
+
async symbol(): Promise<string> {
|
|
1708
|
+
return this.contract.read.symbol() as Promise<string>;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* totalAssets
|
|
1713
|
+
* view
|
|
1714
|
+
*/
|
|
1715
|
+
async totalAssets(): Promise<bigint> {
|
|
1716
|
+
return this.contract.read.totalAssets() as Promise<bigint>;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
/**
|
|
1720
|
+
* totalSupply
|
|
1721
|
+
* view
|
|
1722
|
+
*/
|
|
1723
|
+
async totalSupply(): Promise<bigint> {
|
|
1724
|
+
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* unlockedShares
|
|
1729
|
+
* view
|
|
1730
|
+
*/
|
|
1731
|
+
async unlockedShares(): Promise<bigint> {
|
|
1732
|
+
return this.contract.read.unlockedShares() as Promise<bigint>;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* acceptManagement
|
|
1737
|
+
* nonpayable
|
|
1738
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1739
|
+
*/
|
|
1740
|
+
async acceptManagement(options?: {
|
|
1741
|
+
accessList?: import('viem').AccessList;
|
|
1742
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1743
|
+
chain?: import('viem').Chain | null;
|
|
1744
|
+
dataSuffix?: `0x${string}`;
|
|
1745
|
+
gas?: bigint;
|
|
1746
|
+
gasPrice?: bigint;
|
|
1747
|
+
maxFeePerGas?: bigint;
|
|
1748
|
+
maxPriorityFeePerGas?: bigint;
|
|
1749
|
+
nonce?: number;
|
|
1750
|
+
value?: bigint;
|
|
1751
|
+
}): Promise<`0x${string}`> {
|
|
1752
|
+
if (!this.contract.write) {
|
|
1753
|
+
throw new Error('Wallet client is required for write operations');
|
|
1754
|
+
}
|
|
1755
|
+
return this.contract.write.acceptManagement(options) as Promise<`0x${string}`>;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* approve
|
|
1760
|
+
* nonpayable
|
|
1761
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1762
|
+
*/
|
|
1763
|
+
async approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
1764
|
+
accessList?: import('viem').AccessList;
|
|
1765
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1766
|
+
chain?: import('viem').Chain | null;
|
|
1767
|
+
dataSuffix?: `0x${string}`;
|
|
1768
|
+
gas?: bigint;
|
|
1769
|
+
gasPrice?: bigint;
|
|
1770
|
+
maxFeePerGas?: bigint;
|
|
1771
|
+
maxPriorityFeePerGas?: bigint;
|
|
1772
|
+
nonce?: number;
|
|
1773
|
+
value?: bigint;
|
|
1774
|
+
}): Promise<`0x${string}`> {
|
|
1775
|
+
if (!this.contract.write) {
|
|
1776
|
+
throw new Error('Wallet client is required for write operations');
|
|
1777
|
+
}
|
|
1778
|
+
return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* deposit
|
|
1783
|
+
* nonpayable
|
|
1784
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1785
|
+
*/
|
|
1786
|
+
async deposit(assets: bigint, receiver: `0x${string}`, options?: {
|
|
1787
|
+
accessList?: import('viem').AccessList;
|
|
1788
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1789
|
+
chain?: import('viem').Chain | null;
|
|
1790
|
+
dataSuffix?: `0x${string}`;
|
|
1791
|
+
gas?: bigint;
|
|
1792
|
+
gasPrice?: bigint;
|
|
1793
|
+
maxFeePerGas?: bigint;
|
|
1794
|
+
maxPriorityFeePerGas?: bigint;
|
|
1795
|
+
nonce?: number;
|
|
1796
|
+
value?: bigint;
|
|
1797
|
+
}): Promise<`0x${string}`> {
|
|
1798
|
+
if (!this.contract.write) {
|
|
1799
|
+
throw new Error('Wallet client is required for write operations');
|
|
1800
|
+
}
|
|
1801
|
+
return this.contract.write.deposit([assets, receiver] as const, options) as Promise<`0x${string}`>;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
/**
|
|
1805
|
+
* emergencyWithdraw
|
|
1806
|
+
* nonpayable
|
|
1807
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1808
|
+
*/
|
|
1809
|
+
async emergencyWithdraw(amount: bigint, options?: {
|
|
1810
|
+
accessList?: import('viem').AccessList;
|
|
1811
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1812
|
+
chain?: import('viem').Chain | null;
|
|
1813
|
+
dataSuffix?: `0x${string}`;
|
|
1814
|
+
gas?: bigint;
|
|
1815
|
+
gasPrice?: bigint;
|
|
1816
|
+
maxFeePerGas?: bigint;
|
|
1817
|
+
maxPriorityFeePerGas?: bigint;
|
|
1818
|
+
nonce?: number;
|
|
1819
|
+
value?: bigint;
|
|
1820
|
+
}): Promise<`0x${string}`> {
|
|
1821
|
+
if (!this.contract.write) {
|
|
1822
|
+
throw new Error('Wallet client is required for write operations');
|
|
1823
|
+
}
|
|
1824
|
+
return this.contract.write.emergencyWithdraw([amount] as const, options) as Promise<`0x${string}`>;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
/**
|
|
1828
|
+
* initialize
|
|
1829
|
+
* nonpayable
|
|
1830
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1831
|
+
*/
|
|
1832
|
+
async initialize(_asset: `0x${string}`, _name: string, _management: `0x${string}`, _performanceFeeRecipient: `0x${string}`, _keeper: `0x${string}`, options?: {
|
|
1833
|
+
accessList?: import('viem').AccessList;
|
|
1834
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1835
|
+
chain?: import('viem').Chain | null;
|
|
1836
|
+
dataSuffix?: `0x${string}`;
|
|
1837
|
+
gas?: bigint;
|
|
1838
|
+
gasPrice?: bigint;
|
|
1839
|
+
maxFeePerGas?: bigint;
|
|
1840
|
+
maxPriorityFeePerGas?: bigint;
|
|
1841
|
+
nonce?: number;
|
|
1842
|
+
value?: bigint;
|
|
1843
|
+
}): Promise<`0x${string}`> {
|
|
1844
|
+
if (!this.contract.write) {
|
|
1845
|
+
throw new Error('Wallet client is required for write operations');
|
|
1846
|
+
}
|
|
1847
|
+
return this.contract.write.initialize([_asset, _name, _management, _performanceFeeRecipient, _keeper] as const, options) as Promise<`0x${string}`>;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
/**
|
|
1851
|
+
* mint
|
|
1852
|
+
* nonpayable
|
|
1853
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1854
|
+
*/
|
|
1855
|
+
async mint(shares: bigint, receiver: `0x${string}`, options?: {
|
|
1856
|
+
accessList?: import('viem').AccessList;
|
|
1857
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1858
|
+
chain?: import('viem').Chain | null;
|
|
1859
|
+
dataSuffix?: `0x${string}`;
|
|
1860
|
+
gas?: bigint;
|
|
1861
|
+
gasPrice?: bigint;
|
|
1862
|
+
maxFeePerGas?: bigint;
|
|
1863
|
+
maxPriorityFeePerGas?: bigint;
|
|
1864
|
+
nonce?: number;
|
|
1865
|
+
value?: bigint;
|
|
1866
|
+
}): Promise<`0x${string}`> {
|
|
1867
|
+
if (!this.contract.write) {
|
|
1868
|
+
throw new Error('Wallet client is required for write operations');
|
|
1869
|
+
}
|
|
1870
|
+
return this.contract.write.mint([shares, receiver] as const, options) as Promise<`0x${string}`>;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* permit
|
|
1875
|
+
* nonpayable
|
|
1876
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1877
|
+
*/
|
|
1878
|
+
async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
1879
|
+
accessList?: import('viem').AccessList;
|
|
1880
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1881
|
+
chain?: import('viem').Chain | null;
|
|
1882
|
+
dataSuffix?: `0x${string}`;
|
|
1883
|
+
gas?: bigint;
|
|
1884
|
+
gasPrice?: bigint;
|
|
1885
|
+
maxFeePerGas?: bigint;
|
|
1886
|
+
maxPriorityFeePerGas?: bigint;
|
|
1887
|
+
nonce?: number;
|
|
1888
|
+
value?: bigint;
|
|
1889
|
+
}): Promise<`0x${string}`> {
|
|
1890
|
+
if (!this.contract.write) {
|
|
1891
|
+
throw new Error('Wallet client is required for write operations');
|
|
1892
|
+
}
|
|
1893
|
+
return this.contract.write.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<`0x${string}`>;
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
async redeem(shares: bigint, receiver: `0x${string}`, owner: `0x${string}`, maxLoss: bigint, options?: {
|
|
1897
|
+
accessList?: import('viem').AccessList;
|
|
1898
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1899
|
+
chain?: import('viem').Chain | null;
|
|
1900
|
+
dataSuffix?: `0x${string}`;
|
|
1901
|
+
gas?: bigint;
|
|
1902
|
+
gasPrice?: bigint;
|
|
1903
|
+
maxFeePerGas?: bigint;
|
|
1904
|
+
maxPriorityFeePerGas?: bigint;
|
|
1905
|
+
nonce?: number;
|
|
1906
|
+
value?: bigint;
|
|
1907
|
+
}): Promise<`0x${string}`>;
|
|
1908
|
+
async redeem(shares: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
|
|
1909
|
+
accessList?: import('viem').AccessList;
|
|
1910
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1911
|
+
chain?: import('viem').Chain | null;
|
|
1912
|
+
dataSuffix?: `0x${string}`;
|
|
1913
|
+
gas?: bigint;
|
|
1914
|
+
gasPrice?: bigint;
|
|
1915
|
+
maxFeePerGas?: bigint;
|
|
1916
|
+
maxPriorityFeePerGas?: bigint;
|
|
1917
|
+
nonce?: number;
|
|
1918
|
+
value?: bigint;
|
|
1919
|
+
}): Promise<`0x${string}`>;
|
|
1920
|
+
async redeem(...args: any[]): Promise<`0x${string}`> {
|
|
1921
|
+
if (!this.contract.write) {
|
|
1922
|
+
throw new Error('Wallet client is required for write operations');
|
|
1923
|
+
}
|
|
1924
|
+
return this.contract.write.redeem(args as any) as Promise<`0x${string}`>;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* report
|
|
1929
|
+
* nonpayable
|
|
1930
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1931
|
+
*/
|
|
1932
|
+
async report(options?: {
|
|
1933
|
+
accessList?: import('viem').AccessList;
|
|
1934
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1935
|
+
chain?: import('viem').Chain | null;
|
|
1936
|
+
dataSuffix?: `0x${string}`;
|
|
1937
|
+
gas?: bigint;
|
|
1938
|
+
gasPrice?: bigint;
|
|
1939
|
+
maxFeePerGas?: bigint;
|
|
1940
|
+
maxPriorityFeePerGas?: bigint;
|
|
1941
|
+
nonce?: number;
|
|
1942
|
+
value?: bigint;
|
|
1943
|
+
}): Promise<`0x${string}`> {
|
|
1944
|
+
if (!this.contract.write) {
|
|
1945
|
+
throw new Error('Wallet client is required for write operations');
|
|
1946
|
+
}
|
|
1947
|
+
return this.contract.write.report(options) as Promise<`0x${string}`>;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
/**
|
|
1951
|
+
* setEmergencyAdmin
|
|
1952
|
+
* nonpayable
|
|
1953
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1954
|
+
*/
|
|
1955
|
+
async setEmergencyAdmin(_emergencyAdmin: `0x${string}`, options?: {
|
|
1956
|
+
accessList?: import('viem').AccessList;
|
|
1957
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1958
|
+
chain?: import('viem').Chain | null;
|
|
1959
|
+
dataSuffix?: `0x${string}`;
|
|
1960
|
+
gas?: bigint;
|
|
1961
|
+
gasPrice?: bigint;
|
|
1962
|
+
maxFeePerGas?: bigint;
|
|
1963
|
+
maxPriorityFeePerGas?: bigint;
|
|
1964
|
+
nonce?: number;
|
|
1965
|
+
value?: bigint;
|
|
1966
|
+
}): Promise<`0x${string}`> {
|
|
1967
|
+
if (!this.contract.write) {
|
|
1968
|
+
throw new Error('Wallet client is required for write operations');
|
|
1969
|
+
}
|
|
1970
|
+
return this.contract.write.setEmergencyAdmin([_emergencyAdmin] as const, options) as Promise<`0x${string}`>;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
/**
|
|
1974
|
+
* setKeeper
|
|
1975
|
+
* nonpayable
|
|
1976
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1977
|
+
*/
|
|
1978
|
+
async setKeeper(_keeper: `0x${string}`, options?: {
|
|
1979
|
+
accessList?: import('viem').AccessList;
|
|
1980
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1981
|
+
chain?: import('viem').Chain | null;
|
|
1982
|
+
dataSuffix?: `0x${string}`;
|
|
1983
|
+
gas?: bigint;
|
|
1984
|
+
gasPrice?: bigint;
|
|
1985
|
+
maxFeePerGas?: bigint;
|
|
1986
|
+
maxPriorityFeePerGas?: bigint;
|
|
1987
|
+
nonce?: number;
|
|
1988
|
+
value?: bigint;
|
|
1989
|
+
}): Promise<`0x${string}`> {
|
|
1990
|
+
if (!this.contract.write) {
|
|
1991
|
+
throw new Error('Wallet client is required for write operations');
|
|
1992
|
+
}
|
|
1993
|
+
return this.contract.write.setKeeper([_keeper] as const, options) as Promise<`0x${string}`>;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* setPendingManagement
|
|
1998
|
+
* nonpayable
|
|
1999
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2000
|
+
*/
|
|
2001
|
+
async setPendingManagement(_management: `0x${string}`, options?: {
|
|
2002
|
+
accessList?: import('viem').AccessList;
|
|
2003
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2004
|
+
chain?: import('viem').Chain | null;
|
|
2005
|
+
dataSuffix?: `0x${string}`;
|
|
2006
|
+
gas?: bigint;
|
|
2007
|
+
gasPrice?: bigint;
|
|
2008
|
+
maxFeePerGas?: bigint;
|
|
2009
|
+
maxPriorityFeePerGas?: bigint;
|
|
2010
|
+
nonce?: number;
|
|
2011
|
+
value?: bigint;
|
|
2012
|
+
}): Promise<`0x${string}`> {
|
|
2013
|
+
if (!this.contract.write) {
|
|
2014
|
+
throw new Error('Wallet client is required for write operations');
|
|
2015
|
+
}
|
|
2016
|
+
return this.contract.write.setPendingManagement([_management] as const, options) as Promise<`0x${string}`>;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
/**
|
|
2020
|
+
* setPerformanceFee
|
|
2021
|
+
* nonpayable
|
|
2022
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2023
|
+
*/
|
|
2024
|
+
async setPerformanceFee(_performanceFee: bigint, options?: {
|
|
2025
|
+
accessList?: import('viem').AccessList;
|
|
2026
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2027
|
+
chain?: import('viem').Chain | null;
|
|
2028
|
+
dataSuffix?: `0x${string}`;
|
|
2029
|
+
gas?: bigint;
|
|
2030
|
+
gasPrice?: bigint;
|
|
2031
|
+
maxFeePerGas?: bigint;
|
|
2032
|
+
maxPriorityFeePerGas?: bigint;
|
|
2033
|
+
nonce?: number;
|
|
2034
|
+
value?: bigint;
|
|
2035
|
+
}): Promise<`0x${string}`> {
|
|
2036
|
+
if (!this.contract.write) {
|
|
2037
|
+
throw new Error('Wallet client is required for write operations');
|
|
2038
|
+
}
|
|
2039
|
+
return this.contract.write.setPerformanceFee([_performanceFee] as const, options) as Promise<`0x${string}`>;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* setPerformanceFeeRecipient
|
|
2044
|
+
* nonpayable
|
|
2045
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2046
|
+
*/
|
|
2047
|
+
async setPerformanceFeeRecipient(_performanceFeeRecipient: `0x${string}`, options?: {
|
|
2048
|
+
accessList?: import('viem').AccessList;
|
|
2049
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2050
|
+
chain?: import('viem').Chain | null;
|
|
2051
|
+
dataSuffix?: `0x${string}`;
|
|
2052
|
+
gas?: bigint;
|
|
2053
|
+
gasPrice?: bigint;
|
|
2054
|
+
maxFeePerGas?: bigint;
|
|
2055
|
+
maxPriorityFeePerGas?: bigint;
|
|
2056
|
+
nonce?: number;
|
|
2057
|
+
value?: bigint;
|
|
2058
|
+
}): Promise<`0x${string}`> {
|
|
2059
|
+
if (!this.contract.write) {
|
|
2060
|
+
throw new Error('Wallet client is required for write operations');
|
|
2061
|
+
}
|
|
2062
|
+
return this.contract.write.setPerformanceFeeRecipient([_performanceFeeRecipient] as const, options) as Promise<`0x${string}`>;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
/**
|
|
2066
|
+
* setProfitMaxUnlockTime
|
|
2067
|
+
* nonpayable
|
|
2068
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2069
|
+
*/
|
|
2070
|
+
async setProfitMaxUnlockTime(_profitMaxUnlockTime: bigint, options?: {
|
|
2071
|
+
accessList?: import('viem').AccessList;
|
|
2072
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2073
|
+
chain?: import('viem').Chain | null;
|
|
2074
|
+
dataSuffix?: `0x${string}`;
|
|
2075
|
+
gas?: bigint;
|
|
2076
|
+
gasPrice?: bigint;
|
|
2077
|
+
maxFeePerGas?: bigint;
|
|
2078
|
+
maxPriorityFeePerGas?: bigint;
|
|
2079
|
+
nonce?: number;
|
|
2080
|
+
value?: bigint;
|
|
2081
|
+
}): Promise<`0x${string}`> {
|
|
2082
|
+
if (!this.contract.write) {
|
|
2083
|
+
throw new Error('Wallet client is required for write operations');
|
|
2084
|
+
}
|
|
2085
|
+
return this.contract.write.setProfitMaxUnlockTime([_profitMaxUnlockTime] as const, options) as Promise<`0x${string}`>;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* shutdownStrategy
|
|
2090
|
+
* nonpayable
|
|
2091
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2092
|
+
*/
|
|
2093
|
+
async shutdownStrategy(options?: {
|
|
2094
|
+
accessList?: import('viem').AccessList;
|
|
2095
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2096
|
+
chain?: import('viem').Chain | null;
|
|
2097
|
+
dataSuffix?: `0x${string}`;
|
|
2098
|
+
gas?: bigint;
|
|
2099
|
+
gasPrice?: bigint;
|
|
2100
|
+
maxFeePerGas?: bigint;
|
|
2101
|
+
maxPriorityFeePerGas?: bigint;
|
|
2102
|
+
nonce?: number;
|
|
2103
|
+
value?: bigint;
|
|
2104
|
+
}): Promise<`0x${string}`> {
|
|
2105
|
+
if (!this.contract.write) {
|
|
2106
|
+
throw new Error('Wallet client is required for write operations');
|
|
2107
|
+
}
|
|
2108
|
+
return this.contract.write.shutdownStrategy(options) as Promise<`0x${string}`>;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* tend
|
|
2113
|
+
* nonpayable
|
|
2114
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2115
|
+
*/
|
|
2116
|
+
async tend(options?: {
|
|
2117
|
+
accessList?: import('viem').AccessList;
|
|
2118
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2119
|
+
chain?: import('viem').Chain | null;
|
|
2120
|
+
dataSuffix?: `0x${string}`;
|
|
2121
|
+
gas?: bigint;
|
|
2122
|
+
gasPrice?: bigint;
|
|
2123
|
+
maxFeePerGas?: bigint;
|
|
2124
|
+
maxPriorityFeePerGas?: bigint;
|
|
2125
|
+
nonce?: number;
|
|
2126
|
+
value?: bigint;
|
|
2127
|
+
}): Promise<`0x${string}`> {
|
|
2128
|
+
if (!this.contract.write) {
|
|
2129
|
+
throw new Error('Wallet client is required for write operations');
|
|
2130
|
+
}
|
|
2131
|
+
return this.contract.write.tend(options) as Promise<`0x${string}`>;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
/**
|
|
2135
|
+
* transfer
|
|
2136
|
+
* nonpayable
|
|
2137
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2138
|
+
*/
|
|
2139
|
+
async transfer(to: `0x${string}`, amount: bigint, options?: {
|
|
2140
|
+
accessList?: import('viem').AccessList;
|
|
2141
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2142
|
+
chain?: import('viem').Chain | null;
|
|
2143
|
+
dataSuffix?: `0x${string}`;
|
|
2144
|
+
gas?: bigint;
|
|
2145
|
+
gasPrice?: bigint;
|
|
2146
|
+
maxFeePerGas?: bigint;
|
|
2147
|
+
maxPriorityFeePerGas?: bigint;
|
|
2148
|
+
nonce?: number;
|
|
2149
|
+
value?: bigint;
|
|
2150
|
+
}): Promise<`0x${string}`> {
|
|
2151
|
+
if (!this.contract.write) {
|
|
2152
|
+
throw new Error('Wallet client is required for write operations');
|
|
2153
|
+
}
|
|
2154
|
+
return this.contract.write.transfer([to, amount] as const, options) as Promise<`0x${string}`>;
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
/**
|
|
2158
|
+
* transferFrom
|
|
2159
|
+
* nonpayable
|
|
2160
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2161
|
+
*/
|
|
2162
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
|
|
2163
|
+
accessList?: import('viem').AccessList;
|
|
2164
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2165
|
+
chain?: import('viem').Chain | null;
|
|
2166
|
+
dataSuffix?: `0x${string}`;
|
|
2167
|
+
gas?: bigint;
|
|
2168
|
+
gasPrice?: bigint;
|
|
2169
|
+
maxFeePerGas?: bigint;
|
|
2170
|
+
maxPriorityFeePerGas?: bigint;
|
|
2171
|
+
nonce?: number;
|
|
2172
|
+
value?: bigint;
|
|
2173
|
+
}): Promise<`0x${string}`> {
|
|
2174
|
+
if (!this.contract.write) {
|
|
2175
|
+
throw new Error('Wallet client is required for write operations');
|
|
2176
|
+
}
|
|
2177
|
+
return this.contract.write.transferFrom([from, to, amount] as const, options) as Promise<`0x${string}`>;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
async withdraw(assets: bigint, receiver: `0x${string}`, owner: `0x${string}`, maxLoss: bigint, options?: {
|
|
2181
|
+
accessList?: import('viem').AccessList;
|
|
2182
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2183
|
+
chain?: import('viem').Chain | null;
|
|
2184
|
+
dataSuffix?: `0x${string}`;
|
|
2185
|
+
gas?: bigint;
|
|
2186
|
+
gasPrice?: bigint;
|
|
2187
|
+
maxFeePerGas?: bigint;
|
|
2188
|
+
maxPriorityFeePerGas?: bigint;
|
|
2189
|
+
nonce?: number;
|
|
2190
|
+
value?: bigint;
|
|
2191
|
+
}): Promise<`0x${string}`>;
|
|
2192
|
+
async withdraw(assets: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
|
|
2193
|
+
accessList?: import('viem').AccessList;
|
|
2194
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2195
|
+
chain?: import('viem').Chain | null;
|
|
2196
|
+
dataSuffix?: `0x${string}`;
|
|
2197
|
+
gas?: bigint;
|
|
2198
|
+
gasPrice?: bigint;
|
|
2199
|
+
maxFeePerGas?: bigint;
|
|
2200
|
+
maxPriorityFeePerGas?: bigint;
|
|
2201
|
+
nonce?: number;
|
|
2202
|
+
value?: bigint;
|
|
2203
|
+
}): Promise<`0x${string}`>;
|
|
2204
|
+
async withdraw(...args: any[]): Promise<`0x${string}`> {
|
|
2205
|
+
if (!this.contract.write) {
|
|
2206
|
+
throw new Error('Wallet client is required for write operations');
|
|
2207
|
+
}
|
|
2208
|
+
return this.contract.write.withdraw(args as any) as Promise<`0x${string}`>;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
/**
|
|
2214
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
2215
|
+
*
|
|
2216
|
+
* @example
|
|
2217
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
2218
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
2219
|
+
* console.log('Would succeed:', result.result);
|
|
2220
|
+
*/
|
|
2221
|
+
get simulate() {
|
|
2222
|
+
const contract = this.contract;
|
|
2223
|
+
if (!contract.simulate) {
|
|
2224
|
+
throw new Error('Public client is required for simulation');
|
|
2225
|
+
}
|
|
2226
|
+
return {
|
|
2227
|
+
/**
|
|
2228
|
+
* Simulate acceptManagement
|
|
2229
|
+
* Returns gas estimate and result without sending transaction
|
|
2230
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2231
|
+
*/
|
|
2232
|
+
async acceptManagement(options?: {
|
|
2233
|
+
accessList?: import('viem').AccessList;
|
|
2234
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2235
|
+
chain?: import('viem').Chain | null;
|
|
2236
|
+
dataSuffix?: `0x${string}`;
|
|
2237
|
+
gas?: bigint;
|
|
2238
|
+
gasPrice?: bigint;
|
|
2239
|
+
maxFeePerGas?: bigint;
|
|
2240
|
+
maxPriorityFeePerGas?: bigint;
|
|
2241
|
+
nonce?: number;
|
|
2242
|
+
value?: bigint;
|
|
2243
|
+
}): Promise<void> {
|
|
2244
|
+
return contract.simulate.acceptManagement(options) as Promise<void>;
|
|
2245
|
+
},
|
|
2246
|
+
/**
|
|
2247
|
+
* Simulate approve
|
|
2248
|
+
* Returns gas estimate and result without sending transaction
|
|
2249
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2250
|
+
*/
|
|
2251
|
+
async approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
2252
|
+
accessList?: import('viem').AccessList;
|
|
2253
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2254
|
+
chain?: import('viem').Chain | null;
|
|
2255
|
+
dataSuffix?: `0x${string}`;
|
|
2256
|
+
gas?: bigint;
|
|
2257
|
+
gasPrice?: bigint;
|
|
2258
|
+
maxFeePerGas?: bigint;
|
|
2259
|
+
maxPriorityFeePerGas?: bigint;
|
|
2260
|
+
nonce?: number;
|
|
2261
|
+
value?: bigint;
|
|
2262
|
+
}): Promise<boolean> {
|
|
2263
|
+
return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
|
|
2264
|
+
},
|
|
2265
|
+
/**
|
|
2266
|
+
* Simulate deposit
|
|
2267
|
+
* Returns gas estimate and result without sending transaction
|
|
2268
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2269
|
+
*/
|
|
2270
|
+
async deposit(assets: bigint, receiver: `0x${string}`, options?: {
|
|
2271
|
+
accessList?: import('viem').AccessList;
|
|
2272
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2273
|
+
chain?: import('viem').Chain | null;
|
|
2274
|
+
dataSuffix?: `0x${string}`;
|
|
2275
|
+
gas?: bigint;
|
|
2276
|
+
gasPrice?: bigint;
|
|
2277
|
+
maxFeePerGas?: bigint;
|
|
2278
|
+
maxPriorityFeePerGas?: bigint;
|
|
2279
|
+
nonce?: number;
|
|
2280
|
+
value?: bigint;
|
|
2281
|
+
}): Promise<bigint> {
|
|
2282
|
+
return contract.simulate.deposit([assets, receiver] as const, options) as Promise<bigint>;
|
|
2283
|
+
},
|
|
2284
|
+
/**
|
|
2285
|
+
* Simulate emergencyWithdraw
|
|
2286
|
+
* Returns gas estimate and result without sending transaction
|
|
2287
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2288
|
+
*/
|
|
2289
|
+
async emergencyWithdraw(amount: bigint, options?: {
|
|
2290
|
+
accessList?: import('viem').AccessList;
|
|
2291
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2292
|
+
chain?: import('viem').Chain | null;
|
|
2293
|
+
dataSuffix?: `0x${string}`;
|
|
2294
|
+
gas?: bigint;
|
|
2295
|
+
gasPrice?: bigint;
|
|
2296
|
+
maxFeePerGas?: bigint;
|
|
2297
|
+
maxPriorityFeePerGas?: bigint;
|
|
2298
|
+
nonce?: number;
|
|
2299
|
+
value?: bigint;
|
|
2300
|
+
}): Promise<void> {
|
|
2301
|
+
return contract.simulate.emergencyWithdraw([amount] as const, options) as Promise<void>;
|
|
2302
|
+
},
|
|
2303
|
+
/**
|
|
2304
|
+
* Simulate initialize
|
|
2305
|
+
* Returns gas estimate and result without sending transaction
|
|
2306
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2307
|
+
*/
|
|
2308
|
+
async initialize(_asset: `0x${string}`, _name: string, _management: `0x${string}`, _performanceFeeRecipient: `0x${string}`, _keeper: `0x${string}`, options?: {
|
|
2309
|
+
accessList?: import('viem').AccessList;
|
|
2310
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2311
|
+
chain?: import('viem').Chain | null;
|
|
2312
|
+
dataSuffix?: `0x${string}`;
|
|
2313
|
+
gas?: bigint;
|
|
2314
|
+
gasPrice?: bigint;
|
|
2315
|
+
maxFeePerGas?: bigint;
|
|
2316
|
+
maxPriorityFeePerGas?: bigint;
|
|
2317
|
+
nonce?: number;
|
|
2318
|
+
value?: bigint;
|
|
2319
|
+
}): Promise<void> {
|
|
2320
|
+
return contract.simulate.initialize([_asset, _name, _management, _performanceFeeRecipient, _keeper] as const, options) as Promise<void>;
|
|
2321
|
+
},
|
|
2322
|
+
/**
|
|
2323
|
+
* Simulate mint
|
|
2324
|
+
* Returns gas estimate and result without sending transaction
|
|
2325
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2326
|
+
*/
|
|
2327
|
+
async mint(shares: bigint, receiver: `0x${string}`, options?: {
|
|
2328
|
+
accessList?: import('viem').AccessList;
|
|
2329
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2330
|
+
chain?: import('viem').Chain | null;
|
|
2331
|
+
dataSuffix?: `0x${string}`;
|
|
2332
|
+
gas?: bigint;
|
|
2333
|
+
gasPrice?: bigint;
|
|
2334
|
+
maxFeePerGas?: bigint;
|
|
2335
|
+
maxPriorityFeePerGas?: bigint;
|
|
2336
|
+
nonce?: number;
|
|
2337
|
+
value?: bigint;
|
|
2338
|
+
}): Promise<bigint> {
|
|
2339
|
+
return contract.simulate.mint([shares, receiver] as const, options) as Promise<bigint>;
|
|
2340
|
+
},
|
|
2341
|
+
/**
|
|
2342
|
+
* Simulate permit
|
|
2343
|
+
* Returns gas estimate and result without sending transaction
|
|
2344
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2345
|
+
*/
|
|
2346
|
+
async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
2347
|
+
accessList?: import('viem').AccessList;
|
|
2348
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2349
|
+
chain?: import('viem').Chain | null;
|
|
2350
|
+
dataSuffix?: `0x${string}`;
|
|
2351
|
+
gas?: bigint;
|
|
2352
|
+
gasPrice?: bigint;
|
|
2353
|
+
maxFeePerGas?: bigint;
|
|
2354
|
+
maxPriorityFeePerGas?: bigint;
|
|
2355
|
+
nonce?: number;
|
|
2356
|
+
value?: bigint;
|
|
2357
|
+
}): Promise<void> {
|
|
2358
|
+
return contract.simulate.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<void>;
|
|
2359
|
+
},
|
|
2360
|
+
/**
|
|
2361
|
+
* Simulate redeem
|
|
2362
|
+
* Returns gas estimate and result without sending transaction
|
|
2363
|
+
* Supports multiple overloads: (uint256, address, address, uint256), (uint256, address, address)
|
|
2364
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2365
|
+
*/
|
|
2366
|
+
async redeem(...args: any[]): Promise<any> {
|
|
2367
|
+
return contract.simulate.redeem(args as any) as Promise<any>;
|
|
2368
|
+
},
|
|
2369
|
+
/**
|
|
2370
|
+
* Simulate report
|
|
2371
|
+
* Returns gas estimate and result without sending transaction
|
|
2372
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2373
|
+
*/
|
|
2374
|
+
async report(options?: {
|
|
2375
|
+
accessList?: import('viem').AccessList;
|
|
2376
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2377
|
+
chain?: import('viem').Chain | null;
|
|
2378
|
+
dataSuffix?: `0x${string}`;
|
|
2379
|
+
gas?: bigint;
|
|
2380
|
+
gasPrice?: bigint;
|
|
2381
|
+
maxFeePerGas?: bigint;
|
|
2382
|
+
maxPriorityFeePerGas?: bigint;
|
|
2383
|
+
nonce?: number;
|
|
2384
|
+
value?: bigint;
|
|
2385
|
+
}): Promise<[bigint, bigint]> {
|
|
2386
|
+
return contract.simulate.report(options) as Promise<[bigint, bigint]>;
|
|
2387
|
+
},
|
|
2388
|
+
/**
|
|
2389
|
+
* Simulate setEmergencyAdmin
|
|
2390
|
+
* Returns gas estimate and result without sending transaction
|
|
2391
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2392
|
+
*/
|
|
2393
|
+
async setEmergencyAdmin(_emergencyAdmin: `0x${string}`, options?: {
|
|
2394
|
+
accessList?: import('viem').AccessList;
|
|
2395
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2396
|
+
chain?: import('viem').Chain | null;
|
|
2397
|
+
dataSuffix?: `0x${string}`;
|
|
2398
|
+
gas?: bigint;
|
|
2399
|
+
gasPrice?: bigint;
|
|
2400
|
+
maxFeePerGas?: bigint;
|
|
2401
|
+
maxPriorityFeePerGas?: bigint;
|
|
2402
|
+
nonce?: number;
|
|
2403
|
+
value?: bigint;
|
|
2404
|
+
}): Promise<void> {
|
|
2405
|
+
return contract.simulate.setEmergencyAdmin([_emergencyAdmin] as const, options) as Promise<void>;
|
|
2406
|
+
},
|
|
2407
|
+
/**
|
|
2408
|
+
* Simulate setKeeper
|
|
2409
|
+
* Returns gas estimate and result without sending transaction
|
|
2410
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2411
|
+
*/
|
|
2412
|
+
async setKeeper(_keeper: `0x${string}`, options?: {
|
|
2413
|
+
accessList?: import('viem').AccessList;
|
|
2414
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2415
|
+
chain?: import('viem').Chain | null;
|
|
2416
|
+
dataSuffix?: `0x${string}`;
|
|
2417
|
+
gas?: bigint;
|
|
2418
|
+
gasPrice?: bigint;
|
|
2419
|
+
maxFeePerGas?: bigint;
|
|
2420
|
+
maxPriorityFeePerGas?: bigint;
|
|
2421
|
+
nonce?: number;
|
|
2422
|
+
value?: bigint;
|
|
2423
|
+
}): Promise<void> {
|
|
2424
|
+
return contract.simulate.setKeeper([_keeper] as const, options) as Promise<void>;
|
|
2425
|
+
},
|
|
2426
|
+
/**
|
|
2427
|
+
* Simulate setPendingManagement
|
|
2428
|
+
* Returns gas estimate and result without sending transaction
|
|
2429
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2430
|
+
*/
|
|
2431
|
+
async setPendingManagement(_management: `0x${string}`, options?: {
|
|
2432
|
+
accessList?: import('viem').AccessList;
|
|
2433
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2434
|
+
chain?: import('viem').Chain | null;
|
|
2435
|
+
dataSuffix?: `0x${string}`;
|
|
2436
|
+
gas?: bigint;
|
|
2437
|
+
gasPrice?: bigint;
|
|
2438
|
+
maxFeePerGas?: bigint;
|
|
2439
|
+
maxPriorityFeePerGas?: bigint;
|
|
2440
|
+
nonce?: number;
|
|
2441
|
+
value?: bigint;
|
|
2442
|
+
}): Promise<void> {
|
|
2443
|
+
return contract.simulate.setPendingManagement([_management] as const, options) as Promise<void>;
|
|
2444
|
+
},
|
|
2445
|
+
/**
|
|
2446
|
+
* Simulate setPerformanceFee
|
|
2447
|
+
* Returns gas estimate and result without sending transaction
|
|
2448
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2449
|
+
*/
|
|
2450
|
+
async setPerformanceFee(_performanceFee: bigint, options?: {
|
|
2451
|
+
accessList?: import('viem').AccessList;
|
|
2452
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2453
|
+
chain?: import('viem').Chain | null;
|
|
2454
|
+
dataSuffix?: `0x${string}`;
|
|
2455
|
+
gas?: bigint;
|
|
2456
|
+
gasPrice?: bigint;
|
|
2457
|
+
maxFeePerGas?: bigint;
|
|
2458
|
+
maxPriorityFeePerGas?: bigint;
|
|
2459
|
+
nonce?: number;
|
|
2460
|
+
value?: bigint;
|
|
2461
|
+
}): Promise<void> {
|
|
2462
|
+
return contract.simulate.setPerformanceFee([_performanceFee] as const, options) as Promise<void>;
|
|
2463
|
+
},
|
|
2464
|
+
/**
|
|
2465
|
+
* Simulate setPerformanceFeeRecipient
|
|
2466
|
+
* Returns gas estimate and result without sending transaction
|
|
2467
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2468
|
+
*/
|
|
2469
|
+
async setPerformanceFeeRecipient(_performanceFeeRecipient: `0x${string}`, options?: {
|
|
2470
|
+
accessList?: import('viem').AccessList;
|
|
2471
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2472
|
+
chain?: import('viem').Chain | null;
|
|
2473
|
+
dataSuffix?: `0x${string}`;
|
|
2474
|
+
gas?: bigint;
|
|
2475
|
+
gasPrice?: bigint;
|
|
2476
|
+
maxFeePerGas?: bigint;
|
|
2477
|
+
maxPriorityFeePerGas?: bigint;
|
|
2478
|
+
nonce?: number;
|
|
2479
|
+
value?: bigint;
|
|
2480
|
+
}): Promise<void> {
|
|
2481
|
+
return contract.simulate.setPerformanceFeeRecipient([_performanceFeeRecipient] as const, options) as Promise<void>;
|
|
2482
|
+
},
|
|
2483
|
+
/**
|
|
2484
|
+
* Simulate setProfitMaxUnlockTime
|
|
2485
|
+
* Returns gas estimate and result without sending transaction
|
|
2486
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2487
|
+
*/
|
|
2488
|
+
async setProfitMaxUnlockTime(_profitMaxUnlockTime: bigint, options?: {
|
|
2489
|
+
accessList?: import('viem').AccessList;
|
|
2490
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2491
|
+
chain?: import('viem').Chain | null;
|
|
2492
|
+
dataSuffix?: `0x${string}`;
|
|
2493
|
+
gas?: bigint;
|
|
2494
|
+
gasPrice?: bigint;
|
|
2495
|
+
maxFeePerGas?: bigint;
|
|
2496
|
+
maxPriorityFeePerGas?: bigint;
|
|
2497
|
+
nonce?: number;
|
|
2498
|
+
value?: bigint;
|
|
2499
|
+
}): Promise<void> {
|
|
2500
|
+
return contract.simulate.setProfitMaxUnlockTime([_profitMaxUnlockTime] as const, options) as Promise<void>;
|
|
2501
|
+
},
|
|
2502
|
+
/**
|
|
2503
|
+
* Simulate shutdownStrategy
|
|
2504
|
+
* Returns gas estimate and result without sending transaction
|
|
2505
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2506
|
+
*/
|
|
2507
|
+
async shutdownStrategy(options?: {
|
|
2508
|
+
accessList?: import('viem').AccessList;
|
|
2509
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2510
|
+
chain?: import('viem').Chain | null;
|
|
2511
|
+
dataSuffix?: `0x${string}`;
|
|
2512
|
+
gas?: bigint;
|
|
2513
|
+
gasPrice?: bigint;
|
|
2514
|
+
maxFeePerGas?: bigint;
|
|
2515
|
+
maxPriorityFeePerGas?: bigint;
|
|
2516
|
+
nonce?: number;
|
|
2517
|
+
value?: bigint;
|
|
2518
|
+
}): Promise<void> {
|
|
2519
|
+
return contract.simulate.shutdownStrategy(options) as Promise<void>;
|
|
2520
|
+
},
|
|
2521
|
+
/**
|
|
2522
|
+
* Simulate tend
|
|
2523
|
+
* Returns gas estimate and result without sending transaction
|
|
2524
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2525
|
+
*/
|
|
2526
|
+
async tend(options?: {
|
|
2527
|
+
accessList?: import('viem').AccessList;
|
|
2528
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2529
|
+
chain?: import('viem').Chain | null;
|
|
2530
|
+
dataSuffix?: `0x${string}`;
|
|
2531
|
+
gas?: bigint;
|
|
2532
|
+
gasPrice?: bigint;
|
|
2533
|
+
maxFeePerGas?: bigint;
|
|
2534
|
+
maxPriorityFeePerGas?: bigint;
|
|
2535
|
+
nonce?: number;
|
|
2536
|
+
value?: bigint;
|
|
2537
|
+
}): Promise<void> {
|
|
2538
|
+
return contract.simulate.tend(options) as Promise<void>;
|
|
2539
|
+
},
|
|
2540
|
+
/**
|
|
2541
|
+
* Simulate transfer
|
|
2542
|
+
* Returns gas estimate and result without sending transaction
|
|
2543
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2544
|
+
*/
|
|
2545
|
+
async transfer(to: `0x${string}`, amount: bigint, options?: {
|
|
2546
|
+
accessList?: import('viem').AccessList;
|
|
2547
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2548
|
+
chain?: import('viem').Chain | null;
|
|
2549
|
+
dataSuffix?: `0x${string}`;
|
|
2550
|
+
gas?: bigint;
|
|
2551
|
+
gasPrice?: bigint;
|
|
2552
|
+
maxFeePerGas?: bigint;
|
|
2553
|
+
maxPriorityFeePerGas?: bigint;
|
|
2554
|
+
nonce?: number;
|
|
2555
|
+
value?: bigint;
|
|
2556
|
+
}): Promise<boolean> {
|
|
2557
|
+
return contract.simulate.transfer([to, amount] as const, options) as Promise<boolean>;
|
|
2558
|
+
},
|
|
2559
|
+
/**
|
|
2560
|
+
* Simulate transferFrom
|
|
2561
|
+
* Returns gas estimate and result without sending transaction
|
|
2562
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2563
|
+
*/
|
|
2564
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
|
|
2565
|
+
accessList?: import('viem').AccessList;
|
|
2566
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2567
|
+
chain?: import('viem').Chain | null;
|
|
2568
|
+
dataSuffix?: `0x${string}`;
|
|
2569
|
+
gas?: bigint;
|
|
2570
|
+
gasPrice?: bigint;
|
|
2571
|
+
maxFeePerGas?: bigint;
|
|
2572
|
+
maxPriorityFeePerGas?: bigint;
|
|
2573
|
+
nonce?: number;
|
|
2574
|
+
value?: bigint;
|
|
2575
|
+
}): Promise<boolean> {
|
|
2576
|
+
return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
|
|
2577
|
+
},
|
|
2578
|
+
/**
|
|
2579
|
+
* Simulate withdraw
|
|
2580
|
+
* Returns gas estimate and result without sending transaction
|
|
2581
|
+
* Supports multiple overloads: (uint256, address, address, uint256), (uint256, address, address)
|
|
2582
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2583
|
+
*/
|
|
2584
|
+
async withdraw(...args: any[]): Promise<any> {
|
|
2585
|
+
return contract.simulate.withdraw(args as any) as Promise<any>;
|
|
2586
|
+
}
|
|
2587
|
+
};
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
/**
|
|
2591
|
+
* Watch contract events
|
|
2592
|
+
*
|
|
2593
|
+
* @example
|
|
2594
|
+
* // Watch all Transfer events
|
|
2595
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
2596
|
+
* console.log('Transfer:', event);
|
|
2597
|
+
* });
|
|
2598
|
+
*
|
|
2599
|
+
* // Stop watching
|
|
2600
|
+
* unwatch();
|
|
2601
|
+
*/
|
|
2602
|
+
get watch() {
|
|
2603
|
+
return {
|
|
2604
|
+
/**
|
|
2605
|
+
* Watch Approval events
|
|
2606
|
+
* @param callback Function to call when event is emitted
|
|
2607
|
+
* @param filter Optional filter for indexed parameters
|
|
2608
|
+
* @returns Unwatch function to stop listening
|
|
2609
|
+
*/
|
|
2610
|
+
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
|
|
2611
|
+
return this.publicClient.watchContractEvent({
|
|
2612
|
+
address: this.contractAddress,
|
|
2613
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2614
|
+
eventName: 'Approval',
|
|
2615
|
+
args: filter,
|
|
2616
|
+
onLogs: (logs: any[]) => {
|
|
2617
|
+
logs.forEach((log: any) => {
|
|
2618
|
+
callback(log.args as any);
|
|
2619
|
+
});
|
|
2620
|
+
},
|
|
2621
|
+
}) as () => void;
|
|
2622
|
+
},
|
|
2623
|
+
/**
|
|
2624
|
+
* Watch Deposit events
|
|
2625
|
+
* @param callback Function to call when event is emitted
|
|
2626
|
+
* @param filter Optional filter for indexed parameters
|
|
2627
|
+
* @returns Unwatch function to stop listening
|
|
2628
|
+
*/
|
|
2629
|
+
Deposit: (callback: (event: { caller: `0x${string}`; owner: `0x${string}`; assets: bigint; shares: bigint }) => void, filter?: { caller: `0x${string}`; owner: `0x${string}` }) => {
|
|
2630
|
+
return this.publicClient.watchContractEvent({
|
|
2631
|
+
address: this.contractAddress,
|
|
2632
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2633
|
+
eventName: 'Deposit',
|
|
2634
|
+
args: filter,
|
|
2635
|
+
onLogs: (logs: any[]) => {
|
|
2636
|
+
logs.forEach((log: any) => {
|
|
2637
|
+
callback(log.args as any);
|
|
2638
|
+
});
|
|
2639
|
+
},
|
|
2640
|
+
}) as () => void;
|
|
2641
|
+
},
|
|
2642
|
+
/**
|
|
2643
|
+
* Watch NewTokenizedStrategy events
|
|
2644
|
+
* @param callback Function to call when event is emitted
|
|
2645
|
+
* @param filter Optional filter for indexed parameters
|
|
2646
|
+
* @returns Unwatch function to stop listening
|
|
2647
|
+
*/
|
|
2648
|
+
NewTokenizedStrategy: (callback: (event: { strategy: `0x${string}`; asset: `0x${string}`; apiVersion: string }) => void, filter?: { strategy: `0x${string}`; asset: `0x${string}` }) => {
|
|
2649
|
+
return this.publicClient.watchContractEvent({
|
|
2650
|
+
address: this.contractAddress,
|
|
2651
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2652
|
+
eventName: 'NewTokenizedStrategy',
|
|
2653
|
+
args: filter,
|
|
2654
|
+
onLogs: (logs: any[]) => {
|
|
2655
|
+
logs.forEach((log: any) => {
|
|
2656
|
+
callback(log.args as any);
|
|
2657
|
+
});
|
|
2658
|
+
},
|
|
2659
|
+
}) as () => void;
|
|
2660
|
+
},
|
|
2661
|
+
/**
|
|
2662
|
+
* Watch Reported events
|
|
2663
|
+
* @param callback Function to call when event is emitted
|
|
2664
|
+
* @param filter Optional filter for indexed parameters
|
|
2665
|
+
* @returns Unwatch function to stop listening
|
|
2666
|
+
*/
|
|
2667
|
+
Reported: (callback: (event: { profit: bigint; loss: bigint; protocolFees: bigint; performanceFees: bigint }) => void) => {
|
|
2668
|
+
return this.publicClient.watchContractEvent({
|
|
2669
|
+
address: this.contractAddress,
|
|
2670
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2671
|
+
eventName: 'Reported',
|
|
2672
|
+
|
|
2673
|
+
onLogs: (logs: any[]) => {
|
|
2674
|
+
logs.forEach((log: any) => {
|
|
2675
|
+
callback(log.args as any);
|
|
2676
|
+
});
|
|
2677
|
+
},
|
|
2678
|
+
}) as () => void;
|
|
2679
|
+
},
|
|
2680
|
+
/**
|
|
2681
|
+
* Watch StrategyShutdown events
|
|
2682
|
+
* @param callback Function to call when event is emitted
|
|
2683
|
+
* @param filter Optional filter for indexed parameters
|
|
2684
|
+
* @returns Unwatch function to stop listening
|
|
2685
|
+
*/
|
|
2686
|
+
StrategyShutdown: (callback: (event: { }) => void) => {
|
|
2687
|
+
return this.publicClient.watchContractEvent({
|
|
2688
|
+
address: this.contractAddress,
|
|
2689
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2690
|
+
eventName: 'StrategyShutdown',
|
|
2691
|
+
|
|
2692
|
+
onLogs: (logs: any[]) => {
|
|
2693
|
+
logs.forEach((log: any) => {
|
|
2694
|
+
callback(log.args as any);
|
|
2695
|
+
});
|
|
2696
|
+
},
|
|
2697
|
+
}) as () => void;
|
|
2698
|
+
},
|
|
2699
|
+
/**
|
|
2700
|
+
* Watch Transfer events
|
|
2701
|
+
* @param callback Function to call when event is emitted
|
|
2702
|
+
* @param filter Optional filter for indexed parameters
|
|
2703
|
+
* @returns Unwatch function to stop listening
|
|
2704
|
+
*/
|
|
2705
|
+
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
|
|
2706
|
+
return this.publicClient.watchContractEvent({
|
|
2707
|
+
address: this.contractAddress,
|
|
2708
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2709
|
+
eventName: 'Transfer',
|
|
2710
|
+
args: filter,
|
|
2711
|
+
onLogs: (logs: any[]) => {
|
|
2712
|
+
logs.forEach((log: any) => {
|
|
2713
|
+
callback(log.args as any);
|
|
2714
|
+
});
|
|
2715
|
+
},
|
|
2716
|
+
}) as () => void;
|
|
2717
|
+
},
|
|
2718
|
+
/**
|
|
2719
|
+
* Watch UpdateEmergencyAdmin events
|
|
2720
|
+
* @param callback Function to call when event is emitted
|
|
2721
|
+
* @param filter Optional filter for indexed parameters
|
|
2722
|
+
* @returns Unwatch function to stop listening
|
|
2723
|
+
*/
|
|
2724
|
+
UpdateEmergencyAdmin: (callback: (event: { newEmergencyAdmin: `0x${string}` }) => void, filter?: { newEmergencyAdmin: `0x${string}` }) => {
|
|
2725
|
+
return this.publicClient.watchContractEvent({
|
|
2726
|
+
address: this.contractAddress,
|
|
2727
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2728
|
+
eventName: 'UpdateEmergencyAdmin',
|
|
2729
|
+
args: filter,
|
|
2730
|
+
onLogs: (logs: any[]) => {
|
|
2731
|
+
logs.forEach((log: any) => {
|
|
2732
|
+
callback(log.args as any);
|
|
2733
|
+
});
|
|
2734
|
+
},
|
|
2735
|
+
}) as () => void;
|
|
2736
|
+
},
|
|
2737
|
+
/**
|
|
2738
|
+
* Watch UpdateKeeper events
|
|
2739
|
+
* @param callback Function to call when event is emitted
|
|
2740
|
+
* @param filter Optional filter for indexed parameters
|
|
2741
|
+
* @returns Unwatch function to stop listening
|
|
2742
|
+
*/
|
|
2743
|
+
UpdateKeeper: (callback: (event: { newKeeper: `0x${string}` }) => void, filter?: { newKeeper: `0x${string}` }) => {
|
|
2744
|
+
return this.publicClient.watchContractEvent({
|
|
2745
|
+
address: this.contractAddress,
|
|
2746
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2747
|
+
eventName: 'UpdateKeeper',
|
|
2748
|
+
args: filter,
|
|
2749
|
+
onLogs: (logs: any[]) => {
|
|
2750
|
+
logs.forEach((log: any) => {
|
|
2751
|
+
callback(log.args as any);
|
|
2752
|
+
});
|
|
2753
|
+
},
|
|
2754
|
+
}) as () => void;
|
|
2755
|
+
},
|
|
2756
|
+
/**
|
|
2757
|
+
* Watch UpdateManagement events
|
|
2758
|
+
* @param callback Function to call when event is emitted
|
|
2759
|
+
* @param filter Optional filter for indexed parameters
|
|
2760
|
+
* @returns Unwatch function to stop listening
|
|
2761
|
+
*/
|
|
2762
|
+
UpdateManagement: (callback: (event: { newManagement: `0x${string}` }) => void, filter?: { newManagement: `0x${string}` }) => {
|
|
2763
|
+
return this.publicClient.watchContractEvent({
|
|
2764
|
+
address: this.contractAddress,
|
|
2765
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2766
|
+
eventName: 'UpdateManagement',
|
|
2767
|
+
args: filter,
|
|
2768
|
+
onLogs: (logs: any[]) => {
|
|
2769
|
+
logs.forEach((log: any) => {
|
|
2770
|
+
callback(log.args as any);
|
|
2771
|
+
});
|
|
2772
|
+
},
|
|
2773
|
+
}) as () => void;
|
|
2774
|
+
},
|
|
2775
|
+
/**
|
|
2776
|
+
* Watch UpdatePendingManagement events
|
|
2777
|
+
* @param callback Function to call when event is emitted
|
|
2778
|
+
* @param filter Optional filter for indexed parameters
|
|
2779
|
+
* @returns Unwatch function to stop listening
|
|
2780
|
+
*/
|
|
2781
|
+
UpdatePendingManagement: (callback: (event: { newPendingManagement: `0x${string}` }) => void, filter?: { newPendingManagement: `0x${string}` }) => {
|
|
2782
|
+
return this.publicClient.watchContractEvent({
|
|
2783
|
+
address: this.contractAddress,
|
|
2784
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2785
|
+
eventName: 'UpdatePendingManagement',
|
|
2786
|
+
args: filter,
|
|
2787
|
+
onLogs: (logs: any[]) => {
|
|
2788
|
+
logs.forEach((log: any) => {
|
|
2789
|
+
callback(log.args as any);
|
|
2790
|
+
});
|
|
2791
|
+
},
|
|
2792
|
+
}) as () => void;
|
|
2793
|
+
},
|
|
2794
|
+
/**
|
|
2795
|
+
* Watch UpdatePerformanceFee events
|
|
2796
|
+
* @param callback Function to call when event is emitted
|
|
2797
|
+
* @param filter Optional filter for indexed parameters
|
|
2798
|
+
* @returns Unwatch function to stop listening
|
|
2799
|
+
*/
|
|
2800
|
+
UpdatePerformanceFee: (callback: (event: { newPerformanceFee: bigint }) => void) => {
|
|
2801
|
+
return this.publicClient.watchContractEvent({
|
|
2802
|
+
address: this.contractAddress,
|
|
2803
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2804
|
+
eventName: 'UpdatePerformanceFee',
|
|
2805
|
+
|
|
2806
|
+
onLogs: (logs: any[]) => {
|
|
2807
|
+
logs.forEach((log: any) => {
|
|
2808
|
+
callback(log.args as any);
|
|
2809
|
+
});
|
|
2810
|
+
},
|
|
2811
|
+
}) as () => void;
|
|
2812
|
+
},
|
|
2813
|
+
/**
|
|
2814
|
+
* Watch UpdatePerformanceFeeRecipient events
|
|
2815
|
+
* @param callback Function to call when event is emitted
|
|
2816
|
+
* @param filter Optional filter for indexed parameters
|
|
2817
|
+
* @returns Unwatch function to stop listening
|
|
2818
|
+
*/
|
|
2819
|
+
UpdatePerformanceFeeRecipient: (callback: (event: { newPerformanceFeeRecipient: `0x${string}` }) => void, filter?: { newPerformanceFeeRecipient: `0x${string}` }) => {
|
|
2820
|
+
return this.publicClient.watchContractEvent({
|
|
2821
|
+
address: this.contractAddress,
|
|
2822
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2823
|
+
eventName: 'UpdatePerformanceFeeRecipient',
|
|
2824
|
+
args: filter,
|
|
2825
|
+
onLogs: (logs: any[]) => {
|
|
2826
|
+
logs.forEach((log: any) => {
|
|
2827
|
+
callback(log.args as any);
|
|
2828
|
+
});
|
|
2829
|
+
},
|
|
2830
|
+
}) as () => void;
|
|
2831
|
+
},
|
|
2832
|
+
/**
|
|
2833
|
+
* Watch UpdateProfitMaxUnlockTime events
|
|
2834
|
+
* @param callback Function to call when event is emitted
|
|
2835
|
+
* @param filter Optional filter for indexed parameters
|
|
2836
|
+
* @returns Unwatch function to stop listening
|
|
2837
|
+
*/
|
|
2838
|
+
UpdateProfitMaxUnlockTime: (callback: (event: { newProfitMaxUnlockTime: bigint }) => void) => {
|
|
2839
|
+
return this.publicClient.watchContractEvent({
|
|
2840
|
+
address: this.contractAddress,
|
|
2841
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2842
|
+
eventName: 'UpdateProfitMaxUnlockTime',
|
|
2843
|
+
|
|
2844
|
+
onLogs: (logs: any[]) => {
|
|
2845
|
+
logs.forEach((log: any) => {
|
|
2846
|
+
callback(log.args as any);
|
|
2847
|
+
});
|
|
2848
|
+
},
|
|
2849
|
+
}) as () => void;
|
|
2850
|
+
},
|
|
2851
|
+
/**
|
|
2852
|
+
* Watch Withdraw events
|
|
2853
|
+
* @param callback Function to call when event is emitted
|
|
2854
|
+
* @param filter Optional filter for indexed parameters
|
|
2855
|
+
* @returns Unwatch function to stop listening
|
|
2856
|
+
*/
|
|
2857
|
+
Withdraw: (callback: (event: { caller: `0x${string}`; receiver: `0x${string}`; owner: `0x${string}`; assets: bigint; shares: bigint }) => void, filter?: { caller: `0x${string}`; receiver: `0x${string}`; owner: `0x${string}` }) => {
|
|
2858
|
+
return this.publicClient.watchContractEvent({
|
|
2859
|
+
address: this.contractAddress,
|
|
2860
|
+
abi: TokenizedStrategy_jsonAbi,
|
|
2861
|
+
eventName: 'Withdraw',
|
|
2862
|
+
args: filter,
|
|
2863
|
+
onLogs: (logs: any[]) => {
|
|
2864
|
+
logs.forEach((log: any) => {
|
|
2865
|
+
callback(log.args as any);
|
|
2866
|
+
});
|
|
2867
|
+
},
|
|
2868
|
+
}) as () => void;
|
|
2869
|
+
}
|
|
2870
|
+
};
|
|
2871
|
+
}
|
|
2872
|
+
}
|