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