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