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