@gitmyabi-stg/msy 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -0
- package/contracts/ERC1967Proxy.d.ts +144 -0
- package/contracts/ERC1967Proxy.js +180 -0
- package/contracts/ERC1967Proxy.ts +209 -0
- package/contracts/StakedmsUSD.d.ts +2934 -0
- package/contracts/StakedmsUSD.js +3207 -0
- package/contracts/StakedmsUSD.ts +3927 -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,3927 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* StakedmsUSD ABI
|
|
6
|
+
*
|
|
7
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
8
|
+
*/
|
|
9
|
+
export const StakedmsUSDAbi = [
|
|
10
|
+
{
|
|
11
|
+
"inputs": [],
|
|
12
|
+
"stateMutability": "nonpayable",
|
|
13
|
+
"type": "constructor"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"inputs": [
|
|
17
|
+
{
|
|
18
|
+
"internalType": "address",
|
|
19
|
+
"name": "target",
|
|
20
|
+
"type": "address"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"name": "AddressEmptyCode",
|
|
24
|
+
"type": "error"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"inputs": [
|
|
28
|
+
{
|
|
29
|
+
"internalType": "address",
|
|
30
|
+
"name": "account",
|
|
31
|
+
"type": "address"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"name": "AddressInsufficientBalance",
|
|
35
|
+
"type": "error"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"inputs": [],
|
|
39
|
+
"name": "AlreadySet",
|
|
40
|
+
"type": "error"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"inputs": [
|
|
44
|
+
{
|
|
45
|
+
"internalType": "uint256",
|
|
46
|
+
"name": "currentTimestamp",
|
|
47
|
+
"type": "uint256"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"internalType": "uint256",
|
|
51
|
+
"name": "endTimestamp",
|
|
52
|
+
"type": "uint256"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"name": "CooldownNotFinished",
|
|
56
|
+
"type": "error"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"inputs": [],
|
|
60
|
+
"name": "CoverageRatioZero",
|
|
61
|
+
"type": "error"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"inputs": [],
|
|
65
|
+
"name": "DelayNotPassed",
|
|
66
|
+
"type": "error"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"inputs": [],
|
|
70
|
+
"name": "DepositsDisabled",
|
|
71
|
+
"type": "error"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"inputs": [
|
|
75
|
+
{
|
|
76
|
+
"internalType": "address",
|
|
77
|
+
"name": "implementation",
|
|
78
|
+
"type": "address"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"name": "ERC1967InvalidImplementation",
|
|
82
|
+
"type": "error"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"inputs": [],
|
|
86
|
+
"name": "ERC1967NonPayable",
|
|
87
|
+
"type": "error"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"inputs": [
|
|
91
|
+
{
|
|
92
|
+
"internalType": "address",
|
|
93
|
+
"name": "spender",
|
|
94
|
+
"type": "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"internalType": "uint256",
|
|
98
|
+
"name": "allowance",
|
|
99
|
+
"type": "uint256"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"internalType": "uint256",
|
|
103
|
+
"name": "needed",
|
|
104
|
+
"type": "uint256"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"name": "ERC20InsufficientAllowance",
|
|
108
|
+
"type": "error"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"inputs": [
|
|
112
|
+
{
|
|
113
|
+
"internalType": "address",
|
|
114
|
+
"name": "sender",
|
|
115
|
+
"type": "address"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"internalType": "uint256",
|
|
119
|
+
"name": "balance",
|
|
120
|
+
"type": "uint256"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"internalType": "uint256",
|
|
124
|
+
"name": "needed",
|
|
125
|
+
"type": "uint256"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"name": "ERC20InsufficientBalance",
|
|
129
|
+
"type": "error"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"inputs": [
|
|
133
|
+
{
|
|
134
|
+
"internalType": "address",
|
|
135
|
+
"name": "approver",
|
|
136
|
+
"type": "address"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"name": "ERC20InvalidApprover",
|
|
140
|
+
"type": "error"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"inputs": [
|
|
144
|
+
{
|
|
145
|
+
"internalType": "address",
|
|
146
|
+
"name": "receiver",
|
|
147
|
+
"type": "address"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"name": "ERC20InvalidReceiver",
|
|
151
|
+
"type": "error"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"inputs": [
|
|
155
|
+
{
|
|
156
|
+
"internalType": "address",
|
|
157
|
+
"name": "sender",
|
|
158
|
+
"type": "address"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"name": "ERC20InvalidSender",
|
|
162
|
+
"type": "error"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"inputs": [
|
|
166
|
+
{
|
|
167
|
+
"internalType": "address",
|
|
168
|
+
"name": "spender",
|
|
169
|
+
"type": "address"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"name": "ERC20InvalidSpender",
|
|
173
|
+
"type": "error"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"inputs": [
|
|
177
|
+
{
|
|
178
|
+
"internalType": "address",
|
|
179
|
+
"name": "receiver",
|
|
180
|
+
"type": "address"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"internalType": "uint256",
|
|
184
|
+
"name": "assets",
|
|
185
|
+
"type": "uint256"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"internalType": "uint256",
|
|
189
|
+
"name": "max",
|
|
190
|
+
"type": "uint256"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"name": "ERC4626ExceededMaxDeposit",
|
|
194
|
+
"type": "error"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"inputs": [
|
|
198
|
+
{
|
|
199
|
+
"internalType": "address",
|
|
200
|
+
"name": "receiver",
|
|
201
|
+
"type": "address"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"internalType": "uint256",
|
|
205
|
+
"name": "shares",
|
|
206
|
+
"type": "uint256"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"internalType": "uint256",
|
|
210
|
+
"name": "max",
|
|
211
|
+
"type": "uint256"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"name": "ERC4626ExceededMaxMint",
|
|
215
|
+
"type": "error"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"inputs": [
|
|
219
|
+
{
|
|
220
|
+
"internalType": "address",
|
|
221
|
+
"name": "owner",
|
|
222
|
+
"type": "address"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"internalType": "uint256",
|
|
226
|
+
"name": "shares",
|
|
227
|
+
"type": "uint256"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"internalType": "uint256",
|
|
231
|
+
"name": "max",
|
|
232
|
+
"type": "uint256"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"name": "ERC4626ExceededMaxRedeem",
|
|
236
|
+
"type": "error"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"inputs": [
|
|
240
|
+
{
|
|
241
|
+
"internalType": "address",
|
|
242
|
+
"name": "owner",
|
|
243
|
+
"type": "address"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"internalType": "uint256",
|
|
247
|
+
"name": "assets",
|
|
248
|
+
"type": "uint256"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"internalType": "uint256",
|
|
252
|
+
"name": "max",
|
|
253
|
+
"type": "uint256"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"name": "ERC4626ExceededMaxWithdraw",
|
|
257
|
+
"type": "error"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"inputs": [],
|
|
261
|
+
"name": "ExcessiveRedeemAmount",
|
|
262
|
+
"type": "error"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"inputs": [],
|
|
266
|
+
"name": "ExcessiveWithdrawAmount",
|
|
267
|
+
"type": "error"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"inputs": [],
|
|
271
|
+
"name": "FailedInnerCall",
|
|
272
|
+
"type": "error"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"inputs": [],
|
|
276
|
+
"name": "ImplementationMismatch",
|
|
277
|
+
"type": "error"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"inputs": [],
|
|
281
|
+
"name": "InvalidAmount",
|
|
282
|
+
"type": "error"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"inputs": [],
|
|
286
|
+
"name": "InvalidCooldown",
|
|
287
|
+
"type": "error"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"inputs": [],
|
|
291
|
+
"name": "InvalidInitialization",
|
|
292
|
+
"type": "error"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"inputs": [],
|
|
296
|
+
"name": "InvalidRatio",
|
|
297
|
+
"type": "error"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"inputs": [],
|
|
301
|
+
"name": "InvalidToken",
|
|
302
|
+
"type": "error"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"inputs": [],
|
|
306
|
+
"name": "InvalidZeroAddress",
|
|
307
|
+
"type": "error"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"inputs": [],
|
|
311
|
+
"name": "MathOverflowedMulDiv",
|
|
312
|
+
"type": "error"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"inputs": [],
|
|
316
|
+
"name": "MinDelayNotMet",
|
|
317
|
+
"type": "error"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"inputs": [],
|
|
321
|
+
"name": "MinSharesViolation",
|
|
322
|
+
"type": "error"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"inputs": [
|
|
326
|
+
{
|
|
327
|
+
"internalType": "address",
|
|
328
|
+
"name": "",
|
|
329
|
+
"type": "address"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"name": "NotAuthorized",
|
|
333
|
+
"type": "error"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"inputs": [],
|
|
337
|
+
"name": "NotInitializing",
|
|
338
|
+
"type": "error"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"inputs": [],
|
|
342
|
+
"name": "NothingToUnstake",
|
|
343
|
+
"type": "error"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"inputs": [],
|
|
347
|
+
"name": "NullAddress",
|
|
348
|
+
"type": "error"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"inputs": [],
|
|
352
|
+
"name": "OperationNotAllowed",
|
|
353
|
+
"type": "error"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"inputs": [
|
|
357
|
+
{
|
|
358
|
+
"internalType": "address",
|
|
359
|
+
"name": "owner",
|
|
360
|
+
"type": "address"
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
"name": "OwnableInvalidOwner",
|
|
364
|
+
"type": "error"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"inputs": [
|
|
368
|
+
{
|
|
369
|
+
"internalType": "address",
|
|
370
|
+
"name": "account",
|
|
371
|
+
"type": "address"
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
"name": "OwnableUnauthorizedAccount",
|
|
375
|
+
"type": "error"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"inputs": [],
|
|
379
|
+
"name": "ReentrancyGuardReentrantCall",
|
|
380
|
+
"type": "error"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"inputs": [
|
|
384
|
+
{
|
|
385
|
+
"internalType": "address",
|
|
386
|
+
"name": "token",
|
|
387
|
+
"type": "address"
|
|
388
|
+
}
|
|
389
|
+
],
|
|
390
|
+
"name": "SafeERC20FailedOperation",
|
|
391
|
+
"type": "error"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"inputs": [],
|
|
395
|
+
"name": "SlippageExceeded",
|
|
396
|
+
"type": "error"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"inputs": [],
|
|
400
|
+
"name": "UUPSUnauthorizedCallContext",
|
|
401
|
+
"type": "error"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"inputs": [
|
|
405
|
+
{
|
|
406
|
+
"internalType": "bytes32",
|
|
407
|
+
"name": "slot",
|
|
408
|
+
"type": "bytes32"
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"name": "UUPSUnsupportedProxiableUUID",
|
|
412
|
+
"type": "error"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"anonymous": false,
|
|
416
|
+
"inputs": [
|
|
417
|
+
{
|
|
418
|
+
"indexed": true,
|
|
419
|
+
"internalType": "address",
|
|
420
|
+
"name": "owner",
|
|
421
|
+
"type": "address"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"indexed": true,
|
|
425
|
+
"internalType": "address",
|
|
426
|
+
"name": "spender",
|
|
427
|
+
"type": "address"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"indexed": false,
|
|
431
|
+
"internalType": "uint256",
|
|
432
|
+
"name": "value",
|
|
433
|
+
"type": "uint256"
|
|
434
|
+
}
|
|
435
|
+
],
|
|
436
|
+
"name": "Approval",
|
|
437
|
+
"type": "event"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"anonymous": false,
|
|
441
|
+
"inputs": [
|
|
442
|
+
{
|
|
443
|
+
"indexed": false,
|
|
444
|
+
"internalType": "uint256",
|
|
445
|
+
"name": "",
|
|
446
|
+
"type": "uint256"
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
"name": "AssetBurned",
|
|
450
|
+
"type": "event"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"anonymous": false,
|
|
454
|
+
"inputs": [
|
|
455
|
+
{
|
|
456
|
+
"indexed": false,
|
|
457
|
+
"internalType": "uint24",
|
|
458
|
+
"name": "previousDuration",
|
|
459
|
+
"type": "uint24"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"indexed": false,
|
|
463
|
+
"internalType": "uint24",
|
|
464
|
+
"name": "newDuration",
|
|
465
|
+
"type": "uint24"
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
"name": "CooldownDurationUpdated",
|
|
469
|
+
"type": "event"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"anonymous": false,
|
|
473
|
+
"inputs": [
|
|
474
|
+
{
|
|
475
|
+
"indexed": false,
|
|
476
|
+
"internalType": "address",
|
|
477
|
+
"name": "account",
|
|
478
|
+
"type": "address"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"indexed": false,
|
|
482
|
+
"internalType": "uint256",
|
|
483
|
+
"name": "oldTime",
|
|
484
|
+
"type": "uint256"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"indexed": false,
|
|
488
|
+
"internalType": "uint256",
|
|
489
|
+
"name": "newTime",
|
|
490
|
+
"type": "uint256"
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
"name": "CooldownEndtimeUpdated",
|
|
494
|
+
"type": "event"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"anonymous": false,
|
|
498
|
+
"inputs": [
|
|
499
|
+
{
|
|
500
|
+
"indexed": false,
|
|
501
|
+
"internalType": "uint256",
|
|
502
|
+
"name": "",
|
|
503
|
+
"type": "uint256"
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
"name": "CoverageRatioUpdated",
|
|
507
|
+
"type": "event"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"anonymous": false,
|
|
511
|
+
"inputs": [
|
|
512
|
+
{
|
|
513
|
+
"indexed": true,
|
|
514
|
+
"internalType": "address",
|
|
515
|
+
"name": "sender",
|
|
516
|
+
"type": "address"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"indexed": true,
|
|
520
|
+
"internalType": "address",
|
|
521
|
+
"name": "owner",
|
|
522
|
+
"type": "address"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"indexed": false,
|
|
526
|
+
"internalType": "uint256",
|
|
527
|
+
"name": "assets",
|
|
528
|
+
"type": "uint256"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"indexed": false,
|
|
532
|
+
"internalType": "uint256",
|
|
533
|
+
"name": "shares",
|
|
534
|
+
"type": "uint256"
|
|
535
|
+
}
|
|
536
|
+
],
|
|
537
|
+
"name": "Deposit",
|
|
538
|
+
"type": "event"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"anonymous": false,
|
|
542
|
+
"inputs": [
|
|
543
|
+
{
|
|
544
|
+
"indexed": false,
|
|
545
|
+
"internalType": "bool",
|
|
546
|
+
"name": "",
|
|
547
|
+
"type": "bool"
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
"name": "DepositsToggled",
|
|
551
|
+
"type": "event"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"anonymous": false,
|
|
555
|
+
"inputs": [
|
|
556
|
+
{
|
|
557
|
+
"indexed": false,
|
|
558
|
+
"internalType": "address",
|
|
559
|
+
"name": "",
|
|
560
|
+
"type": "address"
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"name": "FeeSiloUpdated",
|
|
564
|
+
"type": "event"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"anonymous": false,
|
|
568
|
+
"inputs": [
|
|
569
|
+
{
|
|
570
|
+
"indexed": false,
|
|
571
|
+
"internalType": "uint64",
|
|
572
|
+
"name": "version",
|
|
573
|
+
"type": "uint64"
|
|
574
|
+
}
|
|
575
|
+
],
|
|
576
|
+
"name": "Initialized",
|
|
577
|
+
"type": "event"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"anonymous": false,
|
|
581
|
+
"inputs": [
|
|
582
|
+
{
|
|
583
|
+
"indexed": true,
|
|
584
|
+
"internalType": "address",
|
|
585
|
+
"name": "from",
|
|
586
|
+
"type": "address"
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"indexed": true,
|
|
590
|
+
"internalType": "address",
|
|
591
|
+
"name": "to",
|
|
592
|
+
"type": "address"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"indexed": false,
|
|
596
|
+
"internalType": "uint256",
|
|
597
|
+
"name": "amount",
|
|
598
|
+
"type": "uint256"
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
"name": "LockedAmountRedistributed",
|
|
602
|
+
"type": "event"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"anonymous": false,
|
|
606
|
+
"inputs": [
|
|
607
|
+
{
|
|
608
|
+
"indexed": true,
|
|
609
|
+
"internalType": "address",
|
|
610
|
+
"name": "previousOwner",
|
|
611
|
+
"type": "address"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"indexed": true,
|
|
615
|
+
"internalType": "address",
|
|
616
|
+
"name": "newOwner",
|
|
617
|
+
"type": "address"
|
|
618
|
+
}
|
|
619
|
+
],
|
|
620
|
+
"name": "OwnershipTransferred",
|
|
621
|
+
"type": "event"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"anonymous": false,
|
|
625
|
+
"inputs": [
|
|
626
|
+
{
|
|
627
|
+
"indexed": false,
|
|
628
|
+
"internalType": "address",
|
|
629
|
+
"name": "",
|
|
630
|
+
"type": "address"
|
|
631
|
+
}
|
|
632
|
+
],
|
|
633
|
+
"name": "RewarderUpdated",
|
|
634
|
+
"type": "event"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"anonymous": false,
|
|
638
|
+
"inputs": [
|
|
639
|
+
{
|
|
640
|
+
"indexed": true,
|
|
641
|
+
"internalType": "uint256",
|
|
642
|
+
"name": "amount",
|
|
643
|
+
"type": "uint256"
|
|
644
|
+
}
|
|
645
|
+
],
|
|
646
|
+
"name": "RewardsReceived",
|
|
647
|
+
"type": "event"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"anonymous": false,
|
|
651
|
+
"inputs": [
|
|
652
|
+
{
|
|
653
|
+
"indexed": false,
|
|
654
|
+
"internalType": "address",
|
|
655
|
+
"name": "previousSilo",
|
|
656
|
+
"type": "address"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"indexed": false,
|
|
660
|
+
"internalType": "address",
|
|
661
|
+
"name": "newSilo",
|
|
662
|
+
"type": "address"
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
"name": "SiloUpdated",
|
|
666
|
+
"type": "event"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"anonymous": false,
|
|
670
|
+
"inputs": [
|
|
671
|
+
{
|
|
672
|
+
"indexed": false,
|
|
673
|
+
"internalType": "uint16",
|
|
674
|
+
"name": "",
|
|
675
|
+
"type": "uint16"
|
|
676
|
+
}
|
|
677
|
+
],
|
|
678
|
+
"name": "TaxRateUpdated",
|
|
679
|
+
"type": "event"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"anonymous": false,
|
|
683
|
+
"inputs": [
|
|
684
|
+
{
|
|
685
|
+
"indexed": true,
|
|
686
|
+
"internalType": "address",
|
|
687
|
+
"name": "from",
|
|
688
|
+
"type": "address"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"indexed": true,
|
|
692
|
+
"internalType": "address",
|
|
693
|
+
"name": "to",
|
|
694
|
+
"type": "address"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"indexed": false,
|
|
698
|
+
"internalType": "uint256",
|
|
699
|
+
"name": "value",
|
|
700
|
+
"type": "uint256"
|
|
701
|
+
}
|
|
702
|
+
],
|
|
703
|
+
"name": "Transfer",
|
|
704
|
+
"type": "event"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"anonymous": false,
|
|
708
|
+
"inputs": [
|
|
709
|
+
{
|
|
710
|
+
"indexed": false,
|
|
711
|
+
"internalType": "address",
|
|
712
|
+
"name": "caller",
|
|
713
|
+
"type": "address"
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"indexed": false,
|
|
717
|
+
"internalType": "address",
|
|
718
|
+
"name": "receiver",
|
|
719
|
+
"type": "address"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"indexed": false,
|
|
723
|
+
"internalType": "uint256",
|
|
724
|
+
"name": "assets",
|
|
725
|
+
"type": "uint256"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"indexed": false,
|
|
729
|
+
"internalType": "uint256",
|
|
730
|
+
"name": "amountForRedeemer",
|
|
731
|
+
"type": "uint256"
|
|
732
|
+
}
|
|
733
|
+
],
|
|
734
|
+
"name": "Unstake",
|
|
735
|
+
"type": "event"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"anonymous": false,
|
|
739
|
+
"inputs": [
|
|
740
|
+
{
|
|
741
|
+
"indexed": true,
|
|
742
|
+
"internalType": "address",
|
|
743
|
+
"name": "canceledImplementation",
|
|
744
|
+
"type": "address"
|
|
745
|
+
}
|
|
746
|
+
],
|
|
747
|
+
"name": "UpgradeCanceled",
|
|
748
|
+
"type": "event"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"anonymous": false,
|
|
752
|
+
"inputs": [
|
|
753
|
+
{
|
|
754
|
+
"indexed": false,
|
|
755
|
+
"internalType": "uint256",
|
|
756
|
+
"name": "oldDelay",
|
|
757
|
+
"type": "uint256"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"indexed": false,
|
|
761
|
+
"internalType": "uint256",
|
|
762
|
+
"name": "newDelay",
|
|
763
|
+
"type": "uint256"
|
|
764
|
+
}
|
|
765
|
+
],
|
|
766
|
+
"name": "UpgradeDelayUpdated",
|
|
767
|
+
"type": "event"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"anonymous": false,
|
|
771
|
+
"inputs": [
|
|
772
|
+
{
|
|
773
|
+
"indexed": true,
|
|
774
|
+
"internalType": "address",
|
|
775
|
+
"name": "newImplementation",
|
|
776
|
+
"type": "address"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"indexed": false,
|
|
780
|
+
"internalType": "uint256",
|
|
781
|
+
"name": "availableAt",
|
|
782
|
+
"type": "uint256"
|
|
783
|
+
}
|
|
784
|
+
],
|
|
785
|
+
"name": "UpgradeScheduled",
|
|
786
|
+
"type": "event"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"anonymous": false,
|
|
790
|
+
"inputs": [
|
|
791
|
+
{
|
|
792
|
+
"indexed": true,
|
|
793
|
+
"internalType": "address",
|
|
794
|
+
"name": "implementation",
|
|
795
|
+
"type": "address"
|
|
796
|
+
}
|
|
797
|
+
],
|
|
798
|
+
"name": "Upgraded",
|
|
799
|
+
"type": "event"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"anonymous": false,
|
|
803
|
+
"inputs": [
|
|
804
|
+
{
|
|
805
|
+
"indexed": true,
|
|
806
|
+
"internalType": "address",
|
|
807
|
+
"name": "sender",
|
|
808
|
+
"type": "address"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"indexed": true,
|
|
812
|
+
"internalType": "address",
|
|
813
|
+
"name": "receiver",
|
|
814
|
+
"type": "address"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"indexed": true,
|
|
818
|
+
"internalType": "address",
|
|
819
|
+
"name": "owner",
|
|
820
|
+
"type": "address"
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"indexed": false,
|
|
824
|
+
"internalType": "uint256",
|
|
825
|
+
"name": "assets",
|
|
826
|
+
"type": "uint256"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"indexed": false,
|
|
830
|
+
"internalType": "uint256",
|
|
831
|
+
"name": "shares",
|
|
832
|
+
"type": "uint256"
|
|
833
|
+
}
|
|
834
|
+
],
|
|
835
|
+
"name": "Withdraw",
|
|
836
|
+
"type": "event"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"anonymous": false,
|
|
840
|
+
"inputs": [
|
|
841
|
+
{
|
|
842
|
+
"indexed": false,
|
|
843
|
+
"internalType": "address",
|
|
844
|
+
"name": "",
|
|
845
|
+
"type": "address"
|
|
846
|
+
}
|
|
847
|
+
],
|
|
848
|
+
"name": "msUSDSiloUpdated",
|
|
849
|
+
"type": "event"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"inputs": [],
|
|
853
|
+
"name": "DEFAULT_UPGRADE_DELAY",
|
|
854
|
+
"outputs": [
|
|
855
|
+
{
|
|
856
|
+
"internalType": "uint256",
|
|
857
|
+
"name": "",
|
|
858
|
+
"type": "uint256"
|
|
859
|
+
}
|
|
860
|
+
],
|
|
861
|
+
"stateMutability": "view",
|
|
862
|
+
"type": "function"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"inputs": [],
|
|
866
|
+
"name": "MAX_COOLDOWN_DURATION",
|
|
867
|
+
"outputs": [
|
|
868
|
+
{
|
|
869
|
+
"internalType": "uint24",
|
|
870
|
+
"name": "",
|
|
871
|
+
"type": "uint24"
|
|
872
|
+
}
|
|
873
|
+
],
|
|
874
|
+
"stateMutability": "view",
|
|
875
|
+
"type": "function"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"inputs": [],
|
|
879
|
+
"name": "MIN_SHARES",
|
|
880
|
+
"outputs": [
|
|
881
|
+
{
|
|
882
|
+
"internalType": "uint256",
|
|
883
|
+
"name": "",
|
|
884
|
+
"type": "uint256"
|
|
885
|
+
}
|
|
886
|
+
],
|
|
887
|
+
"stateMutability": "view",
|
|
888
|
+
"type": "function"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"inputs": [],
|
|
892
|
+
"name": "UPGRADE_INTERFACE_VERSION",
|
|
893
|
+
"outputs": [
|
|
894
|
+
{
|
|
895
|
+
"internalType": "string",
|
|
896
|
+
"name": "",
|
|
897
|
+
"type": "string"
|
|
898
|
+
}
|
|
899
|
+
],
|
|
900
|
+
"stateMutability": "view",
|
|
901
|
+
"type": "function"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"inputs": [],
|
|
905
|
+
"name": "activationTime",
|
|
906
|
+
"outputs": [
|
|
907
|
+
{
|
|
908
|
+
"internalType": "uint256",
|
|
909
|
+
"name": "",
|
|
910
|
+
"type": "uint256"
|
|
911
|
+
}
|
|
912
|
+
],
|
|
913
|
+
"stateMutability": "view",
|
|
914
|
+
"type": "function"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"inputs": [
|
|
918
|
+
{
|
|
919
|
+
"internalType": "address",
|
|
920
|
+
"name": "owner",
|
|
921
|
+
"type": "address"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"internalType": "address",
|
|
925
|
+
"name": "spender",
|
|
926
|
+
"type": "address"
|
|
927
|
+
}
|
|
928
|
+
],
|
|
929
|
+
"name": "allowance",
|
|
930
|
+
"outputs": [
|
|
931
|
+
{
|
|
932
|
+
"internalType": "uint256",
|
|
933
|
+
"name": "",
|
|
934
|
+
"type": "uint256"
|
|
935
|
+
}
|
|
936
|
+
],
|
|
937
|
+
"stateMutability": "view",
|
|
938
|
+
"type": "function"
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"inputs": [
|
|
942
|
+
{
|
|
943
|
+
"internalType": "address",
|
|
944
|
+
"name": "spender",
|
|
945
|
+
"type": "address"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"internalType": "uint256",
|
|
949
|
+
"name": "value",
|
|
950
|
+
"type": "uint256"
|
|
951
|
+
}
|
|
952
|
+
],
|
|
953
|
+
"name": "approve",
|
|
954
|
+
"outputs": [
|
|
955
|
+
{
|
|
956
|
+
"internalType": "bool",
|
|
957
|
+
"name": "",
|
|
958
|
+
"type": "bool"
|
|
959
|
+
}
|
|
960
|
+
],
|
|
961
|
+
"stateMutability": "nonpayable",
|
|
962
|
+
"type": "function"
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"inputs": [],
|
|
966
|
+
"name": "asset",
|
|
967
|
+
"outputs": [
|
|
968
|
+
{
|
|
969
|
+
"internalType": "address",
|
|
970
|
+
"name": "",
|
|
971
|
+
"type": "address"
|
|
972
|
+
}
|
|
973
|
+
],
|
|
974
|
+
"stateMutability": "view",
|
|
975
|
+
"type": "function"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"inputs": [
|
|
979
|
+
{
|
|
980
|
+
"internalType": "address",
|
|
981
|
+
"name": "account",
|
|
982
|
+
"type": "address"
|
|
983
|
+
}
|
|
984
|
+
],
|
|
985
|
+
"name": "balanceOf",
|
|
986
|
+
"outputs": [
|
|
987
|
+
{
|
|
988
|
+
"internalType": "uint256",
|
|
989
|
+
"name": "",
|
|
990
|
+
"type": "uint256"
|
|
991
|
+
}
|
|
992
|
+
],
|
|
993
|
+
"stateMutability": "view",
|
|
994
|
+
"type": "function"
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"inputs": [
|
|
998
|
+
{
|
|
999
|
+
"internalType": "uint256",
|
|
1000
|
+
"name": "amount",
|
|
1001
|
+
"type": "uint256"
|
|
1002
|
+
}
|
|
1003
|
+
],
|
|
1004
|
+
"name": "burnAsset",
|
|
1005
|
+
"outputs": [],
|
|
1006
|
+
"stateMutability": "nonpayable",
|
|
1007
|
+
"type": "function"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"inputs": [],
|
|
1011
|
+
"name": "cancelScheduledUpgrade",
|
|
1012
|
+
"outputs": [],
|
|
1013
|
+
"stateMutability": "nonpayable",
|
|
1014
|
+
"type": "function"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"inputs": [
|
|
1018
|
+
{
|
|
1019
|
+
"internalType": "uint256",
|
|
1020
|
+
"name": "shares",
|
|
1021
|
+
"type": "uint256"
|
|
1022
|
+
}
|
|
1023
|
+
],
|
|
1024
|
+
"name": "convertToAssets",
|
|
1025
|
+
"outputs": [
|
|
1026
|
+
{
|
|
1027
|
+
"internalType": "uint256",
|
|
1028
|
+
"name": "",
|
|
1029
|
+
"type": "uint256"
|
|
1030
|
+
}
|
|
1031
|
+
],
|
|
1032
|
+
"stateMutability": "view",
|
|
1033
|
+
"type": "function"
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"inputs": [
|
|
1037
|
+
{
|
|
1038
|
+
"internalType": "uint256",
|
|
1039
|
+
"name": "assets",
|
|
1040
|
+
"type": "uint256"
|
|
1041
|
+
}
|
|
1042
|
+
],
|
|
1043
|
+
"name": "convertToShares",
|
|
1044
|
+
"outputs": [
|
|
1045
|
+
{
|
|
1046
|
+
"internalType": "uint256",
|
|
1047
|
+
"name": "",
|
|
1048
|
+
"type": "uint256"
|
|
1049
|
+
}
|
|
1050
|
+
],
|
|
1051
|
+
"stateMutability": "view",
|
|
1052
|
+
"type": "function"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
"inputs": [
|
|
1056
|
+
{
|
|
1057
|
+
"internalType": "uint256",
|
|
1058
|
+
"name": "assets",
|
|
1059
|
+
"type": "uint256"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"internalType": "address",
|
|
1063
|
+
"name": "owner",
|
|
1064
|
+
"type": "address"
|
|
1065
|
+
}
|
|
1066
|
+
],
|
|
1067
|
+
"name": "cooldownAssets",
|
|
1068
|
+
"outputs": [
|
|
1069
|
+
{
|
|
1070
|
+
"internalType": "uint256",
|
|
1071
|
+
"name": "",
|
|
1072
|
+
"type": "uint256"
|
|
1073
|
+
}
|
|
1074
|
+
],
|
|
1075
|
+
"stateMutability": "nonpayable",
|
|
1076
|
+
"type": "function"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"inputs": [],
|
|
1080
|
+
"name": "cooldownDuration",
|
|
1081
|
+
"outputs": [
|
|
1082
|
+
{
|
|
1083
|
+
"internalType": "uint24",
|
|
1084
|
+
"name": "",
|
|
1085
|
+
"type": "uint24"
|
|
1086
|
+
}
|
|
1087
|
+
],
|
|
1088
|
+
"stateMutability": "view",
|
|
1089
|
+
"type": "function"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"inputs": [
|
|
1093
|
+
{
|
|
1094
|
+
"internalType": "uint256",
|
|
1095
|
+
"name": "shares",
|
|
1096
|
+
"type": "uint256"
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
"internalType": "address",
|
|
1100
|
+
"name": "owner",
|
|
1101
|
+
"type": "address"
|
|
1102
|
+
}
|
|
1103
|
+
],
|
|
1104
|
+
"name": "cooldownShares",
|
|
1105
|
+
"outputs": [
|
|
1106
|
+
{
|
|
1107
|
+
"internalType": "uint256",
|
|
1108
|
+
"name": "",
|
|
1109
|
+
"type": "uint256"
|
|
1110
|
+
}
|
|
1111
|
+
],
|
|
1112
|
+
"stateMutability": "nonpayable",
|
|
1113
|
+
"type": "function"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"inputs": [
|
|
1117
|
+
{
|
|
1118
|
+
"internalType": "address",
|
|
1119
|
+
"name": "",
|
|
1120
|
+
"type": "address"
|
|
1121
|
+
}
|
|
1122
|
+
],
|
|
1123
|
+
"name": "cooldowns",
|
|
1124
|
+
"outputs": [
|
|
1125
|
+
{
|
|
1126
|
+
"internalType": "uint104",
|
|
1127
|
+
"name": "cooldownEnd",
|
|
1128
|
+
"type": "uint104"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"internalType": "uint256",
|
|
1132
|
+
"name": "underlyingAmount",
|
|
1133
|
+
"type": "uint256"
|
|
1134
|
+
}
|
|
1135
|
+
],
|
|
1136
|
+
"stateMutability": "view",
|
|
1137
|
+
"type": "function"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"inputs": [],
|
|
1141
|
+
"name": "coverageRatio",
|
|
1142
|
+
"outputs": [
|
|
1143
|
+
{
|
|
1144
|
+
"internalType": "uint256",
|
|
1145
|
+
"name": "",
|
|
1146
|
+
"type": "uint256"
|
|
1147
|
+
}
|
|
1148
|
+
],
|
|
1149
|
+
"stateMutability": "view",
|
|
1150
|
+
"type": "function"
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
"inputs": [],
|
|
1154
|
+
"name": "decimals",
|
|
1155
|
+
"outputs": [
|
|
1156
|
+
{
|
|
1157
|
+
"internalType": "uint8",
|
|
1158
|
+
"name": "",
|
|
1159
|
+
"type": "uint8"
|
|
1160
|
+
}
|
|
1161
|
+
],
|
|
1162
|
+
"stateMutability": "view",
|
|
1163
|
+
"type": "function"
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"inputs": [
|
|
1167
|
+
{
|
|
1168
|
+
"internalType": "uint256",
|
|
1169
|
+
"name": "assets",
|
|
1170
|
+
"type": "uint256"
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
"internalType": "address",
|
|
1174
|
+
"name": "receiver",
|
|
1175
|
+
"type": "address"
|
|
1176
|
+
}
|
|
1177
|
+
],
|
|
1178
|
+
"name": "deposit",
|
|
1179
|
+
"outputs": [
|
|
1180
|
+
{
|
|
1181
|
+
"internalType": "uint256",
|
|
1182
|
+
"name": "",
|
|
1183
|
+
"type": "uint256"
|
|
1184
|
+
}
|
|
1185
|
+
],
|
|
1186
|
+
"stateMutability": "nonpayable",
|
|
1187
|
+
"type": "function"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"inputs": [],
|
|
1191
|
+
"name": "depositsEnabled",
|
|
1192
|
+
"outputs": [
|
|
1193
|
+
{
|
|
1194
|
+
"internalType": "bool",
|
|
1195
|
+
"name": "",
|
|
1196
|
+
"type": "bool"
|
|
1197
|
+
}
|
|
1198
|
+
],
|
|
1199
|
+
"stateMutability": "view",
|
|
1200
|
+
"type": "function"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"inputs": [],
|
|
1204
|
+
"name": "feeSilo",
|
|
1205
|
+
"outputs": [
|
|
1206
|
+
{
|
|
1207
|
+
"internalType": "address",
|
|
1208
|
+
"name": "",
|
|
1209
|
+
"type": "address"
|
|
1210
|
+
}
|
|
1211
|
+
],
|
|
1212
|
+
"stateMutability": "view",
|
|
1213
|
+
"type": "function"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"inputs": [
|
|
1217
|
+
{
|
|
1218
|
+
"internalType": "address",
|
|
1219
|
+
"name": "_asset",
|
|
1220
|
+
"type": "address"
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"internalType": "address",
|
|
1224
|
+
"name": "_initialRewarder",
|
|
1225
|
+
"type": "address"
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
"internalType": "address",
|
|
1229
|
+
"name": "_owner",
|
|
1230
|
+
"type": "address"
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
"internalType": "string",
|
|
1234
|
+
"name": "_name",
|
|
1235
|
+
"type": "string"
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"internalType": "string",
|
|
1239
|
+
"name": "_symbol",
|
|
1240
|
+
"type": "string"
|
|
1241
|
+
}
|
|
1242
|
+
],
|
|
1243
|
+
"name": "initialize",
|
|
1244
|
+
"outputs": [],
|
|
1245
|
+
"stateMutability": "nonpayable",
|
|
1246
|
+
"type": "function"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
"inputs": [],
|
|
1250
|
+
"name": "lastDistributionTimestamp",
|
|
1251
|
+
"outputs": [
|
|
1252
|
+
{
|
|
1253
|
+
"internalType": "uint256",
|
|
1254
|
+
"name": "",
|
|
1255
|
+
"type": "uint256"
|
|
1256
|
+
}
|
|
1257
|
+
],
|
|
1258
|
+
"stateMutability": "view",
|
|
1259
|
+
"type": "function"
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
"inputs": [
|
|
1263
|
+
{
|
|
1264
|
+
"internalType": "address",
|
|
1265
|
+
"name": "",
|
|
1266
|
+
"type": "address"
|
|
1267
|
+
}
|
|
1268
|
+
],
|
|
1269
|
+
"name": "maxDeposit",
|
|
1270
|
+
"outputs": [
|
|
1271
|
+
{
|
|
1272
|
+
"internalType": "uint256",
|
|
1273
|
+
"name": "",
|
|
1274
|
+
"type": "uint256"
|
|
1275
|
+
}
|
|
1276
|
+
],
|
|
1277
|
+
"stateMutability": "view",
|
|
1278
|
+
"type": "function"
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"inputs": [
|
|
1282
|
+
{
|
|
1283
|
+
"internalType": "address",
|
|
1284
|
+
"name": "",
|
|
1285
|
+
"type": "address"
|
|
1286
|
+
}
|
|
1287
|
+
],
|
|
1288
|
+
"name": "maxMint",
|
|
1289
|
+
"outputs": [
|
|
1290
|
+
{
|
|
1291
|
+
"internalType": "uint256",
|
|
1292
|
+
"name": "",
|
|
1293
|
+
"type": "uint256"
|
|
1294
|
+
}
|
|
1295
|
+
],
|
|
1296
|
+
"stateMutability": "view",
|
|
1297
|
+
"type": "function"
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"inputs": [
|
|
1301
|
+
{
|
|
1302
|
+
"internalType": "address",
|
|
1303
|
+
"name": "owner",
|
|
1304
|
+
"type": "address"
|
|
1305
|
+
}
|
|
1306
|
+
],
|
|
1307
|
+
"name": "maxRedeem",
|
|
1308
|
+
"outputs": [
|
|
1309
|
+
{
|
|
1310
|
+
"internalType": "uint256",
|
|
1311
|
+
"name": "",
|
|
1312
|
+
"type": "uint256"
|
|
1313
|
+
}
|
|
1314
|
+
],
|
|
1315
|
+
"stateMutability": "view",
|
|
1316
|
+
"type": "function"
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"inputs": [
|
|
1320
|
+
{
|
|
1321
|
+
"internalType": "address",
|
|
1322
|
+
"name": "owner",
|
|
1323
|
+
"type": "address"
|
|
1324
|
+
}
|
|
1325
|
+
],
|
|
1326
|
+
"name": "maxWithdraw",
|
|
1327
|
+
"outputs": [
|
|
1328
|
+
{
|
|
1329
|
+
"internalType": "uint256",
|
|
1330
|
+
"name": "",
|
|
1331
|
+
"type": "uint256"
|
|
1332
|
+
}
|
|
1333
|
+
],
|
|
1334
|
+
"stateMutability": "view",
|
|
1335
|
+
"type": "function"
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
"inputs": [
|
|
1339
|
+
{
|
|
1340
|
+
"internalType": "uint256",
|
|
1341
|
+
"name": "shares",
|
|
1342
|
+
"type": "uint256"
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"internalType": "address",
|
|
1346
|
+
"name": "receiver",
|
|
1347
|
+
"type": "address"
|
|
1348
|
+
}
|
|
1349
|
+
],
|
|
1350
|
+
"name": "mint",
|
|
1351
|
+
"outputs": [
|
|
1352
|
+
{
|
|
1353
|
+
"internalType": "uint256",
|
|
1354
|
+
"name": "",
|
|
1355
|
+
"type": "uint256"
|
|
1356
|
+
}
|
|
1357
|
+
],
|
|
1358
|
+
"stateMutability": "nonpayable",
|
|
1359
|
+
"type": "function"
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"inputs": [
|
|
1363
|
+
{
|
|
1364
|
+
"internalType": "uint256",
|
|
1365
|
+
"name": "amount",
|
|
1366
|
+
"type": "uint256"
|
|
1367
|
+
}
|
|
1368
|
+
],
|
|
1369
|
+
"name": "mintRewards",
|
|
1370
|
+
"outputs": [],
|
|
1371
|
+
"stateMutability": "nonpayable",
|
|
1372
|
+
"type": "function"
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
"inputs": [],
|
|
1376
|
+
"name": "name",
|
|
1377
|
+
"outputs": [
|
|
1378
|
+
{
|
|
1379
|
+
"internalType": "string",
|
|
1380
|
+
"name": "",
|
|
1381
|
+
"type": "string"
|
|
1382
|
+
}
|
|
1383
|
+
],
|
|
1384
|
+
"stateMutability": "view",
|
|
1385
|
+
"type": "function"
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
"inputs": [],
|
|
1389
|
+
"name": "owner",
|
|
1390
|
+
"outputs": [
|
|
1391
|
+
{
|
|
1392
|
+
"internalType": "address",
|
|
1393
|
+
"name": "",
|
|
1394
|
+
"type": "address"
|
|
1395
|
+
}
|
|
1396
|
+
],
|
|
1397
|
+
"stateMutability": "view",
|
|
1398
|
+
"type": "function"
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"inputs": [],
|
|
1402
|
+
"name": "pendingImplementation",
|
|
1403
|
+
"outputs": [
|
|
1404
|
+
{
|
|
1405
|
+
"internalType": "address",
|
|
1406
|
+
"name": "",
|
|
1407
|
+
"type": "address"
|
|
1408
|
+
}
|
|
1409
|
+
],
|
|
1410
|
+
"stateMutability": "view",
|
|
1411
|
+
"type": "function"
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"inputs": [
|
|
1415
|
+
{
|
|
1416
|
+
"internalType": "uint256",
|
|
1417
|
+
"name": "assets",
|
|
1418
|
+
"type": "uint256"
|
|
1419
|
+
}
|
|
1420
|
+
],
|
|
1421
|
+
"name": "previewDeposit",
|
|
1422
|
+
"outputs": [
|
|
1423
|
+
{
|
|
1424
|
+
"internalType": "uint256",
|
|
1425
|
+
"name": "",
|
|
1426
|
+
"type": "uint256"
|
|
1427
|
+
}
|
|
1428
|
+
],
|
|
1429
|
+
"stateMutability": "view",
|
|
1430
|
+
"type": "function"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
"inputs": [
|
|
1434
|
+
{
|
|
1435
|
+
"internalType": "uint256",
|
|
1436
|
+
"name": "shares",
|
|
1437
|
+
"type": "uint256"
|
|
1438
|
+
}
|
|
1439
|
+
],
|
|
1440
|
+
"name": "previewMint",
|
|
1441
|
+
"outputs": [
|
|
1442
|
+
{
|
|
1443
|
+
"internalType": "uint256",
|
|
1444
|
+
"name": "",
|
|
1445
|
+
"type": "uint256"
|
|
1446
|
+
}
|
|
1447
|
+
],
|
|
1448
|
+
"stateMutability": "view",
|
|
1449
|
+
"type": "function"
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
"inputs": [
|
|
1453
|
+
{
|
|
1454
|
+
"internalType": "uint256",
|
|
1455
|
+
"name": "shares",
|
|
1456
|
+
"type": "uint256"
|
|
1457
|
+
}
|
|
1458
|
+
],
|
|
1459
|
+
"name": "previewRedeem",
|
|
1460
|
+
"outputs": [
|
|
1461
|
+
{
|
|
1462
|
+
"internalType": "uint256",
|
|
1463
|
+
"name": "",
|
|
1464
|
+
"type": "uint256"
|
|
1465
|
+
}
|
|
1466
|
+
],
|
|
1467
|
+
"stateMutability": "view",
|
|
1468
|
+
"type": "function"
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"inputs": [
|
|
1472
|
+
{
|
|
1473
|
+
"internalType": "uint256",
|
|
1474
|
+
"name": "assets",
|
|
1475
|
+
"type": "uint256"
|
|
1476
|
+
}
|
|
1477
|
+
],
|
|
1478
|
+
"name": "previewWithdraw",
|
|
1479
|
+
"outputs": [
|
|
1480
|
+
{
|
|
1481
|
+
"internalType": "uint256",
|
|
1482
|
+
"name": "",
|
|
1483
|
+
"type": "uint256"
|
|
1484
|
+
}
|
|
1485
|
+
],
|
|
1486
|
+
"stateMutability": "view",
|
|
1487
|
+
"type": "function"
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"inputs": [],
|
|
1491
|
+
"name": "proxiableUUID",
|
|
1492
|
+
"outputs": [
|
|
1493
|
+
{
|
|
1494
|
+
"internalType": "bytes32",
|
|
1495
|
+
"name": "",
|
|
1496
|
+
"type": "bytes32"
|
|
1497
|
+
}
|
|
1498
|
+
],
|
|
1499
|
+
"stateMutability": "view",
|
|
1500
|
+
"type": "function"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"inputs": [
|
|
1504
|
+
{
|
|
1505
|
+
"internalType": "uint256",
|
|
1506
|
+
"name": "shares",
|
|
1507
|
+
"type": "uint256"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"internalType": "address",
|
|
1511
|
+
"name": "receiver",
|
|
1512
|
+
"type": "address"
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
"internalType": "address",
|
|
1516
|
+
"name": "owner",
|
|
1517
|
+
"type": "address"
|
|
1518
|
+
}
|
|
1519
|
+
],
|
|
1520
|
+
"name": "redeem",
|
|
1521
|
+
"outputs": [
|
|
1522
|
+
{
|
|
1523
|
+
"internalType": "uint256",
|
|
1524
|
+
"name": "",
|
|
1525
|
+
"type": "uint256"
|
|
1526
|
+
}
|
|
1527
|
+
],
|
|
1528
|
+
"stateMutability": "nonpayable",
|
|
1529
|
+
"type": "function"
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
"inputs": [],
|
|
1533
|
+
"name": "renounceOwnership",
|
|
1534
|
+
"outputs": [],
|
|
1535
|
+
"stateMutability": "nonpayable",
|
|
1536
|
+
"type": "function"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
"inputs": [
|
|
1540
|
+
{
|
|
1541
|
+
"internalType": "address",
|
|
1542
|
+
"name": "token",
|
|
1543
|
+
"type": "address"
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
"internalType": "uint256",
|
|
1547
|
+
"name": "amount",
|
|
1548
|
+
"type": "uint256"
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"internalType": "address",
|
|
1552
|
+
"name": "to",
|
|
1553
|
+
"type": "address"
|
|
1554
|
+
}
|
|
1555
|
+
],
|
|
1556
|
+
"name": "rescueTokens",
|
|
1557
|
+
"outputs": [],
|
|
1558
|
+
"stateMutability": "nonpayable",
|
|
1559
|
+
"type": "function"
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
"inputs": [],
|
|
1563
|
+
"name": "rewarder",
|
|
1564
|
+
"outputs": [
|
|
1565
|
+
{
|
|
1566
|
+
"internalType": "address",
|
|
1567
|
+
"name": "",
|
|
1568
|
+
"type": "address"
|
|
1569
|
+
}
|
|
1570
|
+
],
|
|
1571
|
+
"stateMutability": "view",
|
|
1572
|
+
"type": "function"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"inputs": [
|
|
1576
|
+
{
|
|
1577
|
+
"internalType": "address",
|
|
1578
|
+
"name": "newImpl",
|
|
1579
|
+
"type": "address"
|
|
1580
|
+
}
|
|
1581
|
+
],
|
|
1582
|
+
"name": "scheduleUpgrade",
|
|
1583
|
+
"outputs": [],
|
|
1584
|
+
"stateMutability": "nonpayable",
|
|
1585
|
+
"type": "function"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"inputs": [
|
|
1589
|
+
{
|
|
1590
|
+
"internalType": "uint24",
|
|
1591
|
+
"name": "duration",
|
|
1592
|
+
"type": "uint24"
|
|
1593
|
+
}
|
|
1594
|
+
],
|
|
1595
|
+
"name": "setCooldownDuration",
|
|
1596
|
+
"outputs": [],
|
|
1597
|
+
"stateMutability": "nonpayable",
|
|
1598
|
+
"type": "function"
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
"inputs": [
|
|
1602
|
+
{
|
|
1603
|
+
"internalType": "uint256",
|
|
1604
|
+
"name": "_ratio",
|
|
1605
|
+
"type": "uint256"
|
|
1606
|
+
}
|
|
1607
|
+
],
|
|
1608
|
+
"name": "setCoverageRatio",
|
|
1609
|
+
"outputs": [],
|
|
1610
|
+
"stateMutability": "nonpayable",
|
|
1611
|
+
"type": "function"
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
"inputs": [
|
|
1615
|
+
{
|
|
1616
|
+
"internalType": "address",
|
|
1617
|
+
"name": "_silo",
|
|
1618
|
+
"type": "address"
|
|
1619
|
+
}
|
|
1620
|
+
],
|
|
1621
|
+
"name": "setFeeSilo",
|
|
1622
|
+
"outputs": [],
|
|
1623
|
+
"stateMutability": "nonpayable",
|
|
1624
|
+
"type": "function"
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
"inputs": [
|
|
1628
|
+
{
|
|
1629
|
+
"internalType": "address",
|
|
1630
|
+
"name": "_rewarder",
|
|
1631
|
+
"type": "address"
|
|
1632
|
+
}
|
|
1633
|
+
],
|
|
1634
|
+
"name": "setRewarder",
|
|
1635
|
+
"outputs": [],
|
|
1636
|
+
"stateMutability": "nonpayable",
|
|
1637
|
+
"type": "function"
|
|
1638
|
+
},
|
|
1639
|
+
{
|
|
1640
|
+
"inputs": [
|
|
1641
|
+
{
|
|
1642
|
+
"internalType": "address",
|
|
1643
|
+
"name": "_silo",
|
|
1644
|
+
"type": "address"
|
|
1645
|
+
}
|
|
1646
|
+
],
|
|
1647
|
+
"name": "setSilo",
|
|
1648
|
+
"outputs": [],
|
|
1649
|
+
"stateMutability": "nonpayable",
|
|
1650
|
+
"type": "function"
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
"inputs": [
|
|
1654
|
+
{
|
|
1655
|
+
"internalType": "uint16",
|
|
1656
|
+
"name": "newTaxRate",
|
|
1657
|
+
"type": "uint16"
|
|
1658
|
+
}
|
|
1659
|
+
],
|
|
1660
|
+
"name": "setTaxRate",
|
|
1661
|
+
"outputs": [],
|
|
1662
|
+
"stateMutability": "nonpayable",
|
|
1663
|
+
"type": "function"
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
"inputs": [
|
|
1667
|
+
{
|
|
1668
|
+
"internalType": "uint256",
|
|
1669
|
+
"name": "newDelay",
|
|
1670
|
+
"type": "uint256"
|
|
1671
|
+
}
|
|
1672
|
+
],
|
|
1673
|
+
"name": "setUpgradeDelay",
|
|
1674
|
+
"outputs": [],
|
|
1675
|
+
"stateMutability": "nonpayable",
|
|
1676
|
+
"type": "function"
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
"inputs": [],
|
|
1680
|
+
"name": "silo",
|
|
1681
|
+
"outputs": [
|
|
1682
|
+
{
|
|
1683
|
+
"internalType": "contract msUSDSilo",
|
|
1684
|
+
"name": "",
|
|
1685
|
+
"type": "address"
|
|
1686
|
+
}
|
|
1687
|
+
],
|
|
1688
|
+
"stateMutability": "view",
|
|
1689
|
+
"type": "function"
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
"inputs": [],
|
|
1693
|
+
"name": "symbol",
|
|
1694
|
+
"outputs": [
|
|
1695
|
+
{
|
|
1696
|
+
"internalType": "string",
|
|
1697
|
+
"name": "",
|
|
1698
|
+
"type": "string"
|
|
1699
|
+
}
|
|
1700
|
+
],
|
|
1701
|
+
"stateMutability": "view",
|
|
1702
|
+
"type": "function"
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
"inputs": [],
|
|
1706
|
+
"name": "taxRate",
|
|
1707
|
+
"outputs": [
|
|
1708
|
+
{
|
|
1709
|
+
"internalType": "uint16",
|
|
1710
|
+
"name": "",
|
|
1711
|
+
"type": "uint16"
|
|
1712
|
+
}
|
|
1713
|
+
],
|
|
1714
|
+
"stateMutability": "view",
|
|
1715
|
+
"type": "function"
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"inputs": [],
|
|
1719
|
+
"name": "toggleDeposits",
|
|
1720
|
+
"outputs": [],
|
|
1721
|
+
"stateMutability": "nonpayable",
|
|
1722
|
+
"type": "function"
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
"inputs": [],
|
|
1726
|
+
"name": "totalAssets",
|
|
1727
|
+
"outputs": [
|
|
1728
|
+
{
|
|
1729
|
+
"internalType": "uint256",
|
|
1730
|
+
"name": "",
|
|
1731
|
+
"type": "uint256"
|
|
1732
|
+
}
|
|
1733
|
+
],
|
|
1734
|
+
"stateMutability": "view",
|
|
1735
|
+
"type": "function"
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
"inputs": [],
|
|
1739
|
+
"name": "totalSupply",
|
|
1740
|
+
"outputs": [
|
|
1741
|
+
{
|
|
1742
|
+
"internalType": "uint256",
|
|
1743
|
+
"name": "",
|
|
1744
|
+
"type": "uint256"
|
|
1745
|
+
}
|
|
1746
|
+
],
|
|
1747
|
+
"stateMutability": "view",
|
|
1748
|
+
"type": "function"
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"inputs": [
|
|
1752
|
+
{
|
|
1753
|
+
"internalType": "address",
|
|
1754
|
+
"name": "to",
|
|
1755
|
+
"type": "address"
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
"internalType": "uint256",
|
|
1759
|
+
"name": "value",
|
|
1760
|
+
"type": "uint256"
|
|
1761
|
+
}
|
|
1762
|
+
],
|
|
1763
|
+
"name": "transfer",
|
|
1764
|
+
"outputs": [
|
|
1765
|
+
{
|
|
1766
|
+
"internalType": "bool",
|
|
1767
|
+
"name": "",
|
|
1768
|
+
"type": "bool"
|
|
1769
|
+
}
|
|
1770
|
+
],
|
|
1771
|
+
"stateMutability": "nonpayable",
|
|
1772
|
+
"type": "function"
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
"inputs": [
|
|
1776
|
+
{
|
|
1777
|
+
"internalType": "address",
|
|
1778
|
+
"name": "from",
|
|
1779
|
+
"type": "address"
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"internalType": "address",
|
|
1783
|
+
"name": "to",
|
|
1784
|
+
"type": "address"
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"internalType": "uint256",
|
|
1788
|
+
"name": "value",
|
|
1789
|
+
"type": "uint256"
|
|
1790
|
+
}
|
|
1791
|
+
],
|
|
1792
|
+
"name": "transferFrom",
|
|
1793
|
+
"outputs": [
|
|
1794
|
+
{
|
|
1795
|
+
"internalType": "bool",
|
|
1796
|
+
"name": "",
|
|
1797
|
+
"type": "bool"
|
|
1798
|
+
}
|
|
1799
|
+
],
|
|
1800
|
+
"stateMutability": "nonpayable",
|
|
1801
|
+
"type": "function"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"inputs": [
|
|
1805
|
+
{
|
|
1806
|
+
"internalType": "address",
|
|
1807
|
+
"name": "newOwner",
|
|
1808
|
+
"type": "address"
|
|
1809
|
+
}
|
|
1810
|
+
],
|
|
1811
|
+
"name": "transferOwnership",
|
|
1812
|
+
"outputs": [],
|
|
1813
|
+
"stateMutability": "nonpayable",
|
|
1814
|
+
"type": "function"
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"inputs": [
|
|
1818
|
+
{
|
|
1819
|
+
"internalType": "address",
|
|
1820
|
+
"name": "receiver",
|
|
1821
|
+
"type": "address"
|
|
1822
|
+
}
|
|
1823
|
+
],
|
|
1824
|
+
"name": "unstake",
|
|
1825
|
+
"outputs": [],
|
|
1826
|
+
"stateMutability": "nonpayable",
|
|
1827
|
+
"type": "function"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"inputs": [
|
|
1831
|
+
{
|
|
1832
|
+
"internalType": "address",
|
|
1833
|
+
"name": "account",
|
|
1834
|
+
"type": "address"
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
"internalType": "uint104",
|
|
1838
|
+
"name": "newCooldownEnd",
|
|
1839
|
+
"type": "uint104"
|
|
1840
|
+
}
|
|
1841
|
+
],
|
|
1842
|
+
"name": "updateExistingCooldown",
|
|
1843
|
+
"outputs": [],
|
|
1844
|
+
"stateMutability": "nonpayable",
|
|
1845
|
+
"type": "function"
|
|
1846
|
+
},
|
|
1847
|
+
{
|
|
1848
|
+
"inputs": [],
|
|
1849
|
+
"name": "upgradeDelay",
|
|
1850
|
+
"outputs": [
|
|
1851
|
+
{
|
|
1852
|
+
"internalType": "uint256",
|
|
1853
|
+
"name": "",
|
|
1854
|
+
"type": "uint256"
|
|
1855
|
+
}
|
|
1856
|
+
],
|
|
1857
|
+
"stateMutability": "view",
|
|
1858
|
+
"type": "function"
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"inputs": [
|
|
1862
|
+
{
|
|
1863
|
+
"internalType": "address",
|
|
1864
|
+
"name": "newImplementation",
|
|
1865
|
+
"type": "address"
|
|
1866
|
+
},
|
|
1867
|
+
{
|
|
1868
|
+
"internalType": "bytes",
|
|
1869
|
+
"name": "data",
|
|
1870
|
+
"type": "bytes"
|
|
1871
|
+
}
|
|
1872
|
+
],
|
|
1873
|
+
"name": "upgradeToAndCall",
|
|
1874
|
+
"outputs": [],
|
|
1875
|
+
"stateMutability": "payable",
|
|
1876
|
+
"type": "function"
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"inputs": [
|
|
1880
|
+
{
|
|
1881
|
+
"internalType": "uint256",
|
|
1882
|
+
"name": "assets",
|
|
1883
|
+
"type": "uint256"
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
"internalType": "address",
|
|
1887
|
+
"name": "receiver",
|
|
1888
|
+
"type": "address"
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
"internalType": "address",
|
|
1892
|
+
"name": "owner",
|
|
1893
|
+
"type": "address"
|
|
1894
|
+
}
|
|
1895
|
+
],
|
|
1896
|
+
"name": "withdraw",
|
|
1897
|
+
"outputs": [
|
|
1898
|
+
{
|
|
1899
|
+
"internalType": "uint256",
|
|
1900
|
+
"name": "",
|
|
1901
|
+
"type": "uint256"
|
|
1902
|
+
}
|
|
1903
|
+
],
|
|
1904
|
+
"stateMutability": "nonpayable",
|
|
1905
|
+
"type": "function"
|
|
1906
|
+
}
|
|
1907
|
+
] as const satisfies Abi;
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* Type-safe ABI for StakedmsUSD
|
|
1911
|
+
*/
|
|
1912
|
+
export type StakedmsUSDAbi = typeof StakedmsUSDAbi;
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* Contract instance type for StakedmsUSD
|
|
1916
|
+
*/
|
|
1917
|
+
// Use any for contract type to avoid complex viem type issues
|
|
1918
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
1919
|
+
export type StakedmsUSDContract = any;
|
|
1920
|
+
|
|
1921
|
+
/**
|
|
1922
|
+
* StakedmsUSD Contract Class
|
|
1923
|
+
*
|
|
1924
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1925
|
+
*
|
|
1926
|
+
* @example
|
|
1927
|
+
* ```typescript
|
|
1928
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1929
|
+
* import { mainnet } from 'viem/chains';
|
|
1930
|
+
* import { StakedmsUSD } from 'StakedmsUSD';
|
|
1931
|
+
*
|
|
1932
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1933
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1934
|
+
*
|
|
1935
|
+
* const contract = new StakedmsUSD('0x...', { publicClient, walletClient });
|
|
1936
|
+
*
|
|
1937
|
+
* // Read functions
|
|
1938
|
+
* const result = await contract.balanceOf('0x...');
|
|
1939
|
+
*
|
|
1940
|
+
* // Write functions
|
|
1941
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
1942
|
+
*
|
|
1943
|
+
* // Simulate transactions (dry-run)
|
|
1944
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1945
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
1946
|
+
*
|
|
1947
|
+
* // Watch events
|
|
1948
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1949
|
+
* console.log('Transfer event:', event);
|
|
1950
|
+
* });
|
|
1951
|
+
* ```
|
|
1952
|
+
*/
|
|
1953
|
+
export class StakedmsUSD {
|
|
1954
|
+
private contract: StakedmsUSDContract;
|
|
1955
|
+
private contractAddress: Address;
|
|
1956
|
+
private publicClient: PublicClient;
|
|
1957
|
+
|
|
1958
|
+
constructor(
|
|
1959
|
+
address: Address,
|
|
1960
|
+
clients: {
|
|
1961
|
+
publicClient: PublicClient;
|
|
1962
|
+
walletClient?: WalletClient;
|
|
1963
|
+
}
|
|
1964
|
+
) {
|
|
1965
|
+
this.contractAddress = address;
|
|
1966
|
+
this.publicClient = clients.publicClient;
|
|
1967
|
+
this.contract = getContract({
|
|
1968
|
+
address,
|
|
1969
|
+
abi: StakedmsUSDAbi,
|
|
1970
|
+
client: {
|
|
1971
|
+
public: clients.publicClient,
|
|
1972
|
+
wallet: clients.walletClient,
|
|
1973
|
+
},
|
|
1974
|
+
});
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* Get the contract address
|
|
1979
|
+
*/
|
|
1980
|
+
get address(): Address {
|
|
1981
|
+
return this.contractAddress;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
/**
|
|
1985
|
+
* Get the underlying viem contract instance.
|
|
1986
|
+
*/
|
|
1987
|
+
getContract(): StakedmsUSDContract {
|
|
1988
|
+
return this.contract;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
/**
|
|
1992
|
+
* DEFAULT_UPGRADE_DELAY
|
|
1993
|
+
* view
|
|
1994
|
+
*/
|
|
1995
|
+
async DEFAULT_UPGRADE_DELAY(): Promise<bigint> {
|
|
1996
|
+
return this.contract.read.DEFAULT_UPGRADE_DELAY() as Promise<bigint>;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* MAX_COOLDOWN_DURATION
|
|
2001
|
+
* view
|
|
2002
|
+
*/
|
|
2003
|
+
async MAX_COOLDOWN_DURATION(): Promise<bigint> {
|
|
2004
|
+
return this.contract.read.MAX_COOLDOWN_DURATION() as Promise<bigint>;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* MIN_SHARES
|
|
2009
|
+
* view
|
|
2010
|
+
*/
|
|
2011
|
+
async MIN_SHARES(): Promise<bigint> {
|
|
2012
|
+
return this.contract.read.MIN_SHARES() as Promise<bigint>;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
/**
|
|
2016
|
+
* UPGRADE_INTERFACE_VERSION
|
|
2017
|
+
* view
|
|
2018
|
+
*/
|
|
2019
|
+
async UPGRADE_INTERFACE_VERSION(): Promise<string> {
|
|
2020
|
+
return this.contract.read.UPGRADE_INTERFACE_VERSION() as Promise<string>;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* activationTime
|
|
2025
|
+
* view
|
|
2026
|
+
*/
|
|
2027
|
+
async activationTime(): Promise<bigint> {
|
|
2028
|
+
return this.contract.read.activationTime() as Promise<bigint>;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
/**
|
|
2032
|
+
* allowance
|
|
2033
|
+
* view
|
|
2034
|
+
*/
|
|
2035
|
+
async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
|
|
2036
|
+
return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
/**
|
|
2040
|
+
* asset
|
|
2041
|
+
* view
|
|
2042
|
+
*/
|
|
2043
|
+
async asset(): Promise<`0x${string}`> {
|
|
2044
|
+
return this.contract.read.asset() as Promise<`0x${string}`>;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
/**
|
|
2048
|
+
* balanceOf
|
|
2049
|
+
* view
|
|
2050
|
+
*/
|
|
2051
|
+
async balanceOf(account: `0x${string}`): Promise<bigint> {
|
|
2052
|
+
return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
/**
|
|
2056
|
+
* convertToAssets
|
|
2057
|
+
* view
|
|
2058
|
+
*/
|
|
2059
|
+
async convertToAssets(shares: bigint): Promise<bigint> {
|
|
2060
|
+
return this.contract.read.convertToAssets([shares] as const) as Promise<bigint>;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* convertToShares
|
|
2065
|
+
* view
|
|
2066
|
+
*/
|
|
2067
|
+
async convertToShares(assets: bigint): Promise<bigint> {
|
|
2068
|
+
return this.contract.read.convertToShares([assets] as const) as Promise<bigint>;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
/**
|
|
2072
|
+
* cooldownDuration
|
|
2073
|
+
* view
|
|
2074
|
+
*/
|
|
2075
|
+
async cooldownDuration(): Promise<bigint> {
|
|
2076
|
+
return this.contract.read.cooldownDuration() as Promise<bigint>;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* cooldowns
|
|
2081
|
+
* view
|
|
2082
|
+
*/
|
|
2083
|
+
async cooldowns(arg0: `0x${string}`): Promise<[bigint, bigint]> {
|
|
2084
|
+
return this.contract.read.cooldowns([arg0] as const) as Promise<[bigint, bigint]>;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
/**
|
|
2088
|
+
* coverageRatio
|
|
2089
|
+
* view
|
|
2090
|
+
*/
|
|
2091
|
+
async coverageRatio(): Promise<bigint> {
|
|
2092
|
+
return this.contract.read.coverageRatio() as Promise<bigint>;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
/**
|
|
2096
|
+
* decimals
|
|
2097
|
+
* view
|
|
2098
|
+
*/
|
|
2099
|
+
async decimals(): Promise<bigint> {
|
|
2100
|
+
return this.contract.read.decimals() as Promise<bigint>;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
/**
|
|
2104
|
+
* depositsEnabled
|
|
2105
|
+
* view
|
|
2106
|
+
*/
|
|
2107
|
+
async depositsEnabled(): Promise<boolean> {
|
|
2108
|
+
return this.contract.read.depositsEnabled() as Promise<boolean>;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* feeSilo
|
|
2113
|
+
* view
|
|
2114
|
+
*/
|
|
2115
|
+
async feeSilo(): Promise<`0x${string}`> {
|
|
2116
|
+
return this.contract.read.feeSilo() as Promise<`0x${string}`>;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
/**
|
|
2120
|
+
* lastDistributionTimestamp
|
|
2121
|
+
* view
|
|
2122
|
+
*/
|
|
2123
|
+
async lastDistributionTimestamp(): Promise<bigint> {
|
|
2124
|
+
return this.contract.read.lastDistributionTimestamp() as Promise<bigint>;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
/**
|
|
2128
|
+
* maxDeposit
|
|
2129
|
+
* view
|
|
2130
|
+
*/
|
|
2131
|
+
async maxDeposit(arg0: `0x${string}`): Promise<bigint> {
|
|
2132
|
+
return this.contract.read.maxDeposit([arg0] as const) as Promise<bigint>;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* maxMint
|
|
2137
|
+
* view
|
|
2138
|
+
*/
|
|
2139
|
+
async maxMint(arg0: `0x${string}`): Promise<bigint> {
|
|
2140
|
+
return this.contract.read.maxMint([arg0] as const) as Promise<bigint>;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* maxRedeem
|
|
2145
|
+
* view
|
|
2146
|
+
*/
|
|
2147
|
+
async maxRedeem(owner: `0x${string}`): Promise<bigint> {
|
|
2148
|
+
return this.contract.read.maxRedeem([owner] as const) as Promise<bigint>;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
/**
|
|
2152
|
+
* maxWithdraw
|
|
2153
|
+
* view
|
|
2154
|
+
*/
|
|
2155
|
+
async maxWithdraw(owner: `0x${string}`): Promise<bigint> {
|
|
2156
|
+
return this.contract.read.maxWithdraw([owner] as const) as Promise<bigint>;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
/**
|
|
2160
|
+
* name
|
|
2161
|
+
* view
|
|
2162
|
+
*/
|
|
2163
|
+
async name(): Promise<string> {
|
|
2164
|
+
return this.contract.read.name() as Promise<string>;
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
/**
|
|
2168
|
+
* owner
|
|
2169
|
+
* view
|
|
2170
|
+
*/
|
|
2171
|
+
async owner(): Promise<`0x${string}`> {
|
|
2172
|
+
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* pendingImplementation
|
|
2177
|
+
* view
|
|
2178
|
+
*/
|
|
2179
|
+
async pendingImplementation(): Promise<`0x${string}`> {
|
|
2180
|
+
return this.contract.read.pendingImplementation() as Promise<`0x${string}`>;
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
/**
|
|
2184
|
+
* previewDeposit
|
|
2185
|
+
* view
|
|
2186
|
+
*/
|
|
2187
|
+
async previewDeposit(assets: bigint): Promise<bigint> {
|
|
2188
|
+
return this.contract.read.previewDeposit([assets] as const) as Promise<bigint>;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
/**
|
|
2192
|
+
* previewMint
|
|
2193
|
+
* view
|
|
2194
|
+
*/
|
|
2195
|
+
async previewMint(shares: bigint): Promise<bigint> {
|
|
2196
|
+
return this.contract.read.previewMint([shares] as const) as Promise<bigint>;
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
/**
|
|
2200
|
+
* previewRedeem
|
|
2201
|
+
* view
|
|
2202
|
+
*/
|
|
2203
|
+
async previewRedeem(shares: bigint): Promise<bigint> {
|
|
2204
|
+
return this.contract.read.previewRedeem([shares] as const) as Promise<bigint>;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* previewWithdraw
|
|
2209
|
+
* view
|
|
2210
|
+
*/
|
|
2211
|
+
async previewWithdraw(assets: bigint): Promise<bigint> {
|
|
2212
|
+
return this.contract.read.previewWithdraw([assets] as const) as Promise<bigint>;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* proxiableUUID
|
|
2217
|
+
* view
|
|
2218
|
+
*/
|
|
2219
|
+
async proxiableUUID(): Promise<`0x${string}`> {
|
|
2220
|
+
return this.contract.read.proxiableUUID() as Promise<`0x${string}`>;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
/**
|
|
2224
|
+
* rewarder
|
|
2225
|
+
* view
|
|
2226
|
+
*/
|
|
2227
|
+
async rewarder(): Promise<`0x${string}`> {
|
|
2228
|
+
return this.contract.read.rewarder() as Promise<`0x${string}`>;
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
/**
|
|
2232
|
+
* silo
|
|
2233
|
+
* view
|
|
2234
|
+
*/
|
|
2235
|
+
async silo(): Promise<`0x${string}`> {
|
|
2236
|
+
return this.contract.read.silo() as Promise<`0x${string}`>;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
/**
|
|
2240
|
+
* symbol
|
|
2241
|
+
* view
|
|
2242
|
+
*/
|
|
2243
|
+
async symbol(): Promise<string> {
|
|
2244
|
+
return this.contract.read.symbol() as Promise<string>;
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* taxRate
|
|
2249
|
+
* view
|
|
2250
|
+
*/
|
|
2251
|
+
async taxRate(): Promise<bigint> {
|
|
2252
|
+
return this.contract.read.taxRate() as Promise<bigint>;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
/**
|
|
2256
|
+
* totalAssets
|
|
2257
|
+
* view
|
|
2258
|
+
*/
|
|
2259
|
+
async totalAssets(): Promise<bigint> {
|
|
2260
|
+
return this.contract.read.totalAssets() as Promise<bigint>;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
/**
|
|
2264
|
+
* totalSupply
|
|
2265
|
+
* view
|
|
2266
|
+
*/
|
|
2267
|
+
async totalSupply(): Promise<bigint> {
|
|
2268
|
+
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
/**
|
|
2272
|
+
* upgradeDelay
|
|
2273
|
+
* view
|
|
2274
|
+
*/
|
|
2275
|
+
async upgradeDelay(): Promise<bigint> {
|
|
2276
|
+
return this.contract.read.upgradeDelay() as Promise<bigint>;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* approve
|
|
2281
|
+
* nonpayable
|
|
2282
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2283
|
+
*/
|
|
2284
|
+
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
2285
|
+
accessList?: import('viem').AccessList;
|
|
2286
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2287
|
+
chain?: import('viem').Chain | null;
|
|
2288
|
+
dataSuffix?: `0x${string}`;
|
|
2289
|
+
gas?: bigint;
|
|
2290
|
+
gasPrice?: bigint;
|
|
2291
|
+
maxFeePerGas?: bigint;
|
|
2292
|
+
maxPriorityFeePerGas?: bigint;
|
|
2293
|
+
nonce?: number;
|
|
2294
|
+
value?: bigint;
|
|
2295
|
+
}): Promise<`0x${string}`> {
|
|
2296
|
+
if (!this.contract.write) {
|
|
2297
|
+
throw new Error('Wallet client is required for write operations');
|
|
2298
|
+
}
|
|
2299
|
+
return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
/**
|
|
2303
|
+
* burnAsset
|
|
2304
|
+
* nonpayable
|
|
2305
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2306
|
+
*/
|
|
2307
|
+
async burnAsset(amount: bigint, options?: {
|
|
2308
|
+
accessList?: import('viem').AccessList;
|
|
2309
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2310
|
+
chain?: import('viem').Chain | null;
|
|
2311
|
+
dataSuffix?: `0x${string}`;
|
|
2312
|
+
gas?: bigint;
|
|
2313
|
+
gasPrice?: bigint;
|
|
2314
|
+
maxFeePerGas?: bigint;
|
|
2315
|
+
maxPriorityFeePerGas?: bigint;
|
|
2316
|
+
nonce?: number;
|
|
2317
|
+
value?: bigint;
|
|
2318
|
+
}): Promise<`0x${string}`> {
|
|
2319
|
+
if (!this.contract.write) {
|
|
2320
|
+
throw new Error('Wallet client is required for write operations');
|
|
2321
|
+
}
|
|
2322
|
+
return this.contract.write.burnAsset([amount] as const, options) as Promise<`0x${string}`>;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
/**
|
|
2326
|
+
* cancelScheduledUpgrade
|
|
2327
|
+
* nonpayable
|
|
2328
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2329
|
+
*/
|
|
2330
|
+
async cancelScheduledUpgrade(options?: {
|
|
2331
|
+
accessList?: import('viem').AccessList;
|
|
2332
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2333
|
+
chain?: import('viem').Chain | null;
|
|
2334
|
+
dataSuffix?: `0x${string}`;
|
|
2335
|
+
gas?: bigint;
|
|
2336
|
+
gasPrice?: bigint;
|
|
2337
|
+
maxFeePerGas?: bigint;
|
|
2338
|
+
maxPriorityFeePerGas?: bigint;
|
|
2339
|
+
nonce?: number;
|
|
2340
|
+
value?: bigint;
|
|
2341
|
+
}): Promise<`0x${string}`> {
|
|
2342
|
+
if (!this.contract.write) {
|
|
2343
|
+
throw new Error('Wallet client is required for write operations');
|
|
2344
|
+
}
|
|
2345
|
+
return this.contract.write.cancelScheduledUpgrade(options) as Promise<`0x${string}`>;
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
/**
|
|
2349
|
+
* cooldownAssets
|
|
2350
|
+
* nonpayable
|
|
2351
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2352
|
+
*/
|
|
2353
|
+
async cooldownAssets(assets: bigint, owner: `0x${string}`, options?: {
|
|
2354
|
+
accessList?: import('viem').AccessList;
|
|
2355
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2356
|
+
chain?: import('viem').Chain | null;
|
|
2357
|
+
dataSuffix?: `0x${string}`;
|
|
2358
|
+
gas?: bigint;
|
|
2359
|
+
gasPrice?: bigint;
|
|
2360
|
+
maxFeePerGas?: bigint;
|
|
2361
|
+
maxPriorityFeePerGas?: bigint;
|
|
2362
|
+
nonce?: number;
|
|
2363
|
+
value?: bigint;
|
|
2364
|
+
}): Promise<`0x${string}`> {
|
|
2365
|
+
if (!this.contract.write) {
|
|
2366
|
+
throw new Error('Wallet client is required for write operations');
|
|
2367
|
+
}
|
|
2368
|
+
return this.contract.write.cooldownAssets([assets, owner] as const, options) as Promise<`0x${string}`>;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
/**
|
|
2372
|
+
* cooldownShares
|
|
2373
|
+
* nonpayable
|
|
2374
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2375
|
+
*/
|
|
2376
|
+
async cooldownShares(shares: bigint, owner: `0x${string}`, options?: {
|
|
2377
|
+
accessList?: import('viem').AccessList;
|
|
2378
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2379
|
+
chain?: import('viem').Chain | null;
|
|
2380
|
+
dataSuffix?: `0x${string}`;
|
|
2381
|
+
gas?: bigint;
|
|
2382
|
+
gasPrice?: bigint;
|
|
2383
|
+
maxFeePerGas?: bigint;
|
|
2384
|
+
maxPriorityFeePerGas?: bigint;
|
|
2385
|
+
nonce?: number;
|
|
2386
|
+
value?: bigint;
|
|
2387
|
+
}): Promise<`0x${string}`> {
|
|
2388
|
+
if (!this.contract.write) {
|
|
2389
|
+
throw new Error('Wallet client is required for write operations');
|
|
2390
|
+
}
|
|
2391
|
+
return this.contract.write.cooldownShares([shares, owner] as const, options) as Promise<`0x${string}`>;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* deposit
|
|
2396
|
+
* nonpayable
|
|
2397
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2398
|
+
*/
|
|
2399
|
+
async deposit(assets: bigint, receiver: `0x${string}`, options?: {
|
|
2400
|
+
accessList?: import('viem').AccessList;
|
|
2401
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2402
|
+
chain?: import('viem').Chain | null;
|
|
2403
|
+
dataSuffix?: `0x${string}`;
|
|
2404
|
+
gas?: bigint;
|
|
2405
|
+
gasPrice?: bigint;
|
|
2406
|
+
maxFeePerGas?: bigint;
|
|
2407
|
+
maxPriorityFeePerGas?: bigint;
|
|
2408
|
+
nonce?: number;
|
|
2409
|
+
value?: bigint;
|
|
2410
|
+
}): Promise<`0x${string}`> {
|
|
2411
|
+
if (!this.contract.write) {
|
|
2412
|
+
throw new Error('Wallet client is required for write operations');
|
|
2413
|
+
}
|
|
2414
|
+
return this.contract.write.deposit([assets, receiver] as const, options) as Promise<`0x${string}`>;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
/**
|
|
2418
|
+
* initialize
|
|
2419
|
+
* nonpayable
|
|
2420
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2421
|
+
*/
|
|
2422
|
+
async initialize(_asset: `0x${string}`, _initialRewarder: `0x${string}`, _owner: `0x${string}`, _name: string, _symbol: string, options?: {
|
|
2423
|
+
accessList?: import('viem').AccessList;
|
|
2424
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2425
|
+
chain?: import('viem').Chain | null;
|
|
2426
|
+
dataSuffix?: `0x${string}`;
|
|
2427
|
+
gas?: bigint;
|
|
2428
|
+
gasPrice?: bigint;
|
|
2429
|
+
maxFeePerGas?: bigint;
|
|
2430
|
+
maxPriorityFeePerGas?: bigint;
|
|
2431
|
+
nonce?: number;
|
|
2432
|
+
value?: bigint;
|
|
2433
|
+
}): Promise<`0x${string}`> {
|
|
2434
|
+
if (!this.contract.write) {
|
|
2435
|
+
throw new Error('Wallet client is required for write operations');
|
|
2436
|
+
}
|
|
2437
|
+
return this.contract.write.initialize([_asset, _initialRewarder, _owner, _name, _symbol] as const, options) as Promise<`0x${string}`>;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
/**
|
|
2441
|
+
* mint
|
|
2442
|
+
* nonpayable
|
|
2443
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2444
|
+
*/
|
|
2445
|
+
async mint(shares: bigint, receiver: `0x${string}`, options?: {
|
|
2446
|
+
accessList?: import('viem').AccessList;
|
|
2447
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2448
|
+
chain?: import('viem').Chain | null;
|
|
2449
|
+
dataSuffix?: `0x${string}`;
|
|
2450
|
+
gas?: bigint;
|
|
2451
|
+
gasPrice?: bigint;
|
|
2452
|
+
maxFeePerGas?: bigint;
|
|
2453
|
+
maxPriorityFeePerGas?: bigint;
|
|
2454
|
+
nonce?: number;
|
|
2455
|
+
value?: bigint;
|
|
2456
|
+
}): Promise<`0x${string}`> {
|
|
2457
|
+
if (!this.contract.write) {
|
|
2458
|
+
throw new Error('Wallet client is required for write operations');
|
|
2459
|
+
}
|
|
2460
|
+
return this.contract.write.mint([shares, receiver] as const, options) as Promise<`0x${string}`>;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
/**
|
|
2464
|
+
* mintRewards
|
|
2465
|
+
* nonpayable
|
|
2466
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2467
|
+
*/
|
|
2468
|
+
async mintRewards(amount: bigint, options?: {
|
|
2469
|
+
accessList?: import('viem').AccessList;
|
|
2470
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2471
|
+
chain?: import('viem').Chain | null;
|
|
2472
|
+
dataSuffix?: `0x${string}`;
|
|
2473
|
+
gas?: bigint;
|
|
2474
|
+
gasPrice?: bigint;
|
|
2475
|
+
maxFeePerGas?: bigint;
|
|
2476
|
+
maxPriorityFeePerGas?: bigint;
|
|
2477
|
+
nonce?: number;
|
|
2478
|
+
value?: bigint;
|
|
2479
|
+
}): Promise<`0x${string}`> {
|
|
2480
|
+
if (!this.contract.write) {
|
|
2481
|
+
throw new Error('Wallet client is required for write operations');
|
|
2482
|
+
}
|
|
2483
|
+
return this.contract.write.mintRewards([amount] as const, options) as Promise<`0x${string}`>;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
/**
|
|
2487
|
+
* redeem
|
|
2488
|
+
* nonpayable
|
|
2489
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2490
|
+
*/
|
|
2491
|
+
async redeem(shares: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
|
|
2492
|
+
accessList?: import('viem').AccessList;
|
|
2493
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2494
|
+
chain?: import('viem').Chain | null;
|
|
2495
|
+
dataSuffix?: `0x${string}`;
|
|
2496
|
+
gas?: bigint;
|
|
2497
|
+
gasPrice?: bigint;
|
|
2498
|
+
maxFeePerGas?: bigint;
|
|
2499
|
+
maxPriorityFeePerGas?: bigint;
|
|
2500
|
+
nonce?: number;
|
|
2501
|
+
value?: bigint;
|
|
2502
|
+
}): Promise<`0x${string}`> {
|
|
2503
|
+
if (!this.contract.write) {
|
|
2504
|
+
throw new Error('Wallet client is required for write operations');
|
|
2505
|
+
}
|
|
2506
|
+
return this.contract.write.redeem([shares, receiver, owner] as const, options) as Promise<`0x${string}`>;
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
/**
|
|
2510
|
+
* renounceOwnership
|
|
2511
|
+
* nonpayable
|
|
2512
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2513
|
+
*/
|
|
2514
|
+
async renounceOwnership(options?: {
|
|
2515
|
+
accessList?: import('viem').AccessList;
|
|
2516
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2517
|
+
chain?: import('viem').Chain | null;
|
|
2518
|
+
dataSuffix?: `0x${string}`;
|
|
2519
|
+
gas?: bigint;
|
|
2520
|
+
gasPrice?: bigint;
|
|
2521
|
+
maxFeePerGas?: bigint;
|
|
2522
|
+
maxPriorityFeePerGas?: bigint;
|
|
2523
|
+
nonce?: number;
|
|
2524
|
+
value?: bigint;
|
|
2525
|
+
}): Promise<`0x${string}`> {
|
|
2526
|
+
if (!this.contract.write) {
|
|
2527
|
+
throw new Error('Wallet client is required for write operations');
|
|
2528
|
+
}
|
|
2529
|
+
return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
/**
|
|
2533
|
+
* rescueTokens
|
|
2534
|
+
* nonpayable
|
|
2535
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2536
|
+
*/
|
|
2537
|
+
async rescueTokens(token: `0x${string}`, amount: bigint, to: `0x${string}`, options?: {
|
|
2538
|
+
accessList?: import('viem').AccessList;
|
|
2539
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2540
|
+
chain?: import('viem').Chain | null;
|
|
2541
|
+
dataSuffix?: `0x${string}`;
|
|
2542
|
+
gas?: bigint;
|
|
2543
|
+
gasPrice?: bigint;
|
|
2544
|
+
maxFeePerGas?: bigint;
|
|
2545
|
+
maxPriorityFeePerGas?: bigint;
|
|
2546
|
+
nonce?: number;
|
|
2547
|
+
value?: bigint;
|
|
2548
|
+
}): Promise<`0x${string}`> {
|
|
2549
|
+
if (!this.contract.write) {
|
|
2550
|
+
throw new Error('Wallet client is required for write operations');
|
|
2551
|
+
}
|
|
2552
|
+
return this.contract.write.rescueTokens([token, amount, to] as const, options) as Promise<`0x${string}`>;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
/**
|
|
2556
|
+
* scheduleUpgrade
|
|
2557
|
+
* nonpayable
|
|
2558
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2559
|
+
*/
|
|
2560
|
+
async scheduleUpgrade(newImpl: `0x${string}`, options?: {
|
|
2561
|
+
accessList?: import('viem').AccessList;
|
|
2562
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2563
|
+
chain?: import('viem').Chain | null;
|
|
2564
|
+
dataSuffix?: `0x${string}`;
|
|
2565
|
+
gas?: bigint;
|
|
2566
|
+
gasPrice?: bigint;
|
|
2567
|
+
maxFeePerGas?: bigint;
|
|
2568
|
+
maxPriorityFeePerGas?: bigint;
|
|
2569
|
+
nonce?: number;
|
|
2570
|
+
value?: bigint;
|
|
2571
|
+
}): Promise<`0x${string}`> {
|
|
2572
|
+
if (!this.contract.write) {
|
|
2573
|
+
throw new Error('Wallet client is required for write operations');
|
|
2574
|
+
}
|
|
2575
|
+
return this.contract.write.scheduleUpgrade([newImpl] as const, options) as Promise<`0x${string}`>;
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
/**
|
|
2579
|
+
* setCooldownDuration
|
|
2580
|
+
* nonpayable
|
|
2581
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2582
|
+
*/
|
|
2583
|
+
async setCooldownDuration(duration: bigint, options?: {
|
|
2584
|
+
accessList?: import('viem').AccessList;
|
|
2585
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2586
|
+
chain?: import('viem').Chain | null;
|
|
2587
|
+
dataSuffix?: `0x${string}`;
|
|
2588
|
+
gas?: bigint;
|
|
2589
|
+
gasPrice?: bigint;
|
|
2590
|
+
maxFeePerGas?: bigint;
|
|
2591
|
+
maxPriorityFeePerGas?: bigint;
|
|
2592
|
+
nonce?: number;
|
|
2593
|
+
value?: bigint;
|
|
2594
|
+
}): Promise<`0x${string}`> {
|
|
2595
|
+
if (!this.contract.write) {
|
|
2596
|
+
throw new Error('Wallet client is required for write operations');
|
|
2597
|
+
}
|
|
2598
|
+
return this.contract.write.setCooldownDuration([duration] as const, options) as Promise<`0x${string}`>;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
/**
|
|
2602
|
+
* setCoverageRatio
|
|
2603
|
+
* nonpayable
|
|
2604
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2605
|
+
*/
|
|
2606
|
+
async setCoverageRatio(_ratio: bigint, options?: {
|
|
2607
|
+
accessList?: import('viem').AccessList;
|
|
2608
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2609
|
+
chain?: import('viem').Chain | null;
|
|
2610
|
+
dataSuffix?: `0x${string}`;
|
|
2611
|
+
gas?: bigint;
|
|
2612
|
+
gasPrice?: bigint;
|
|
2613
|
+
maxFeePerGas?: bigint;
|
|
2614
|
+
maxPriorityFeePerGas?: bigint;
|
|
2615
|
+
nonce?: number;
|
|
2616
|
+
value?: bigint;
|
|
2617
|
+
}): Promise<`0x${string}`> {
|
|
2618
|
+
if (!this.contract.write) {
|
|
2619
|
+
throw new Error('Wallet client is required for write operations');
|
|
2620
|
+
}
|
|
2621
|
+
return this.contract.write.setCoverageRatio([_ratio] as const, options) as Promise<`0x${string}`>;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* setFeeSilo
|
|
2626
|
+
* nonpayable
|
|
2627
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2628
|
+
*/
|
|
2629
|
+
async setFeeSilo(_silo: `0x${string}`, options?: {
|
|
2630
|
+
accessList?: import('viem').AccessList;
|
|
2631
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2632
|
+
chain?: import('viem').Chain | null;
|
|
2633
|
+
dataSuffix?: `0x${string}`;
|
|
2634
|
+
gas?: bigint;
|
|
2635
|
+
gasPrice?: bigint;
|
|
2636
|
+
maxFeePerGas?: bigint;
|
|
2637
|
+
maxPriorityFeePerGas?: bigint;
|
|
2638
|
+
nonce?: number;
|
|
2639
|
+
value?: bigint;
|
|
2640
|
+
}): Promise<`0x${string}`> {
|
|
2641
|
+
if (!this.contract.write) {
|
|
2642
|
+
throw new Error('Wallet client is required for write operations');
|
|
2643
|
+
}
|
|
2644
|
+
return this.contract.write.setFeeSilo([_silo] as const, options) as Promise<`0x${string}`>;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
/**
|
|
2648
|
+
* setRewarder
|
|
2649
|
+
* nonpayable
|
|
2650
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2651
|
+
*/
|
|
2652
|
+
async setRewarder(_rewarder: `0x${string}`, options?: {
|
|
2653
|
+
accessList?: import('viem').AccessList;
|
|
2654
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2655
|
+
chain?: import('viem').Chain | null;
|
|
2656
|
+
dataSuffix?: `0x${string}`;
|
|
2657
|
+
gas?: bigint;
|
|
2658
|
+
gasPrice?: bigint;
|
|
2659
|
+
maxFeePerGas?: bigint;
|
|
2660
|
+
maxPriorityFeePerGas?: bigint;
|
|
2661
|
+
nonce?: number;
|
|
2662
|
+
value?: bigint;
|
|
2663
|
+
}): Promise<`0x${string}`> {
|
|
2664
|
+
if (!this.contract.write) {
|
|
2665
|
+
throw new Error('Wallet client is required for write operations');
|
|
2666
|
+
}
|
|
2667
|
+
return this.contract.write.setRewarder([_rewarder] as const, options) as Promise<`0x${string}`>;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
/**
|
|
2671
|
+
* setSilo
|
|
2672
|
+
* nonpayable
|
|
2673
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2674
|
+
*/
|
|
2675
|
+
async setSilo(_silo: `0x${string}`, options?: {
|
|
2676
|
+
accessList?: import('viem').AccessList;
|
|
2677
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2678
|
+
chain?: import('viem').Chain | null;
|
|
2679
|
+
dataSuffix?: `0x${string}`;
|
|
2680
|
+
gas?: bigint;
|
|
2681
|
+
gasPrice?: bigint;
|
|
2682
|
+
maxFeePerGas?: bigint;
|
|
2683
|
+
maxPriorityFeePerGas?: bigint;
|
|
2684
|
+
nonce?: number;
|
|
2685
|
+
value?: bigint;
|
|
2686
|
+
}): Promise<`0x${string}`> {
|
|
2687
|
+
if (!this.contract.write) {
|
|
2688
|
+
throw new Error('Wallet client is required for write operations');
|
|
2689
|
+
}
|
|
2690
|
+
return this.contract.write.setSilo([_silo] as const, options) as Promise<`0x${string}`>;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* setTaxRate
|
|
2695
|
+
* nonpayable
|
|
2696
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2697
|
+
*/
|
|
2698
|
+
async setTaxRate(newTaxRate: bigint, options?: {
|
|
2699
|
+
accessList?: import('viem').AccessList;
|
|
2700
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2701
|
+
chain?: import('viem').Chain | null;
|
|
2702
|
+
dataSuffix?: `0x${string}`;
|
|
2703
|
+
gas?: bigint;
|
|
2704
|
+
gasPrice?: bigint;
|
|
2705
|
+
maxFeePerGas?: bigint;
|
|
2706
|
+
maxPriorityFeePerGas?: bigint;
|
|
2707
|
+
nonce?: number;
|
|
2708
|
+
value?: bigint;
|
|
2709
|
+
}): Promise<`0x${string}`> {
|
|
2710
|
+
if (!this.contract.write) {
|
|
2711
|
+
throw new Error('Wallet client is required for write operations');
|
|
2712
|
+
}
|
|
2713
|
+
return this.contract.write.setTaxRate([newTaxRate] as const, options) as Promise<`0x${string}`>;
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
/**
|
|
2717
|
+
* setUpgradeDelay
|
|
2718
|
+
* nonpayable
|
|
2719
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2720
|
+
*/
|
|
2721
|
+
async setUpgradeDelay(newDelay: bigint, options?: {
|
|
2722
|
+
accessList?: import('viem').AccessList;
|
|
2723
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2724
|
+
chain?: import('viem').Chain | null;
|
|
2725
|
+
dataSuffix?: `0x${string}`;
|
|
2726
|
+
gas?: bigint;
|
|
2727
|
+
gasPrice?: bigint;
|
|
2728
|
+
maxFeePerGas?: bigint;
|
|
2729
|
+
maxPriorityFeePerGas?: bigint;
|
|
2730
|
+
nonce?: number;
|
|
2731
|
+
value?: bigint;
|
|
2732
|
+
}): Promise<`0x${string}`> {
|
|
2733
|
+
if (!this.contract.write) {
|
|
2734
|
+
throw new Error('Wallet client is required for write operations');
|
|
2735
|
+
}
|
|
2736
|
+
return this.contract.write.setUpgradeDelay([newDelay] as const, options) as Promise<`0x${string}`>;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
/**
|
|
2740
|
+
* toggleDeposits
|
|
2741
|
+
* nonpayable
|
|
2742
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2743
|
+
*/
|
|
2744
|
+
async toggleDeposits(options?: {
|
|
2745
|
+
accessList?: import('viem').AccessList;
|
|
2746
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2747
|
+
chain?: import('viem').Chain | null;
|
|
2748
|
+
dataSuffix?: `0x${string}`;
|
|
2749
|
+
gas?: bigint;
|
|
2750
|
+
gasPrice?: bigint;
|
|
2751
|
+
maxFeePerGas?: bigint;
|
|
2752
|
+
maxPriorityFeePerGas?: bigint;
|
|
2753
|
+
nonce?: number;
|
|
2754
|
+
value?: bigint;
|
|
2755
|
+
}): Promise<`0x${string}`> {
|
|
2756
|
+
if (!this.contract.write) {
|
|
2757
|
+
throw new Error('Wallet client is required for write operations');
|
|
2758
|
+
}
|
|
2759
|
+
return this.contract.write.toggleDeposits(options) as Promise<`0x${string}`>;
|
|
2760
|
+
}
|
|
2761
|
+
|
|
2762
|
+
/**
|
|
2763
|
+
* transfer
|
|
2764
|
+
* nonpayable
|
|
2765
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2766
|
+
*/
|
|
2767
|
+
async transfer(to: `0x${string}`, value: bigint, options?: {
|
|
2768
|
+
accessList?: import('viem').AccessList;
|
|
2769
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2770
|
+
chain?: import('viem').Chain | null;
|
|
2771
|
+
dataSuffix?: `0x${string}`;
|
|
2772
|
+
gas?: bigint;
|
|
2773
|
+
gasPrice?: bigint;
|
|
2774
|
+
maxFeePerGas?: bigint;
|
|
2775
|
+
maxPriorityFeePerGas?: bigint;
|
|
2776
|
+
nonce?: number;
|
|
2777
|
+
value?: bigint;
|
|
2778
|
+
}): Promise<`0x${string}`> {
|
|
2779
|
+
if (!this.contract.write) {
|
|
2780
|
+
throw new Error('Wallet client is required for write operations');
|
|
2781
|
+
}
|
|
2782
|
+
return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
/**
|
|
2786
|
+
* transferFrom
|
|
2787
|
+
* nonpayable
|
|
2788
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2789
|
+
*/
|
|
2790
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
2791
|
+
accessList?: import('viem').AccessList;
|
|
2792
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2793
|
+
chain?: import('viem').Chain | null;
|
|
2794
|
+
dataSuffix?: `0x${string}`;
|
|
2795
|
+
gas?: bigint;
|
|
2796
|
+
gasPrice?: bigint;
|
|
2797
|
+
maxFeePerGas?: bigint;
|
|
2798
|
+
maxPriorityFeePerGas?: bigint;
|
|
2799
|
+
nonce?: number;
|
|
2800
|
+
value?: bigint;
|
|
2801
|
+
}): Promise<`0x${string}`> {
|
|
2802
|
+
if (!this.contract.write) {
|
|
2803
|
+
throw new Error('Wallet client is required for write operations');
|
|
2804
|
+
}
|
|
2805
|
+
return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
/**
|
|
2809
|
+
* transferOwnership
|
|
2810
|
+
* nonpayable
|
|
2811
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2812
|
+
*/
|
|
2813
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
2814
|
+
accessList?: import('viem').AccessList;
|
|
2815
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2816
|
+
chain?: import('viem').Chain | null;
|
|
2817
|
+
dataSuffix?: `0x${string}`;
|
|
2818
|
+
gas?: bigint;
|
|
2819
|
+
gasPrice?: bigint;
|
|
2820
|
+
maxFeePerGas?: bigint;
|
|
2821
|
+
maxPriorityFeePerGas?: bigint;
|
|
2822
|
+
nonce?: number;
|
|
2823
|
+
value?: bigint;
|
|
2824
|
+
}): Promise<`0x${string}`> {
|
|
2825
|
+
if (!this.contract.write) {
|
|
2826
|
+
throw new Error('Wallet client is required for write operations');
|
|
2827
|
+
}
|
|
2828
|
+
return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
/**
|
|
2832
|
+
* unstake
|
|
2833
|
+
* nonpayable
|
|
2834
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2835
|
+
*/
|
|
2836
|
+
async unstake(receiver: `0x${string}`, options?: {
|
|
2837
|
+
accessList?: import('viem').AccessList;
|
|
2838
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2839
|
+
chain?: import('viem').Chain | null;
|
|
2840
|
+
dataSuffix?: `0x${string}`;
|
|
2841
|
+
gas?: bigint;
|
|
2842
|
+
gasPrice?: bigint;
|
|
2843
|
+
maxFeePerGas?: bigint;
|
|
2844
|
+
maxPriorityFeePerGas?: bigint;
|
|
2845
|
+
nonce?: number;
|
|
2846
|
+
value?: bigint;
|
|
2847
|
+
}): Promise<`0x${string}`> {
|
|
2848
|
+
if (!this.contract.write) {
|
|
2849
|
+
throw new Error('Wallet client is required for write operations');
|
|
2850
|
+
}
|
|
2851
|
+
return this.contract.write.unstake([receiver] as const, options) as Promise<`0x${string}`>;
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2854
|
+
/**
|
|
2855
|
+
* updateExistingCooldown
|
|
2856
|
+
* nonpayable
|
|
2857
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2858
|
+
*/
|
|
2859
|
+
async updateExistingCooldown(account: `0x${string}`, newCooldownEnd: bigint, options?: {
|
|
2860
|
+
accessList?: import('viem').AccessList;
|
|
2861
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2862
|
+
chain?: import('viem').Chain | null;
|
|
2863
|
+
dataSuffix?: `0x${string}`;
|
|
2864
|
+
gas?: bigint;
|
|
2865
|
+
gasPrice?: bigint;
|
|
2866
|
+
maxFeePerGas?: bigint;
|
|
2867
|
+
maxPriorityFeePerGas?: bigint;
|
|
2868
|
+
nonce?: number;
|
|
2869
|
+
value?: bigint;
|
|
2870
|
+
}): Promise<`0x${string}`> {
|
|
2871
|
+
if (!this.contract.write) {
|
|
2872
|
+
throw new Error('Wallet client is required for write operations');
|
|
2873
|
+
}
|
|
2874
|
+
return this.contract.write.updateExistingCooldown([account, newCooldownEnd] as const, options) as Promise<`0x${string}`>;
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
/**
|
|
2878
|
+
* upgradeToAndCall
|
|
2879
|
+
* payable
|
|
2880
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2881
|
+
*/
|
|
2882
|
+
async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
|
|
2883
|
+
accessList?: import('viem').AccessList;
|
|
2884
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2885
|
+
chain?: import('viem').Chain | null;
|
|
2886
|
+
dataSuffix?: `0x${string}`;
|
|
2887
|
+
gas?: bigint;
|
|
2888
|
+
gasPrice?: bigint;
|
|
2889
|
+
maxFeePerGas?: bigint;
|
|
2890
|
+
maxPriorityFeePerGas?: bigint;
|
|
2891
|
+
nonce?: number;
|
|
2892
|
+
value?: bigint;
|
|
2893
|
+
}): Promise<`0x${string}`> {
|
|
2894
|
+
if (!this.contract.write) {
|
|
2895
|
+
throw new Error('Wallet client is required for write operations');
|
|
2896
|
+
}
|
|
2897
|
+
return this.contract.write.upgradeToAndCall([newImplementation, data] as const, options) as Promise<`0x${string}`>;
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
/**
|
|
2901
|
+
* withdraw
|
|
2902
|
+
* nonpayable
|
|
2903
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2904
|
+
*/
|
|
2905
|
+
async withdraw(assets: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
|
|
2906
|
+
accessList?: import('viem').AccessList;
|
|
2907
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2908
|
+
chain?: import('viem').Chain | null;
|
|
2909
|
+
dataSuffix?: `0x${string}`;
|
|
2910
|
+
gas?: bigint;
|
|
2911
|
+
gasPrice?: bigint;
|
|
2912
|
+
maxFeePerGas?: bigint;
|
|
2913
|
+
maxPriorityFeePerGas?: bigint;
|
|
2914
|
+
nonce?: number;
|
|
2915
|
+
value?: bigint;
|
|
2916
|
+
}): Promise<`0x${string}`> {
|
|
2917
|
+
if (!this.contract.write) {
|
|
2918
|
+
throw new Error('Wallet client is required for write operations');
|
|
2919
|
+
}
|
|
2920
|
+
return this.contract.write.withdraw([assets, receiver, owner] as const, options) as Promise<`0x${string}`>;
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
/**
|
|
2926
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
2927
|
+
*
|
|
2928
|
+
* @example
|
|
2929
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
2930
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
2931
|
+
* console.log('Would succeed:', result.result);
|
|
2932
|
+
*/
|
|
2933
|
+
get simulate() {
|
|
2934
|
+
const contract = this.contract;
|
|
2935
|
+
if (!contract.simulate) {
|
|
2936
|
+
throw new Error('Public client is required for simulation');
|
|
2937
|
+
}
|
|
2938
|
+
return {
|
|
2939
|
+
/**
|
|
2940
|
+
* Simulate approve
|
|
2941
|
+
* Returns gas estimate and result without sending transaction
|
|
2942
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2943
|
+
*/
|
|
2944
|
+
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
2945
|
+
accessList?: import('viem').AccessList;
|
|
2946
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2947
|
+
chain?: import('viem').Chain | null;
|
|
2948
|
+
dataSuffix?: `0x${string}`;
|
|
2949
|
+
gas?: bigint;
|
|
2950
|
+
gasPrice?: bigint;
|
|
2951
|
+
maxFeePerGas?: bigint;
|
|
2952
|
+
maxPriorityFeePerGas?: bigint;
|
|
2953
|
+
nonce?: number;
|
|
2954
|
+
value?: bigint;
|
|
2955
|
+
}): Promise<boolean> {
|
|
2956
|
+
return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
|
|
2957
|
+
},
|
|
2958
|
+
/**
|
|
2959
|
+
* Simulate burnAsset
|
|
2960
|
+
* Returns gas estimate and result without sending transaction
|
|
2961
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2962
|
+
*/
|
|
2963
|
+
async burnAsset(amount: bigint, options?: {
|
|
2964
|
+
accessList?: import('viem').AccessList;
|
|
2965
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2966
|
+
chain?: import('viem').Chain | null;
|
|
2967
|
+
dataSuffix?: `0x${string}`;
|
|
2968
|
+
gas?: bigint;
|
|
2969
|
+
gasPrice?: bigint;
|
|
2970
|
+
maxFeePerGas?: bigint;
|
|
2971
|
+
maxPriorityFeePerGas?: bigint;
|
|
2972
|
+
nonce?: number;
|
|
2973
|
+
value?: bigint;
|
|
2974
|
+
}): Promise<void> {
|
|
2975
|
+
return contract.simulate.burnAsset([amount] as const, options) as Promise<void>;
|
|
2976
|
+
},
|
|
2977
|
+
/**
|
|
2978
|
+
* Simulate cancelScheduledUpgrade
|
|
2979
|
+
* Returns gas estimate and result without sending transaction
|
|
2980
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2981
|
+
*/
|
|
2982
|
+
async cancelScheduledUpgrade(options?: {
|
|
2983
|
+
accessList?: import('viem').AccessList;
|
|
2984
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2985
|
+
chain?: import('viem').Chain | null;
|
|
2986
|
+
dataSuffix?: `0x${string}`;
|
|
2987
|
+
gas?: bigint;
|
|
2988
|
+
gasPrice?: bigint;
|
|
2989
|
+
maxFeePerGas?: bigint;
|
|
2990
|
+
maxPriorityFeePerGas?: bigint;
|
|
2991
|
+
nonce?: number;
|
|
2992
|
+
value?: bigint;
|
|
2993
|
+
}): Promise<void> {
|
|
2994
|
+
return contract.simulate.cancelScheduledUpgrade(options) as Promise<void>;
|
|
2995
|
+
},
|
|
2996
|
+
/**
|
|
2997
|
+
* Simulate cooldownAssets
|
|
2998
|
+
* Returns gas estimate and result without sending transaction
|
|
2999
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3000
|
+
*/
|
|
3001
|
+
async cooldownAssets(assets: bigint, owner: `0x${string}`, options?: {
|
|
3002
|
+
accessList?: import('viem').AccessList;
|
|
3003
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3004
|
+
chain?: import('viem').Chain | null;
|
|
3005
|
+
dataSuffix?: `0x${string}`;
|
|
3006
|
+
gas?: bigint;
|
|
3007
|
+
gasPrice?: bigint;
|
|
3008
|
+
maxFeePerGas?: bigint;
|
|
3009
|
+
maxPriorityFeePerGas?: bigint;
|
|
3010
|
+
nonce?: number;
|
|
3011
|
+
value?: bigint;
|
|
3012
|
+
}): Promise<bigint> {
|
|
3013
|
+
return contract.simulate.cooldownAssets([assets, owner] as const, options) as Promise<bigint>;
|
|
3014
|
+
},
|
|
3015
|
+
/**
|
|
3016
|
+
* Simulate cooldownShares
|
|
3017
|
+
* Returns gas estimate and result without sending transaction
|
|
3018
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3019
|
+
*/
|
|
3020
|
+
async cooldownShares(shares: bigint, owner: `0x${string}`, options?: {
|
|
3021
|
+
accessList?: import('viem').AccessList;
|
|
3022
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3023
|
+
chain?: import('viem').Chain | null;
|
|
3024
|
+
dataSuffix?: `0x${string}`;
|
|
3025
|
+
gas?: bigint;
|
|
3026
|
+
gasPrice?: bigint;
|
|
3027
|
+
maxFeePerGas?: bigint;
|
|
3028
|
+
maxPriorityFeePerGas?: bigint;
|
|
3029
|
+
nonce?: number;
|
|
3030
|
+
value?: bigint;
|
|
3031
|
+
}): Promise<bigint> {
|
|
3032
|
+
return contract.simulate.cooldownShares([shares, owner] as const, options) as Promise<bigint>;
|
|
3033
|
+
},
|
|
3034
|
+
/**
|
|
3035
|
+
* Simulate deposit
|
|
3036
|
+
* Returns gas estimate and result without sending transaction
|
|
3037
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3038
|
+
*/
|
|
3039
|
+
async deposit(assets: bigint, receiver: `0x${string}`, options?: {
|
|
3040
|
+
accessList?: import('viem').AccessList;
|
|
3041
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3042
|
+
chain?: import('viem').Chain | null;
|
|
3043
|
+
dataSuffix?: `0x${string}`;
|
|
3044
|
+
gas?: bigint;
|
|
3045
|
+
gasPrice?: bigint;
|
|
3046
|
+
maxFeePerGas?: bigint;
|
|
3047
|
+
maxPriorityFeePerGas?: bigint;
|
|
3048
|
+
nonce?: number;
|
|
3049
|
+
value?: bigint;
|
|
3050
|
+
}): Promise<bigint> {
|
|
3051
|
+
return contract.simulate.deposit([assets, receiver] as const, options) as Promise<bigint>;
|
|
3052
|
+
},
|
|
3053
|
+
/**
|
|
3054
|
+
* Simulate initialize
|
|
3055
|
+
* Returns gas estimate and result without sending transaction
|
|
3056
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3057
|
+
*/
|
|
3058
|
+
async initialize(_asset: `0x${string}`, _initialRewarder: `0x${string}`, _owner: `0x${string}`, _name: string, _symbol: string, options?: {
|
|
3059
|
+
accessList?: import('viem').AccessList;
|
|
3060
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3061
|
+
chain?: import('viem').Chain | null;
|
|
3062
|
+
dataSuffix?: `0x${string}`;
|
|
3063
|
+
gas?: bigint;
|
|
3064
|
+
gasPrice?: bigint;
|
|
3065
|
+
maxFeePerGas?: bigint;
|
|
3066
|
+
maxPriorityFeePerGas?: bigint;
|
|
3067
|
+
nonce?: number;
|
|
3068
|
+
value?: bigint;
|
|
3069
|
+
}): Promise<void> {
|
|
3070
|
+
return contract.simulate.initialize([_asset, _initialRewarder, _owner, _name, _symbol] as const, options) as Promise<void>;
|
|
3071
|
+
},
|
|
3072
|
+
/**
|
|
3073
|
+
* Simulate mint
|
|
3074
|
+
* Returns gas estimate and result without sending transaction
|
|
3075
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3076
|
+
*/
|
|
3077
|
+
async mint(shares: bigint, receiver: `0x${string}`, options?: {
|
|
3078
|
+
accessList?: import('viem').AccessList;
|
|
3079
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3080
|
+
chain?: import('viem').Chain | null;
|
|
3081
|
+
dataSuffix?: `0x${string}`;
|
|
3082
|
+
gas?: bigint;
|
|
3083
|
+
gasPrice?: bigint;
|
|
3084
|
+
maxFeePerGas?: bigint;
|
|
3085
|
+
maxPriorityFeePerGas?: bigint;
|
|
3086
|
+
nonce?: number;
|
|
3087
|
+
value?: bigint;
|
|
3088
|
+
}): Promise<bigint> {
|
|
3089
|
+
return contract.simulate.mint([shares, receiver] as const, options) as Promise<bigint>;
|
|
3090
|
+
},
|
|
3091
|
+
/**
|
|
3092
|
+
* Simulate mintRewards
|
|
3093
|
+
* Returns gas estimate and result without sending transaction
|
|
3094
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3095
|
+
*/
|
|
3096
|
+
async mintRewards(amount: bigint, options?: {
|
|
3097
|
+
accessList?: import('viem').AccessList;
|
|
3098
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3099
|
+
chain?: import('viem').Chain | null;
|
|
3100
|
+
dataSuffix?: `0x${string}`;
|
|
3101
|
+
gas?: bigint;
|
|
3102
|
+
gasPrice?: bigint;
|
|
3103
|
+
maxFeePerGas?: bigint;
|
|
3104
|
+
maxPriorityFeePerGas?: bigint;
|
|
3105
|
+
nonce?: number;
|
|
3106
|
+
value?: bigint;
|
|
3107
|
+
}): Promise<void> {
|
|
3108
|
+
return contract.simulate.mintRewards([amount] as const, options) as Promise<void>;
|
|
3109
|
+
},
|
|
3110
|
+
/**
|
|
3111
|
+
* Simulate redeem
|
|
3112
|
+
* Returns gas estimate and result without sending transaction
|
|
3113
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3114
|
+
*/
|
|
3115
|
+
async redeem(shares: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
|
|
3116
|
+
accessList?: import('viem').AccessList;
|
|
3117
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3118
|
+
chain?: import('viem').Chain | null;
|
|
3119
|
+
dataSuffix?: `0x${string}`;
|
|
3120
|
+
gas?: bigint;
|
|
3121
|
+
gasPrice?: bigint;
|
|
3122
|
+
maxFeePerGas?: bigint;
|
|
3123
|
+
maxPriorityFeePerGas?: bigint;
|
|
3124
|
+
nonce?: number;
|
|
3125
|
+
value?: bigint;
|
|
3126
|
+
}): Promise<bigint> {
|
|
3127
|
+
return contract.simulate.redeem([shares, receiver, owner] as const, options) as Promise<bigint>;
|
|
3128
|
+
},
|
|
3129
|
+
/**
|
|
3130
|
+
* Simulate renounceOwnership
|
|
3131
|
+
* Returns gas estimate and result without sending transaction
|
|
3132
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3133
|
+
*/
|
|
3134
|
+
async renounceOwnership(options?: {
|
|
3135
|
+
accessList?: import('viem').AccessList;
|
|
3136
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3137
|
+
chain?: import('viem').Chain | null;
|
|
3138
|
+
dataSuffix?: `0x${string}`;
|
|
3139
|
+
gas?: bigint;
|
|
3140
|
+
gasPrice?: bigint;
|
|
3141
|
+
maxFeePerGas?: bigint;
|
|
3142
|
+
maxPriorityFeePerGas?: bigint;
|
|
3143
|
+
nonce?: number;
|
|
3144
|
+
value?: bigint;
|
|
3145
|
+
}): Promise<void> {
|
|
3146
|
+
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
3147
|
+
},
|
|
3148
|
+
/**
|
|
3149
|
+
* Simulate rescueTokens
|
|
3150
|
+
* Returns gas estimate and result without sending transaction
|
|
3151
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3152
|
+
*/
|
|
3153
|
+
async rescueTokens(token: `0x${string}`, amount: bigint, to: `0x${string}`, options?: {
|
|
3154
|
+
accessList?: import('viem').AccessList;
|
|
3155
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3156
|
+
chain?: import('viem').Chain | null;
|
|
3157
|
+
dataSuffix?: `0x${string}`;
|
|
3158
|
+
gas?: bigint;
|
|
3159
|
+
gasPrice?: bigint;
|
|
3160
|
+
maxFeePerGas?: bigint;
|
|
3161
|
+
maxPriorityFeePerGas?: bigint;
|
|
3162
|
+
nonce?: number;
|
|
3163
|
+
value?: bigint;
|
|
3164
|
+
}): Promise<void> {
|
|
3165
|
+
return contract.simulate.rescueTokens([token, amount, to] as const, options) as Promise<void>;
|
|
3166
|
+
},
|
|
3167
|
+
/**
|
|
3168
|
+
* Simulate scheduleUpgrade
|
|
3169
|
+
* Returns gas estimate and result without sending transaction
|
|
3170
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3171
|
+
*/
|
|
3172
|
+
async scheduleUpgrade(newImpl: `0x${string}`, options?: {
|
|
3173
|
+
accessList?: import('viem').AccessList;
|
|
3174
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3175
|
+
chain?: import('viem').Chain | null;
|
|
3176
|
+
dataSuffix?: `0x${string}`;
|
|
3177
|
+
gas?: bigint;
|
|
3178
|
+
gasPrice?: bigint;
|
|
3179
|
+
maxFeePerGas?: bigint;
|
|
3180
|
+
maxPriorityFeePerGas?: bigint;
|
|
3181
|
+
nonce?: number;
|
|
3182
|
+
value?: bigint;
|
|
3183
|
+
}): Promise<void> {
|
|
3184
|
+
return contract.simulate.scheduleUpgrade([newImpl] as const, options) as Promise<void>;
|
|
3185
|
+
},
|
|
3186
|
+
/**
|
|
3187
|
+
* Simulate setCooldownDuration
|
|
3188
|
+
* Returns gas estimate and result without sending transaction
|
|
3189
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3190
|
+
*/
|
|
3191
|
+
async setCooldownDuration(duration: bigint, options?: {
|
|
3192
|
+
accessList?: import('viem').AccessList;
|
|
3193
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3194
|
+
chain?: import('viem').Chain | null;
|
|
3195
|
+
dataSuffix?: `0x${string}`;
|
|
3196
|
+
gas?: bigint;
|
|
3197
|
+
gasPrice?: bigint;
|
|
3198
|
+
maxFeePerGas?: bigint;
|
|
3199
|
+
maxPriorityFeePerGas?: bigint;
|
|
3200
|
+
nonce?: number;
|
|
3201
|
+
value?: bigint;
|
|
3202
|
+
}): Promise<void> {
|
|
3203
|
+
return contract.simulate.setCooldownDuration([duration] as const, options) as Promise<void>;
|
|
3204
|
+
},
|
|
3205
|
+
/**
|
|
3206
|
+
* Simulate setCoverageRatio
|
|
3207
|
+
* Returns gas estimate and result without sending transaction
|
|
3208
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3209
|
+
*/
|
|
3210
|
+
async setCoverageRatio(_ratio: bigint, options?: {
|
|
3211
|
+
accessList?: import('viem').AccessList;
|
|
3212
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3213
|
+
chain?: import('viem').Chain | null;
|
|
3214
|
+
dataSuffix?: `0x${string}`;
|
|
3215
|
+
gas?: bigint;
|
|
3216
|
+
gasPrice?: bigint;
|
|
3217
|
+
maxFeePerGas?: bigint;
|
|
3218
|
+
maxPriorityFeePerGas?: bigint;
|
|
3219
|
+
nonce?: number;
|
|
3220
|
+
value?: bigint;
|
|
3221
|
+
}): Promise<void> {
|
|
3222
|
+
return contract.simulate.setCoverageRatio([_ratio] as const, options) as Promise<void>;
|
|
3223
|
+
},
|
|
3224
|
+
/**
|
|
3225
|
+
* Simulate setFeeSilo
|
|
3226
|
+
* Returns gas estimate and result without sending transaction
|
|
3227
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3228
|
+
*/
|
|
3229
|
+
async setFeeSilo(_silo: `0x${string}`, options?: {
|
|
3230
|
+
accessList?: import('viem').AccessList;
|
|
3231
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3232
|
+
chain?: import('viem').Chain | null;
|
|
3233
|
+
dataSuffix?: `0x${string}`;
|
|
3234
|
+
gas?: bigint;
|
|
3235
|
+
gasPrice?: bigint;
|
|
3236
|
+
maxFeePerGas?: bigint;
|
|
3237
|
+
maxPriorityFeePerGas?: bigint;
|
|
3238
|
+
nonce?: number;
|
|
3239
|
+
value?: bigint;
|
|
3240
|
+
}): Promise<void> {
|
|
3241
|
+
return contract.simulate.setFeeSilo([_silo] as const, options) as Promise<void>;
|
|
3242
|
+
},
|
|
3243
|
+
/**
|
|
3244
|
+
* Simulate setRewarder
|
|
3245
|
+
* Returns gas estimate and result without sending transaction
|
|
3246
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3247
|
+
*/
|
|
3248
|
+
async setRewarder(_rewarder: `0x${string}`, options?: {
|
|
3249
|
+
accessList?: import('viem').AccessList;
|
|
3250
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3251
|
+
chain?: import('viem').Chain | null;
|
|
3252
|
+
dataSuffix?: `0x${string}`;
|
|
3253
|
+
gas?: bigint;
|
|
3254
|
+
gasPrice?: bigint;
|
|
3255
|
+
maxFeePerGas?: bigint;
|
|
3256
|
+
maxPriorityFeePerGas?: bigint;
|
|
3257
|
+
nonce?: number;
|
|
3258
|
+
value?: bigint;
|
|
3259
|
+
}): Promise<void> {
|
|
3260
|
+
return contract.simulate.setRewarder([_rewarder] as const, options) as Promise<void>;
|
|
3261
|
+
},
|
|
3262
|
+
/**
|
|
3263
|
+
* Simulate setSilo
|
|
3264
|
+
* Returns gas estimate and result without sending transaction
|
|
3265
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3266
|
+
*/
|
|
3267
|
+
async setSilo(_silo: `0x${string}`, options?: {
|
|
3268
|
+
accessList?: import('viem').AccessList;
|
|
3269
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3270
|
+
chain?: import('viem').Chain | null;
|
|
3271
|
+
dataSuffix?: `0x${string}`;
|
|
3272
|
+
gas?: bigint;
|
|
3273
|
+
gasPrice?: bigint;
|
|
3274
|
+
maxFeePerGas?: bigint;
|
|
3275
|
+
maxPriorityFeePerGas?: bigint;
|
|
3276
|
+
nonce?: number;
|
|
3277
|
+
value?: bigint;
|
|
3278
|
+
}): Promise<void> {
|
|
3279
|
+
return contract.simulate.setSilo([_silo] as const, options) as Promise<void>;
|
|
3280
|
+
},
|
|
3281
|
+
/**
|
|
3282
|
+
* Simulate setTaxRate
|
|
3283
|
+
* Returns gas estimate and result without sending transaction
|
|
3284
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3285
|
+
*/
|
|
3286
|
+
async setTaxRate(newTaxRate: bigint, options?: {
|
|
3287
|
+
accessList?: import('viem').AccessList;
|
|
3288
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3289
|
+
chain?: import('viem').Chain | null;
|
|
3290
|
+
dataSuffix?: `0x${string}`;
|
|
3291
|
+
gas?: bigint;
|
|
3292
|
+
gasPrice?: bigint;
|
|
3293
|
+
maxFeePerGas?: bigint;
|
|
3294
|
+
maxPriorityFeePerGas?: bigint;
|
|
3295
|
+
nonce?: number;
|
|
3296
|
+
value?: bigint;
|
|
3297
|
+
}): Promise<void> {
|
|
3298
|
+
return contract.simulate.setTaxRate([newTaxRate] as const, options) as Promise<void>;
|
|
3299
|
+
},
|
|
3300
|
+
/**
|
|
3301
|
+
* Simulate setUpgradeDelay
|
|
3302
|
+
* Returns gas estimate and result without sending transaction
|
|
3303
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3304
|
+
*/
|
|
3305
|
+
async setUpgradeDelay(newDelay: bigint, options?: {
|
|
3306
|
+
accessList?: import('viem').AccessList;
|
|
3307
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3308
|
+
chain?: import('viem').Chain | null;
|
|
3309
|
+
dataSuffix?: `0x${string}`;
|
|
3310
|
+
gas?: bigint;
|
|
3311
|
+
gasPrice?: bigint;
|
|
3312
|
+
maxFeePerGas?: bigint;
|
|
3313
|
+
maxPriorityFeePerGas?: bigint;
|
|
3314
|
+
nonce?: number;
|
|
3315
|
+
value?: bigint;
|
|
3316
|
+
}): Promise<void> {
|
|
3317
|
+
return contract.simulate.setUpgradeDelay([newDelay] as const, options) as Promise<void>;
|
|
3318
|
+
},
|
|
3319
|
+
/**
|
|
3320
|
+
* Simulate toggleDeposits
|
|
3321
|
+
* Returns gas estimate and result without sending transaction
|
|
3322
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3323
|
+
*/
|
|
3324
|
+
async toggleDeposits(options?: {
|
|
3325
|
+
accessList?: import('viem').AccessList;
|
|
3326
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3327
|
+
chain?: import('viem').Chain | null;
|
|
3328
|
+
dataSuffix?: `0x${string}`;
|
|
3329
|
+
gas?: bigint;
|
|
3330
|
+
gasPrice?: bigint;
|
|
3331
|
+
maxFeePerGas?: bigint;
|
|
3332
|
+
maxPriorityFeePerGas?: bigint;
|
|
3333
|
+
nonce?: number;
|
|
3334
|
+
value?: bigint;
|
|
3335
|
+
}): Promise<void> {
|
|
3336
|
+
return contract.simulate.toggleDeposits(options) as Promise<void>;
|
|
3337
|
+
},
|
|
3338
|
+
/**
|
|
3339
|
+
* Simulate transfer
|
|
3340
|
+
* Returns gas estimate and result without sending transaction
|
|
3341
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3342
|
+
*/
|
|
3343
|
+
async transfer(to: `0x${string}`, value: bigint, options?: {
|
|
3344
|
+
accessList?: import('viem').AccessList;
|
|
3345
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3346
|
+
chain?: import('viem').Chain | null;
|
|
3347
|
+
dataSuffix?: `0x${string}`;
|
|
3348
|
+
gas?: bigint;
|
|
3349
|
+
gasPrice?: bigint;
|
|
3350
|
+
maxFeePerGas?: bigint;
|
|
3351
|
+
maxPriorityFeePerGas?: bigint;
|
|
3352
|
+
nonce?: number;
|
|
3353
|
+
value?: bigint;
|
|
3354
|
+
}): Promise<boolean> {
|
|
3355
|
+
return contract.simulate.transfer([to, value] as const, options) as Promise<boolean>;
|
|
3356
|
+
},
|
|
3357
|
+
/**
|
|
3358
|
+
* Simulate transferFrom
|
|
3359
|
+
* Returns gas estimate and result without sending transaction
|
|
3360
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3361
|
+
*/
|
|
3362
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
3363
|
+
accessList?: import('viem').AccessList;
|
|
3364
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3365
|
+
chain?: import('viem').Chain | null;
|
|
3366
|
+
dataSuffix?: `0x${string}`;
|
|
3367
|
+
gas?: bigint;
|
|
3368
|
+
gasPrice?: bigint;
|
|
3369
|
+
maxFeePerGas?: bigint;
|
|
3370
|
+
maxPriorityFeePerGas?: bigint;
|
|
3371
|
+
nonce?: number;
|
|
3372
|
+
value?: bigint;
|
|
3373
|
+
}): Promise<boolean> {
|
|
3374
|
+
return contract.simulate.transferFrom([from, to, value] as const, options) as Promise<boolean>;
|
|
3375
|
+
},
|
|
3376
|
+
/**
|
|
3377
|
+
* Simulate transferOwnership
|
|
3378
|
+
* Returns gas estimate and result without sending transaction
|
|
3379
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3380
|
+
*/
|
|
3381
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
3382
|
+
accessList?: import('viem').AccessList;
|
|
3383
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3384
|
+
chain?: import('viem').Chain | null;
|
|
3385
|
+
dataSuffix?: `0x${string}`;
|
|
3386
|
+
gas?: bigint;
|
|
3387
|
+
gasPrice?: bigint;
|
|
3388
|
+
maxFeePerGas?: bigint;
|
|
3389
|
+
maxPriorityFeePerGas?: bigint;
|
|
3390
|
+
nonce?: number;
|
|
3391
|
+
value?: bigint;
|
|
3392
|
+
}): Promise<void> {
|
|
3393
|
+
return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
|
|
3394
|
+
},
|
|
3395
|
+
/**
|
|
3396
|
+
* Simulate unstake
|
|
3397
|
+
* Returns gas estimate and result without sending transaction
|
|
3398
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3399
|
+
*/
|
|
3400
|
+
async unstake(receiver: `0x${string}`, options?: {
|
|
3401
|
+
accessList?: import('viem').AccessList;
|
|
3402
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3403
|
+
chain?: import('viem').Chain | null;
|
|
3404
|
+
dataSuffix?: `0x${string}`;
|
|
3405
|
+
gas?: bigint;
|
|
3406
|
+
gasPrice?: bigint;
|
|
3407
|
+
maxFeePerGas?: bigint;
|
|
3408
|
+
maxPriorityFeePerGas?: bigint;
|
|
3409
|
+
nonce?: number;
|
|
3410
|
+
value?: bigint;
|
|
3411
|
+
}): Promise<void> {
|
|
3412
|
+
return contract.simulate.unstake([receiver] as const, options) as Promise<void>;
|
|
3413
|
+
},
|
|
3414
|
+
/**
|
|
3415
|
+
* Simulate updateExistingCooldown
|
|
3416
|
+
* Returns gas estimate and result without sending transaction
|
|
3417
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3418
|
+
*/
|
|
3419
|
+
async updateExistingCooldown(account: `0x${string}`, newCooldownEnd: bigint, options?: {
|
|
3420
|
+
accessList?: import('viem').AccessList;
|
|
3421
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3422
|
+
chain?: import('viem').Chain | null;
|
|
3423
|
+
dataSuffix?: `0x${string}`;
|
|
3424
|
+
gas?: bigint;
|
|
3425
|
+
gasPrice?: bigint;
|
|
3426
|
+
maxFeePerGas?: bigint;
|
|
3427
|
+
maxPriorityFeePerGas?: bigint;
|
|
3428
|
+
nonce?: number;
|
|
3429
|
+
value?: bigint;
|
|
3430
|
+
}): Promise<void> {
|
|
3431
|
+
return contract.simulate.updateExistingCooldown([account, newCooldownEnd] as const, options) as Promise<void>;
|
|
3432
|
+
},
|
|
3433
|
+
/**
|
|
3434
|
+
* Simulate upgradeToAndCall
|
|
3435
|
+
* Returns gas estimate and result without sending transaction
|
|
3436
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3437
|
+
*/
|
|
3438
|
+
async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
|
|
3439
|
+
accessList?: import('viem').AccessList;
|
|
3440
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3441
|
+
chain?: import('viem').Chain | null;
|
|
3442
|
+
dataSuffix?: `0x${string}`;
|
|
3443
|
+
gas?: bigint;
|
|
3444
|
+
gasPrice?: bigint;
|
|
3445
|
+
maxFeePerGas?: bigint;
|
|
3446
|
+
maxPriorityFeePerGas?: bigint;
|
|
3447
|
+
nonce?: number;
|
|
3448
|
+
value?: bigint;
|
|
3449
|
+
}): Promise<void> {
|
|
3450
|
+
return contract.simulate.upgradeToAndCall([newImplementation, data] as const, options) as Promise<void>;
|
|
3451
|
+
},
|
|
3452
|
+
/**
|
|
3453
|
+
* Simulate withdraw
|
|
3454
|
+
* Returns gas estimate and result without sending transaction
|
|
3455
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3456
|
+
*/
|
|
3457
|
+
async withdraw(assets: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
|
|
3458
|
+
accessList?: import('viem').AccessList;
|
|
3459
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3460
|
+
chain?: import('viem').Chain | null;
|
|
3461
|
+
dataSuffix?: `0x${string}`;
|
|
3462
|
+
gas?: bigint;
|
|
3463
|
+
gasPrice?: bigint;
|
|
3464
|
+
maxFeePerGas?: bigint;
|
|
3465
|
+
maxPriorityFeePerGas?: bigint;
|
|
3466
|
+
nonce?: number;
|
|
3467
|
+
value?: bigint;
|
|
3468
|
+
}): Promise<bigint> {
|
|
3469
|
+
return contract.simulate.withdraw([assets, receiver, owner] as const, options) as Promise<bigint>;
|
|
3470
|
+
}
|
|
3471
|
+
};
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
/**
|
|
3475
|
+
* Watch contract events
|
|
3476
|
+
*
|
|
3477
|
+
* @example
|
|
3478
|
+
* // Watch all Transfer events
|
|
3479
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
3480
|
+
* console.log('Transfer:', event);
|
|
3481
|
+
* });
|
|
3482
|
+
*
|
|
3483
|
+
* // Stop watching
|
|
3484
|
+
* unwatch();
|
|
3485
|
+
*/
|
|
3486
|
+
get watch() {
|
|
3487
|
+
return {
|
|
3488
|
+
/**
|
|
3489
|
+
* Watch Approval events
|
|
3490
|
+
* @param callback Function to call when event is emitted
|
|
3491
|
+
* @param filter Optional filter for indexed parameters
|
|
3492
|
+
* @returns Unwatch function to stop listening
|
|
3493
|
+
*/
|
|
3494
|
+
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; spender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3495
|
+
return this.publicClient.watchContractEvent({
|
|
3496
|
+
address: this.contractAddress,
|
|
3497
|
+
abi: StakedmsUSDAbi,
|
|
3498
|
+
eventName: 'Approval',
|
|
3499
|
+
args: filter as any,
|
|
3500
|
+
onLogs: (logs: any[]) => {
|
|
3501
|
+
logs.forEach((log: any) => {
|
|
3502
|
+
callback(log.args as any);
|
|
3503
|
+
});
|
|
3504
|
+
},
|
|
3505
|
+
}) as () => void;
|
|
3506
|
+
},
|
|
3507
|
+
/**
|
|
3508
|
+
* Watch AssetBurned events
|
|
3509
|
+
* @param callback Function to call when event is emitted
|
|
3510
|
+
* @param filter Optional filter for indexed parameters
|
|
3511
|
+
* @returns Unwatch function to stop listening
|
|
3512
|
+
*/
|
|
3513
|
+
AssetBurned: (callback: (event: { arg0: bigint }) => void) => {
|
|
3514
|
+
return this.publicClient.watchContractEvent({
|
|
3515
|
+
address: this.contractAddress,
|
|
3516
|
+
abi: StakedmsUSDAbi,
|
|
3517
|
+
eventName: 'AssetBurned',
|
|
3518
|
+
|
|
3519
|
+
onLogs: (logs: any[]) => {
|
|
3520
|
+
logs.forEach((log: any) => {
|
|
3521
|
+
callback(log.args as any);
|
|
3522
|
+
});
|
|
3523
|
+
},
|
|
3524
|
+
}) as () => void;
|
|
3525
|
+
},
|
|
3526
|
+
/**
|
|
3527
|
+
* Watch CooldownDurationUpdated events
|
|
3528
|
+
* @param callback Function to call when event is emitted
|
|
3529
|
+
* @param filter Optional filter for indexed parameters
|
|
3530
|
+
* @returns Unwatch function to stop listening
|
|
3531
|
+
*/
|
|
3532
|
+
CooldownDurationUpdated: (callback: (event: { previousDuration: bigint; newDuration: bigint }) => void) => {
|
|
3533
|
+
return this.publicClient.watchContractEvent({
|
|
3534
|
+
address: this.contractAddress,
|
|
3535
|
+
abi: StakedmsUSDAbi,
|
|
3536
|
+
eventName: 'CooldownDurationUpdated',
|
|
3537
|
+
|
|
3538
|
+
onLogs: (logs: any[]) => {
|
|
3539
|
+
logs.forEach((log: any) => {
|
|
3540
|
+
callback(log.args as any);
|
|
3541
|
+
});
|
|
3542
|
+
},
|
|
3543
|
+
}) as () => void;
|
|
3544
|
+
},
|
|
3545
|
+
/**
|
|
3546
|
+
* Watch CooldownEndtimeUpdated events
|
|
3547
|
+
* @param callback Function to call when event is emitted
|
|
3548
|
+
* @param filter Optional filter for indexed parameters
|
|
3549
|
+
* @returns Unwatch function to stop listening
|
|
3550
|
+
*/
|
|
3551
|
+
CooldownEndtimeUpdated: (callback: (event: { account: `0x${string}`; oldTime: bigint; newTime: bigint }) => void) => {
|
|
3552
|
+
return this.publicClient.watchContractEvent({
|
|
3553
|
+
address: this.contractAddress,
|
|
3554
|
+
abi: StakedmsUSDAbi,
|
|
3555
|
+
eventName: 'CooldownEndtimeUpdated',
|
|
3556
|
+
|
|
3557
|
+
onLogs: (logs: any[]) => {
|
|
3558
|
+
logs.forEach((log: any) => {
|
|
3559
|
+
callback(log.args as any);
|
|
3560
|
+
});
|
|
3561
|
+
},
|
|
3562
|
+
}) as () => void;
|
|
3563
|
+
},
|
|
3564
|
+
/**
|
|
3565
|
+
* Watch CoverageRatioUpdated events
|
|
3566
|
+
* @param callback Function to call when event is emitted
|
|
3567
|
+
* @param filter Optional filter for indexed parameters
|
|
3568
|
+
* @returns Unwatch function to stop listening
|
|
3569
|
+
*/
|
|
3570
|
+
CoverageRatioUpdated: (callback: (event: { arg0: bigint }) => void) => {
|
|
3571
|
+
return this.publicClient.watchContractEvent({
|
|
3572
|
+
address: this.contractAddress,
|
|
3573
|
+
abi: StakedmsUSDAbi,
|
|
3574
|
+
eventName: 'CoverageRatioUpdated',
|
|
3575
|
+
|
|
3576
|
+
onLogs: (logs: any[]) => {
|
|
3577
|
+
logs.forEach((log: any) => {
|
|
3578
|
+
callback(log.args as any);
|
|
3579
|
+
});
|
|
3580
|
+
},
|
|
3581
|
+
}) as () => void;
|
|
3582
|
+
},
|
|
3583
|
+
/**
|
|
3584
|
+
* Watch Deposit events
|
|
3585
|
+
* @param callback Function to call when event is emitted
|
|
3586
|
+
* @param filter Optional filter for indexed parameters
|
|
3587
|
+
* @returns Unwatch function to stop listening
|
|
3588
|
+
*/
|
|
3589
|
+
Deposit: (callback: (event: { sender: `0x${string}`; owner: `0x${string}`; assets: bigint; shares: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3590
|
+
return this.publicClient.watchContractEvent({
|
|
3591
|
+
address: this.contractAddress,
|
|
3592
|
+
abi: StakedmsUSDAbi,
|
|
3593
|
+
eventName: 'Deposit',
|
|
3594
|
+
args: filter as any,
|
|
3595
|
+
onLogs: (logs: any[]) => {
|
|
3596
|
+
logs.forEach((log: any) => {
|
|
3597
|
+
callback(log.args as any);
|
|
3598
|
+
});
|
|
3599
|
+
},
|
|
3600
|
+
}) as () => void;
|
|
3601
|
+
},
|
|
3602
|
+
/**
|
|
3603
|
+
* Watch DepositsToggled events
|
|
3604
|
+
* @param callback Function to call when event is emitted
|
|
3605
|
+
* @param filter Optional filter for indexed parameters
|
|
3606
|
+
* @returns Unwatch function to stop listening
|
|
3607
|
+
*/
|
|
3608
|
+
DepositsToggled: (callback: (event: { arg0: boolean }) => void) => {
|
|
3609
|
+
return this.publicClient.watchContractEvent({
|
|
3610
|
+
address: this.contractAddress,
|
|
3611
|
+
abi: StakedmsUSDAbi,
|
|
3612
|
+
eventName: 'DepositsToggled',
|
|
3613
|
+
|
|
3614
|
+
onLogs: (logs: any[]) => {
|
|
3615
|
+
logs.forEach((log: any) => {
|
|
3616
|
+
callback(log.args as any);
|
|
3617
|
+
});
|
|
3618
|
+
},
|
|
3619
|
+
}) as () => void;
|
|
3620
|
+
},
|
|
3621
|
+
/**
|
|
3622
|
+
* Watch FeeSiloUpdated events
|
|
3623
|
+
* @param callback Function to call when event is emitted
|
|
3624
|
+
* @param filter Optional filter for indexed parameters
|
|
3625
|
+
* @returns Unwatch function to stop listening
|
|
3626
|
+
*/
|
|
3627
|
+
FeeSiloUpdated: (callback: (event: { arg0: `0x${string}` }) => void) => {
|
|
3628
|
+
return this.publicClient.watchContractEvent({
|
|
3629
|
+
address: this.contractAddress,
|
|
3630
|
+
abi: StakedmsUSDAbi,
|
|
3631
|
+
eventName: 'FeeSiloUpdated',
|
|
3632
|
+
|
|
3633
|
+
onLogs: (logs: any[]) => {
|
|
3634
|
+
logs.forEach((log: any) => {
|
|
3635
|
+
callback(log.args as any);
|
|
3636
|
+
});
|
|
3637
|
+
},
|
|
3638
|
+
}) as () => void;
|
|
3639
|
+
},
|
|
3640
|
+
/**
|
|
3641
|
+
* Watch Initialized events
|
|
3642
|
+
* @param callback Function to call when event is emitted
|
|
3643
|
+
* @param filter Optional filter for indexed parameters
|
|
3644
|
+
* @returns Unwatch function to stop listening
|
|
3645
|
+
*/
|
|
3646
|
+
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
3647
|
+
return this.publicClient.watchContractEvent({
|
|
3648
|
+
address: this.contractAddress,
|
|
3649
|
+
abi: StakedmsUSDAbi,
|
|
3650
|
+
eventName: 'Initialized',
|
|
3651
|
+
|
|
3652
|
+
onLogs: (logs: any[]) => {
|
|
3653
|
+
logs.forEach((log: any) => {
|
|
3654
|
+
callback(log.args as any);
|
|
3655
|
+
});
|
|
3656
|
+
},
|
|
3657
|
+
}) as () => void;
|
|
3658
|
+
},
|
|
3659
|
+
/**
|
|
3660
|
+
* Watch LockedAmountRedistributed events
|
|
3661
|
+
* @param callback Function to call when event is emitted
|
|
3662
|
+
* @param filter Optional filter for indexed parameters
|
|
3663
|
+
* @returns Unwatch function to stop listening
|
|
3664
|
+
*/
|
|
3665
|
+
LockedAmountRedistributed: (callback: (event: { from: `0x${string}`; to: `0x${string}`; amount: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3666
|
+
return this.publicClient.watchContractEvent({
|
|
3667
|
+
address: this.contractAddress,
|
|
3668
|
+
abi: StakedmsUSDAbi,
|
|
3669
|
+
eventName: 'LockedAmountRedistributed',
|
|
3670
|
+
args: filter as any,
|
|
3671
|
+
onLogs: (logs: any[]) => {
|
|
3672
|
+
logs.forEach((log: any) => {
|
|
3673
|
+
callback(log.args as any);
|
|
3674
|
+
});
|
|
3675
|
+
},
|
|
3676
|
+
}) as () => void;
|
|
3677
|
+
},
|
|
3678
|
+
/**
|
|
3679
|
+
* Watch OwnershipTransferred events
|
|
3680
|
+
* @param callback Function to call when event is emitted
|
|
3681
|
+
* @param filter Optional filter for indexed parameters
|
|
3682
|
+
* @returns Unwatch function to stop listening
|
|
3683
|
+
*/
|
|
3684
|
+
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; newOwner?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3685
|
+
return this.publicClient.watchContractEvent({
|
|
3686
|
+
address: this.contractAddress,
|
|
3687
|
+
abi: StakedmsUSDAbi,
|
|
3688
|
+
eventName: 'OwnershipTransferred',
|
|
3689
|
+
args: filter as any,
|
|
3690
|
+
onLogs: (logs: any[]) => {
|
|
3691
|
+
logs.forEach((log: any) => {
|
|
3692
|
+
callback(log.args as any);
|
|
3693
|
+
});
|
|
3694
|
+
},
|
|
3695
|
+
}) as () => void;
|
|
3696
|
+
},
|
|
3697
|
+
/**
|
|
3698
|
+
* Watch RewarderUpdated events
|
|
3699
|
+
* @param callback Function to call when event is emitted
|
|
3700
|
+
* @param filter Optional filter for indexed parameters
|
|
3701
|
+
* @returns Unwatch function to stop listening
|
|
3702
|
+
*/
|
|
3703
|
+
RewarderUpdated: (callback: (event: { arg0: `0x${string}` }) => void) => {
|
|
3704
|
+
return this.publicClient.watchContractEvent({
|
|
3705
|
+
address: this.contractAddress,
|
|
3706
|
+
abi: StakedmsUSDAbi,
|
|
3707
|
+
eventName: 'RewarderUpdated',
|
|
3708
|
+
|
|
3709
|
+
onLogs: (logs: any[]) => {
|
|
3710
|
+
logs.forEach((log: any) => {
|
|
3711
|
+
callback(log.args as any);
|
|
3712
|
+
});
|
|
3713
|
+
},
|
|
3714
|
+
}) as () => void;
|
|
3715
|
+
},
|
|
3716
|
+
/**
|
|
3717
|
+
* Watch RewardsReceived events
|
|
3718
|
+
* @param callback Function to call when event is emitted
|
|
3719
|
+
* @param filter Optional filter for indexed parameters
|
|
3720
|
+
* @returns Unwatch function to stop listening
|
|
3721
|
+
*/
|
|
3722
|
+
RewardsReceived: (callback: (event: { amount: bigint }) => void, filter?: { amount?: bigint | bigint[] | null }) => {
|
|
3723
|
+
return this.publicClient.watchContractEvent({
|
|
3724
|
+
address: this.contractAddress,
|
|
3725
|
+
abi: StakedmsUSDAbi,
|
|
3726
|
+
eventName: 'RewardsReceived',
|
|
3727
|
+
args: filter as any,
|
|
3728
|
+
onLogs: (logs: any[]) => {
|
|
3729
|
+
logs.forEach((log: any) => {
|
|
3730
|
+
callback(log.args as any);
|
|
3731
|
+
});
|
|
3732
|
+
},
|
|
3733
|
+
}) as () => void;
|
|
3734
|
+
},
|
|
3735
|
+
/**
|
|
3736
|
+
* Watch SiloUpdated events
|
|
3737
|
+
* @param callback Function to call when event is emitted
|
|
3738
|
+
* @param filter Optional filter for indexed parameters
|
|
3739
|
+
* @returns Unwatch function to stop listening
|
|
3740
|
+
*/
|
|
3741
|
+
SiloUpdated: (callback: (event: { previousSilo: `0x${string}`; newSilo: `0x${string}` }) => void) => {
|
|
3742
|
+
return this.publicClient.watchContractEvent({
|
|
3743
|
+
address: this.contractAddress,
|
|
3744
|
+
abi: StakedmsUSDAbi,
|
|
3745
|
+
eventName: 'SiloUpdated',
|
|
3746
|
+
|
|
3747
|
+
onLogs: (logs: any[]) => {
|
|
3748
|
+
logs.forEach((log: any) => {
|
|
3749
|
+
callback(log.args as any);
|
|
3750
|
+
});
|
|
3751
|
+
},
|
|
3752
|
+
}) as () => void;
|
|
3753
|
+
},
|
|
3754
|
+
/**
|
|
3755
|
+
* Watch TaxRateUpdated events
|
|
3756
|
+
* @param callback Function to call when event is emitted
|
|
3757
|
+
* @param filter Optional filter for indexed parameters
|
|
3758
|
+
* @returns Unwatch function to stop listening
|
|
3759
|
+
*/
|
|
3760
|
+
TaxRateUpdated: (callback: (event: { arg0: bigint }) => void) => {
|
|
3761
|
+
return this.publicClient.watchContractEvent({
|
|
3762
|
+
address: this.contractAddress,
|
|
3763
|
+
abi: StakedmsUSDAbi,
|
|
3764
|
+
eventName: 'TaxRateUpdated',
|
|
3765
|
+
|
|
3766
|
+
onLogs: (logs: any[]) => {
|
|
3767
|
+
logs.forEach((log: any) => {
|
|
3768
|
+
callback(log.args as any);
|
|
3769
|
+
});
|
|
3770
|
+
},
|
|
3771
|
+
}) as () => void;
|
|
3772
|
+
},
|
|
3773
|
+
/**
|
|
3774
|
+
* Watch Transfer events
|
|
3775
|
+
* @param callback Function to call when event is emitted
|
|
3776
|
+
* @param filter Optional filter for indexed parameters
|
|
3777
|
+
* @returns Unwatch function to stop listening
|
|
3778
|
+
*/
|
|
3779
|
+
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3780
|
+
return this.publicClient.watchContractEvent({
|
|
3781
|
+
address: this.contractAddress,
|
|
3782
|
+
abi: StakedmsUSDAbi,
|
|
3783
|
+
eventName: 'Transfer',
|
|
3784
|
+
args: filter as any,
|
|
3785
|
+
onLogs: (logs: any[]) => {
|
|
3786
|
+
logs.forEach((log: any) => {
|
|
3787
|
+
callback(log.args as any);
|
|
3788
|
+
});
|
|
3789
|
+
},
|
|
3790
|
+
}) as () => void;
|
|
3791
|
+
},
|
|
3792
|
+
/**
|
|
3793
|
+
* Watch Unstake events
|
|
3794
|
+
* @param callback Function to call when event is emitted
|
|
3795
|
+
* @param filter Optional filter for indexed parameters
|
|
3796
|
+
* @returns Unwatch function to stop listening
|
|
3797
|
+
*/
|
|
3798
|
+
Unstake: (callback: (event: { caller: `0x${string}`; receiver: `0x${string}`; assets: bigint; amountForRedeemer: bigint }) => void) => {
|
|
3799
|
+
return this.publicClient.watchContractEvent({
|
|
3800
|
+
address: this.contractAddress,
|
|
3801
|
+
abi: StakedmsUSDAbi,
|
|
3802
|
+
eventName: 'Unstake',
|
|
3803
|
+
|
|
3804
|
+
onLogs: (logs: any[]) => {
|
|
3805
|
+
logs.forEach((log: any) => {
|
|
3806
|
+
callback(log.args as any);
|
|
3807
|
+
});
|
|
3808
|
+
},
|
|
3809
|
+
}) as () => void;
|
|
3810
|
+
},
|
|
3811
|
+
/**
|
|
3812
|
+
* Watch UpgradeCanceled events
|
|
3813
|
+
* @param callback Function to call when event is emitted
|
|
3814
|
+
* @param filter Optional filter for indexed parameters
|
|
3815
|
+
* @returns Unwatch function to stop listening
|
|
3816
|
+
*/
|
|
3817
|
+
UpgradeCanceled: (callback: (event: { canceledImplementation: `0x${string}` }) => void, filter?: { canceledImplementation?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3818
|
+
return this.publicClient.watchContractEvent({
|
|
3819
|
+
address: this.contractAddress,
|
|
3820
|
+
abi: StakedmsUSDAbi,
|
|
3821
|
+
eventName: 'UpgradeCanceled',
|
|
3822
|
+
args: filter as any,
|
|
3823
|
+
onLogs: (logs: any[]) => {
|
|
3824
|
+
logs.forEach((log: any) => {
|
|
3825
|
+
callback(log.args as any);
|
|
3826
|
+
});
|
|
3827
|
+
},
|
|
3828
|
+
}) as () => void;
|
|
3829
|
+
},
|
|
3830
|
+
/**
|
|
3831
|
+
* Watch UpgradeDelayUpdated events
|
|
3832
|
+
* @param callback Function to call when event is emitted
|
|
3833
|
+
* @param filter Optional filter for indexed parameters
|
|
3834
|
+
* @returns Unwatch function to stop listening
|
|
3835
|
+
*/
|
|
3836
|
+
UpgradeDelayUpdated: (callback: (event: { oldDelay: bigint; newDelay: bigint }) => void) => {
|
|
3837
|
+
return this.publicClient.watchContractEvent({
|
|
3838
|
+
address: this.contractAddress,
|
|
3839
|
+
abi: StakedmsUSDAbi,
|
|
3840
|
+
eventName: 'UpgradeDelayUpdated',
|
|
3841
|
+
|
|
3842
|
+
onLogs: (logs: any[]) => {
|
|
3843
|
+
logs.forEach((log: any) => {
|
|
3844
|
+
callback(log.args as any);
|
|
3845
|
+
});
|
|
3846
|
+
},
|
|
3847
|
+
}) as () => void;
|
|
3848
|
+
},
|
|
3849
|
+
/**
|
|
3850
|
+
* Watch UpgradeScheduled events
|
|
3851
|
+
* @param callback Function to call when event is emitted
|
|
3852
|
+
* @param filter Optional filter for indexed parameters
|
|
3853
|
+
* @returns Unwatch function to stop listening
|
|
3854
|
+
*/
|
|
3855
|
+
UpgradeScheduled: (callback: (event: { newImplementation: `0x${string}`; availableAt: bigint }) => void, filter?: { newImplementation?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3856
|
+
return this.publicClient.watchContractEvent({
|
|
3857
|
+
address: this.contractAddress,
|
|
3858
|
+
abi: StakedmsUSDAbi,
|
|
3859
|
+
eventName: 'UpgradeScheduled',
|
|
3860
|
+
args: filter as any,
|
|
3861
|
+
onLogs: (logs: any[]) => {
|
|
3862
|
+
logs.forEach((log: any) => {
|
|
3863
|
+
callback(log.args as any);
|
|
3864
|
+
});
|
|
3865
|
+
},
|
|
3866
|
+
}) as () => void;
|
|
3867
|
+
},
|
|
3868
|
+
/**
|
|
3869
|
+
* Watch Upgraded events
|
|
3870
|
+
* @param callback Function to call when event is emitted
|
|
3871
|
+
* @param filter Optional filter for indexed parameters
|
|
3872
|
+
* @returns Unwatch function to stop listening
|
|
3873
|
+
*/
|
|
3874
|
+
Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3875
|
+
return this.publicClient.watchContractEvent({
|
|
3876
|
+
address: this.contractAddress,
|
|
3877
|
+
abi: StakedmsUSDAbi,
|
|
3878
|
+
eventName: 'Upgraded',
|
|
3879
|
+
args: filter as any,
|
|
3880
|
+
onLogs: (logs: any[]) => {
|
|
3881
|
+
logs.forEach((log: any) => {
|
|
3882
|
+
callback(log.args as any);
|
|
3883
|
+
});
|
|
3884
|
+
},
|
|
3885
|
+
}) as () => void;
|
|
3886
|
+
},
|
|
3887
|
+
/**
|
|
3888
|
+
* Watch Withdraw events
|
|
3889
|
+
* @param callback Function to call when event is emitted
|
|
3890
|
+
* @param filter Optional filter for indexed parameters
|
|
3891
|
+
* @returns Unwatch function to stop listening
|
|
3892
|
+
*/
|
|
3893
|
+
Withdraw: (callback: (event: { sender: `0x${string}`; receiver: `0x${string}`; owner: `0x${string}`; assets: bigint; shares: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null; receiver?: `0x${string}` | `0x${string}`[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3894
|
+
return this.publicClient.watchContractEvent({
|
|
3895
|
+
address: this.contractAddress,
|
|
3896
|
+
abi: StakedmsUSDAbi,
|
|
3897
|
+
eventName: 'Withdraw',
|
|
3898
|
+
args: filter as any,
|
|
3899
|
+
onLogs: (logs: any[]) => {
|
|
3900
|
+
logs.forEach((log: any) => {
|
|
3901
|
+
callback(log.args as any);
|
|
3902
|
+
});
|
|
3903
|
+
},
|
|
3904
|
+
}) as () => void;
|
|
3905
|
+
},
|
|
3906
|
+
/**
|
|
3907
|
+
* Watch msUSDSiloUpdated events
|
|
3908
|
+
* @param callback Function to call when event is emitted
|
|
3909
|
+
* @param filter Optional filter for indexed parameters
|
|
3910
|
+
* @returns Unwatch function to stop listening
|
|
3911
|
+
*/
|
|
3912
|
+
msUSDSiloUpdated: (callback: (event: { arg0: `0x${string}` }) => void) => {
|
|
3913
|
+
return this.publicClient.watchContractEvent({
|
|
3914
|
+
address: this.contractAddress,
|
|
3915
|
+
abi: StakedmsUSDAbi,
|
|
3916
|
+
eventName: 'msUSDSiloUpdated',
|
|
3917
|
+
|
|
3918
|
+
onLogs: (logs: any[]) => {
|
|
3919
|
+
logs.forEach((log: any) => {
|
|
3920
|
+
callback(log.args as any);
|
|
3921
|
+
});
|
|
3922
|
+
},
|
|
3923
|
+
}) as () => void;
|
|
3924
|
+
}
|
|
3925
|
+
};
|
|
3926
|
+
}
|
|
3927
|
+
}
|