@gitmyabi/merklevester 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.
@@ -0,0 +1,2191 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MerkleVester_json = exports.MerkleVester_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * MerkleVester_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.MerkleVester_jsonAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "address",
15
+ "name": "token",
16
+ "type": "address"
17
+ },
18
+ {
19
+ "internalType": "address",
20
+ "name": "benefactor",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "internalType": "uint256",
25
+ "name": "_claimFee",
26
+ "type": "uint256"
27
+ },
28
+ {
29
+ "internalType": "address",
30
+ "name": "_feeCollector",
31
+ "type": "address"
32
+ },
33
+ {
34
+ "internalType": "address",
35
+ "name": "_feeSetter",
36
+ "type": "address"
37
+ },
38
+ {
39
+ "internalType": "contract IPostClaimHandler[]",
40
+ "name": "_postClaimHandlers",
41
+ "type": "address[]"
42
+ },
43
+ {
44
+ "internalType": "uint256",
45
+ "name": "_maxClaimFee",
46
+ "type": "uint256"
47
+ },
48
+ {
49
+ "internalType": "bool",
50
+ "name": "_shouldPayClaimFeeOnlyOnce",
51
+ "type": "bool"
52
+ }
53
+ ],
54
+ "stateMutability": "nonpayable",
55
+ "type": "constructor"
56
+ },
57
+ {
58
+ "inputs": [],
59
+ "name": "AccessControlBadConfirmation",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [
64
+ {
65
+ "internalType": "address",
66
+ "name": "account",
67
+ "type": "address"
68
+ },
69
+ {
70
+ "internalType": "bytes32",
71
+ "name": "neededRole",
72
+ "type": "bytes32"
73
+ }
74
+ ],
75
+ "name": "AccessControlUnauthorizedAccount",
76
+ "type": "error"
77
+ },
78
+ {
79
+ "inputs": [
80
+ {
81
+ "internalType": "address",
82
+ "name": "target",
83
+ "type": "address"
84
+ }
85
+ ],
86
+ "name": "AddressEmptyCode",
87
+ "type": "error"
88
+ },
89
+ {
90
+ "inputs": [
91
+ {
92
+ "internalType": "address",
93
+ "name": "account",
94
+ "type": "address"
95
+ }
96
+ ],
97
+ "name": "AddressInsufficientBalance",
98
+ "type": "error"
99
+ },
100
+ {
101
+ "inputs": [],
102
+ "name": "AlreadyFullyUnlocked",
103
+ "type": "error"
104
+ },
105
+ {
106
+ "inputs": [],
107
+ "name": "AlreadyTerminated",
108
+ "type": "error"
109
+ },
110
+ {
111
+ "inputs": [],
112
+ "name": "AmountZero",
113
+ "type": "error"
114
+ },
115
+ {
116
+ "inputs": [],
117
+ "name": "ClaimFeeExceedsMaximum",
118
+ "type": "error"
119
+ },
120
+ {
121
+ "inputs": [],
122
+ "name": "ClaimHandlerAlreadyWhitelisted",
123
+ "type": "error"
124
+ },
125
+ {
126
+ "inputs": [],
127
+ "name": "ClaimHandlerNotYetWhitelisted",
128
+ "type": "error"
129
+ },
130
+ {
131
+ "inputs": [],
132
+ "name": "DeflationaryTokensNotSupported",
133
+ "type": "error"
134
+ },
135
+ {
136
+ "inputs": [],
137
+ "name": "FailedInnerCall",
138
+ "type": "error"
139
+ },
140
+ {
141
+ "inputs": [],
142
+ "name": "InsufficientFunds",
143
+ "type": "error"
144
+ },
145
+ {
146
+ "inputs": [],
147
+ "name": "InvalidAllocation",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [],
152
+ "name": "InvalidAllocationType",
153
+ "type": "error"
154
+ },
155
+ {
156
+ "inputs": [],
157
+ "name": "InvalidFeeCollector",
158
+ "type": "error"
159
+ },
160
+ {
161
+ "inputs": [],
162
+ "name": "InvalidFeeFundsSent",
163
+ "type": "error"
164
+ },
165
+ {
166
+ "inputs": [],
167
+ "name": "InvalidFeeSetter",
168
+ "type": "error"
169
+ },
170
+ {
171
+ "inputs": [],
172
+ "name": "InvalidMerkleProof",
173
+ "type": "error"
174
+ },
175
+ {
176
+ "inputs": [],
177
+ "name": "InvalidToken",
178
+ "type": "error"
179
+ },
180
+ {
181
+ "inputs": [],
182
+ "name": "InvalidWithdrawal",
183
+ "type": "error"
184
+ },
185
+ {
186
+ "inputs": [],
187
+ "name": "NotCancellable",
188
+ "type": "error"
189
+ },
190
+ {
191
+ "inputs": [],
192
+ "name": "NotRevokable",
193
+ "type": "error"
194
+ },
195
+ {
196
+ "inputs": [],
197
+ "name": "NotTransferable",
198
+ "type": "error"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "PostClaimHandlerNotWhitelisted",
203
+ "type": "error"
204
+ },
205
+ {
206
+ "inputs": [],
207
+ "name": "ReentrancyGuardReentrantCall",
208
+ "type": "error"
209
+ },
210
+ {
211
+ "inputs": [
212
+ {
213
+ "internalType": "address",
214
+ "name": "token",
215
+ "type": "address"
216
+ }
217
+ ],
218
+ "name": "SafeERC20FailedOperation",
219
+ "type": "error"
220
+ },
221
+ {
222
+ "inputs": [],
223
+ "name": "SameBeneficiaryAddress",
224
+ "type": "error"
225
+ },
226
+ {
227
+ "inputs": [],
228
+ "name": "ZeroBeneficiary",
229
+ "type": "error"
230
+ },
231
+ {
232
+ "inputs": [],
233
+ "name": "ZeroToken",
234
+ "type": "error"
235
+ },
236
+ {
237
+ "anonymous": false,
238
+ "inputs": [
239
+ {
240
+ "indexed": true,
241
+ "internalType": "bytes32",
242
+ "name": "role",
243
+ "type": "bytes32"
244
+ },
245
+ {
246
+ "indexed": true,
247
+ "internalType": "bytes32",
248
+ "name": "previousAdminRole",
249
+ "type": "bytes32"
250
+ },
251
+ {
252
+ "indexed": true,
253
+ "internalType": "bytes32",
254
+ "name": "newAdminRole",
255
+ "type": "bytes32"
256
+ }
257
+ ],
258
+ "name": "RoleAdminChanged",
259
+ "type": "event"
260
+ },
261
+ {
262
+ "anonymous": false,
263
+ "inputs": [
264
+ {
265
+ "indexed": true,
266
+ "internalType": "bytes32",
267
+ "name": "role",
268
+ "type": "bytes32"
269
+ },
270
+ {
271
+ "indexed": true,
272
+ "internalType": "address",
273
+ "name": "account",
274
+ "type": "address"
275
+ },
276
+ {
277
+ "indexed": true,
278
+ "internalType": "address",
279
+ "name": "sender",
280
+ "type": "address"
281
+ }
282
+ ],
283
+ "name": "RoleGranted",
284
+ "type": "event"
285
+ },
286
+ {
287
+ "anonymous": false,
288
+ "inputs": [
289
+ {
290
+ "indexed": true,
291
+ "internalType": "bytes32",
292
+ "name": "role",
293
+ "type": "bytes32"
294
+ },
295
+ {
296
+ "indexed": true,
297
+ "internalType": "address",
298
+ "name": "account",
299
+ "type": "address"
300
+ },
301
+ {
302
+ "indexed": true,
303
+ "internalType": "address",
304
+ "name": "sender",
305
+ "type": "address"
306
+ }
307
+ ],
308
+ "name": "RoleRevoked",
309
+ "type": "event"
310
+ },
311
+ {
312
+ "anonymous": false,
313
+ "inputs": [
314
+ {
315
+ "indexed": false,
316
+ "internalType": "string",
317
+ "name": "id",
318
+ "type": "string"
319
+ }
320
+ ],
321
+ "name": "ScheduleCanceled",
322
+ "type": "event"
323
+ },
324
+ {
325
+ "anonymous": false,
326
+ "inputs": [
327
+ {
328
+ "indexed": false,
329
+ "internalType": "string",
330
+ "name": "id",
331
+ "type": "string"
332
+ }
333
+ ],
334
+ "name": "ScheduleRevoked",
335
+ "type": "event"
336
+ },
337
+ {
338
+ "anonymous": false,
339
+ "inputs": [
340
+ {
341
+ "indexed": false,
342
+ "internalType": "string",
343
+ "name": "id",
344
+ "type": "string"
345
+ },
346
+ {
347
+ "indexed": false,
348
+ "internalType": "address",
349
+ "name": "newBeneficiary",
350
+ "type": "address"
351
+ }
352
+ ],
353
+ "name": "TransferredBeneficiary",
354
+ "type": "event"
355
+ },
356
+ {
357
+ "inputs": [],
358
+ "name": "BENEFACTOR",
359
+ "outputs": [
360
+ {
361
+ "internalType": "bytes32",
362
+ "name": "",
363
+ "type": "bytes32"
364
+ }
365
+ ],
366
+ "stateMutability": "view",
367
+ "type": "function"
368
+ },
369
+ {
370
+ "inputs": [],
371
+ "name": "DEFAULT_ADMIN_ROLE",
372
+ "outputs": [
373
+ {
374
+ "internalType": "bytes32",
375
+ "name": "",
376
+ "type": "bytes32"
377
+ }
378
+ ],
379
+ "stateMutability": "view",
380
+ "type": "function"
381
+ },
382
+ {
383
+ "inputs": [],
384
+ "name": "FEE_SETTER_ROLE",
385
+ "outputs": [
386
+ {
387
+ "internalType": "bytes32",
388
+ "name": "",
389
+ "type": "bytes32"
390
+ }
391
+ ],
392
+ "stateMutability": "view",
393
+ "type": "function"
394
+ },
395
+ {
396
+ "inputs": [],
397
+ "name": "POST_CLAIM_HANDLER_MANAGER",
398
+ "outputs": [
399
+ {
400
+ "internalType": "bytes32",
401
+ "name": "",
402
+ "type": "bytes32"
403
+ }
404
+ ],
405
+ "stateMutability": "view",
406
+ "type": "function"
407
+ },
408
+ {
409
+ "inputs": [
410
+ {
411
+ "internalType": "bytes32",
412
+ "name": "merkleRoot",
413
+ "type": "bytes32"
414
+ }
415
+ ],
416
+ "name": "addAllocationRoot",
417
+ "outputs": [
418
+ {
419
+ "internalType": "uint256",
420
+ "name": "",
421
+ "type": "uint256"
422
+ }
423
+ ],
424
+ "stateMutability": "nonpayable",
425
+ "type": "function"
426
+ },
427
+ {
428
+ "inputs": [
429
+ {
430
+ "internalType": "contract IPostClaimHandler",
431
+ "name": "postClaimHandler",
432
+ "type": "address"
433
+ }
434
+ ],
435
+ "name": "addPostClaimHandlerToWhitelist",
436
+ "outputs": [],
437
+ "stateMutability": "nonpayable",
438
+ "type": "function"
439
+ },
440
+ {
441
+ "inputs": [
442
+ {
443
+ "internalType": "uint32",
444
+ "name": "rootIndex",
445
+ "type": "uint32"
446
+ },
447
+ {
448
+ "internalType": "bytes",
449
+ "name": "decodableArgs",
450
+ "type": "bytes"
451
+ },
452
+ {
453
+ "internalType": "bytes32[]",
454
+ "name": "proof",
455
+ "type": "bytes32[]"
456
+ }
457
+ ],
458
+ "name": "cancel",
459
+ "outputs": [],
460
+ "stateMutability": "nonpayable",
461
+ "type": "function"
462
+ },
463
+ {
464
+ "inputs": [],
465
+ "name": "claimFee",
466
+ "outputs": [
467
+ {
468
+ "internalType": "uint256",
469
+ "name": "",
470
+ "type": "uint256"
471
+ }
472
+ ],
473
+ "stateMutability": "view",
474
+ "type": "function"
475
+ },
476
+ {
477
+ "inputs": [
478
+ {
479
+ "internalType": "uint256",
480
+ "name": "amount",
481
+ "type": "uint256"
482
+ }
483
+ ],
484
+ "name": "defund",
485
+ "outputs": [],
486
+ "stateMutability": "nonpayable",
487
+ "type": "function"
488
+ },
489
+ {
490
+ "inputs": [],
491
+ "name": "feeCollector",
492
+ "outputs": [
493
+ {
494
+ "internalType": "address",
495
+ "name": "",
496
+ "type": "address"
497
+ }
498
+ ],
499
+ "stateMutability": "view",
500
+ "type": "function"
501
+ },
502
+ {
503
+ "inputs": [],
504
+ "name": "feeSetter",
505
+ "outputs": [
506
+ {
507
+ "internalType": "address",
508
+ "name": "",
509
+ "type": "address"
510
+ }
511
+ ],
512
+ "stateMutability": "view",
513
+ "type": "function"
514
+ },
515
+ {
516
+ "inputs": [
517
+ {
518
+ "internalType": "uint256",
519
+ "name": "amount",
520
+ "type": "uint256"
521
+ }
522
+ ],
523
+ "name": "fund",
524
+ "outputs": [],
525
+ "stateMutability": "nonpayable",
526
+ "type": "function"
527
+ },
528
+ {
529
+ "inputs": [
530
+ {
531
+ "internalType": "uint32",
532
+ "name": "rootIndex",
533
+ "type": "uint32"
534
+ },
535
+ {
536
+ "internalType": "bytes",
537
+ "name": "decodableArgs",
538
+ "type": "bytes"
539
+ },
540
+ {
541
+ "internalType": "bytes32[]",
542
+ "name": "proof",
543
+ "type": "bytes32[]"
544
+ }
545
+ ],
546
+ "name": "getCalendarLeafAllocationData",
547
+ "outputs": [
548
+ {
549
+ "components": [
550
+ {
551
+ "components": [
552
+ {
553
+ "internalType": "string",
554
+ "name": "id",
555
+ "type": "string"
556
+ },
557
+ {
558
+ "internalType": "address",
559
+ "name": "originalBeneficiary",
560
+ "type": "address"
561
+ },
562
+ {
563
+ "internalType": "uint256",
564
+ "name": "totalAllocation",
565
+ "type": "uint256"
566
+ },
567
+ {
568
+ "internalType": "bool",
569
+ "name": "cancelable",
570
+ "type": "bool"
571
+ },
572
+ {
573
+ "internalType": "bool",
574
+ "name": "revokable",
575
+ "type": "bool"
576
+ },
577
+ {
578
+ "internalType": "bool",
579
+ "name": "transferableByAdmin",
580
+ "type": "bool"
581
+ },
582
+ {
583
+ "internalType": "bool",
584
+ "name": "transferableByBeneficiary",
585
+ "type": "bool"
586
+ }
587
+ ],
588
+ "internalType": "struct Allocation",
589
+ "name": "allocation",
590
+ "type": "tuple"
591
+ },
592
+ {
593
+ "internalType": "string",
594
+ "name": "calendarUnlockScheduleId",
595
+ "type": "string"
596
+ },
597
+ {
598
+ "components": [
599
+ {
600
+ "internalType": "address",
601
+ "name": "withdrawalAddress",
602
+ "type": "address"
603
+ },
604
+ {
605
+ "internalType": "uint32",
606
+ "name": "terminatedTimestamp",
607
+ "type": "uint32"
608
+ },
609
+ {
610
+ "internalType": "uint256",
611
+ "name": "withdrawn",
612
+ "type": "uint256"
613
+ },
614
+ {
615
+ "internalType": "uint256",
616
+ "name": "terminatedWithdrawn",
617
+ "type": "uint256"
618
+ },
619
+ {
620
+ "internalType": "uint256",
621
+ "name": "fundedAmount",
622
+ "type": "uint256"
623
+ },
624
+ {
625
+ "internalType": "uint256",
626
+ "name": "terminatedAmount",
627
+ "type": "uint256"
628
+ }
629
+ ],
630
+ "internalType": "struct DistributionState",
631
+ "name": "distributionState",
632
+ "type": "tuple"
633
+ }
634
+ ],
635
+ "internalType": "struct CalendarAllocation",
636
+ "name": "",
637
+ "type": "tuple"
638
+ },
639
+ {
640
+ "components": [
641
+ {
642
+ "internalType": "string",
643
+ "name": "unlockScheduleId",
644
+ "type": "string"
645
+ },
646
+ {
647
+ "internalType": "uint32[]",
648
+ "name": "unlockTimestamps",
649
+ "type": "uint32[]"
650
+ },
651
+ {
652
+ "internalType": "uint256[]",
653
+ "name": "unlockAmounts",
654
+ "type": "uint256[]"
655
+ }
656
+ ],
657
+ "internalType": "struct CalendarUnlockSchedule",
658
+ "name": "",
659
+ "type": "tuple"
660
+ }
661
+ ],
662
+ "stateMutability": "view",
663
+ "type": "function"
664
+ },
665
+ {
666
+ "inputs": [
667
+ {
668
+ "internalType": "string",
669
+ "name": "allocationType",
670
+ "type": "string"
671
+ },
672
+ {
673
+ "components": [
674
+ {
675
+ "internalType": "string",
676
+ "name": "id",
677
+ "type": "string"
678
+ },
679
+ {
680
+ "internalType": "address",
681
+ "name": "originalBeneficiary",
682
+ "type": "address"
683
+ },
684
+ {
685
+ "internalType": "uint256",
686
+ "name": "totalAllocation",
687
+ "type": "uint256"
688
+ },
689
+ {
690
+ "internalType": "bool",
691
+ "name": "cancelable",
692
+ "type": "bool"
693
+ },
694
+ {
695
+ "internalType": "bool",
696
+ "name": "revokable",
697
+ "type": "bool"
698
+ },
699
+ {
700
+ "internalType": "bool",
701
+ "name": "transferableByAdmin",
702
+ "type": "bool"
703
+ },
704
+ {
705
+ "internalType": "bool",
706
+ "name": "transferableByBeneficiary",
707
+ "type": "bool"
708
+ }
709
+ ],
710
+ "internalType": "struct Allocation",
711
+ "name": "allocation",
712
+ "type": "tuple"
713
+ },
714
+ {
715
+ "components": [
716
+ {
717
+ "internalType": "string",
718
+ "name": "unlockScheduleId",
719
+ "type": "string"
720
+ },
721
+ {
722
+ "internalType": "uint32[]",
723
+ "name": "unlockTimestamps",
724
+ "type": "uint32[]"
725
+ },
726
+ {
727
+ "internalType": "uint256[]",
728
+ "name": "unlockAmounts",
729
+ "type": "uint256[]"
730
+ }
731
+ ],
732
+ "internalType": "struct CalendarUnlockSchedule",
733
+ "name": "unlockSchedule",
734
+ "type": "tuple"
735
+ }
736
+ ],
737
+ "name": "getCalendarLeafHash",
738
+ "outputs": [
739
+ {
740
+ "internalType": "bytes32",
741
+ "name": "",
742
+ "type": "bytes32"
743
+ }
744
+ ],
745
+ "stateMutability": "pure",
746
+ "type": "function"
747
+ },
748
+ {
749
+ "inputs": [
750
+ {
751
+ "internalType": "string",
752
+ "name": "allocationId",
753
+ "type": "string"
754
+ }
755
+ ],
756
+ "name": "getClaimFee",
757
+ "outputs": [
758
+ {
759
+ "internalType": "uint256",
760
+ "name": "",
761
+ "type": "uint256"
762
+ }
763
+ ],
764
+ "stateMutability": "view",
765
+ "type": "function"
766
+ },
767
+ {
768
+ "inputs": [
769
+ {
770
+ "internalType": "uint32",
771
+ "name": "rootIndex",
772
+ "type": "uint32"
773
+ },
774
+ {
775
+ "internalType": "bytes",
776
+ "name": "decodableArgs",
777
+ "type": "bytes"
778
+ },
779
+ {
780
+ "internalType": "bytes32[]",
781
+ "name": "proof",
782
+ "type": "bytes32[]"
783
+ }
784
+ ],
785
+ "name": "getIntervalLeafAllocationData",
786
+ "outputs": [
787
+ {
788
+ "components": [
789
+ {
790
+ "components": [
791
+ {
792
+ "internalType": "string",
793
+ "name": "id",
794
+ "type": "string"
795
+ },
796
+ {
797
+ "internalType": "address",
798
+ "name": "originalBeneficiary",
799
+ "type": "address"
800
+ },
801
+ {
802
+ "internalType": "uint256",
803
+ "name": "totalAllocation",
804
+ "type": "uint256"
805
+ },
806
+ {
807
+ "internalType": "bool",
808
+ "name": "cancelable",
809
+ "type": "bool"
810
+ },
811
+ {
812
+ "internalType": "bool",
813
+ "name": "revokable",
814
+ "type": "bool"
815
+ },
816
+ {
817
+ "internalType": "bool",
818
+ "name": "transferableByAdmin",
819
+ "type": "bool"
820
+ },
821
+ {
822
+ "internalType": "bool",
823
+ "name": "transferableByBeneficiary",
824
+ "type": "bool"
825
+ }
826
+ ],
827
+ "internalType": "struct Allocation",
828
+ "name": "allocation",
829
+ "type": "tuple"
830
+ },
831
+ {
832
+ "internalType": "string",
833
+ "name": "intervalUnlockScheduleId",
834
+ "type": "string"
835
+ },
836
+ {
837
+ "components": [
838
+ {
839
+ "internalType": "address",
840
+ "name": "withdrawalAddress",
841
+ "type": "address"
842
+ },
843
+ {
844
+ "internalType": "uint32",
845
+ "name": "terminatedTimestamp",
846
+ "type": "uint32"
847
+ },
848
+ {
849
+ "internalType": "uint256",
850
+ "name": "withdrawn",
851
+ "type": "uint256"
852
+ },
853
+ {
854
+ "internalType": "uint256",
855
+ "name": "terminatedWithdrawn",
856
+ "type": "uint256"
857
+ },
858
+ {
859
+ "internalType": "uint256",
860
+ "name": "fundedAmount",
861
+ "type": "uint256"
862
+ },
863
+ {
864
+ "internalType": "uint256",
865
+ "name": "terminatedAmount",
866
+ "type": "uint256"
867
+ }
868
+ ],
869
+ "internalType": "struct DistributionState",
870
+ "name": "distributionState",
871
+ "type": "tuple"
872
+ }
873
+ ],
874
+ "internalType": "struct IntervalAllocation",
875
+ "name": "",
876
+ "type": "tuple"
877
+ },
878
+ {
879
+ "components": [
880
+ {
881
+ "internalType": "string",
882
+ "name": "unlockScheduleId",
883
+ "type": "string"
884
+ },
885
+ {
886
+ "components": [
887
+ {
888
+ "internalType": "uint32",
889
+ "name": "startDate",
890
+ "type": "uint32"
891
+ },
892
+ {
893
+ "internalType": "uint32",
894
+ "name": "periodLength",
895
+ "type": "uint32"
896
+ },
897
+ {
898
+ "internalType": "uint32",
899
+ "name": "numberOfPeriods",
900
+ "type": "uint32"
901
+ },
902
+ {
903
+ "internalType": "uint256",
904
+ "name": "amount",
905
+ "type": "uint256"
906
+ }
907
+ ],
908
+ "internalType": "struct Piece[]",
909
+ "name": "pieces",
910
+ "type": "tuple[]"
911
+ }
912
+ ],
913
+ "internalType": "struct IntervalUnlockSchedule",
914
+ "name": "",
915
+ "type": "tuple"
916
+ }
917
+ ],
918
+ "stateMutability": "view",
919
+ "type": "function"
920
+ },
921
+ {
922
+ "inputs": [
923
+ {
924
+ "internalType": "string",
925
+ "name": "allocationType",
926
+ "type": "string"
927
+ },
928
+ {
929
+ "components": [
930
+ {
931
+ "internalType": "string",
932
+ "name": "id",
933
+ "type": "string"
934
+ },
935
+ {
936
+ "internalType": "address",
937
+ "name": "originalBeneficiary",
938
+ "type": "address"
939
+ },
940
+ {
941
+ "internalType": "uint256",
942
+ "name": "totalAllocation",
943
+ "type": "uint256"
944
+ },
945
+ {
946
+ "internalType": "bool",
947
+ "name": "cancelable",
948
+ "type": "bool"
949
+ },
950
+ {
951
+ "internalType": "bool",
952
+ "name": "revokable",
953
+ "type": "bool"
954
+ },
955
+ {
956
+ "internalType": "bool",
957
+ "name": "transferableByAdmin",
958
+ "type": "bool"
959
+ },
960
+ {
961
+ "internalType": "bool",
962
+ "name": "transferableByBeneficiary",
963
+ "type": "bool"
964
+ }
965
+ ],
966
+ "internalType": "struct Allocation",
967
+ "name": "allocation",
968
+ "type": "tuple"
969
+ },
970
+ {
971
+ "components": [
972
+ {
973
+ "internalType": "string",
974
+ "name": "unlockScheduleId",
975
+ "type": "string"
976
+ },
977
+ {
978
+ "components": [
979
+ {
980
+ "internalType": "uint32",
981
+ "name": "startDate",
982
+ "type": "uint32"
983
+ },
984
+ {
985
+ "internalType": "uint32",
986
+ "name": "periodLength",
987
+ "type": "uint32"
988
+ },
989
+ {
990
+ "internalType": "uint32",
991
+ "name": "numberOfPeriods",
992
+ "type": "uint32"
993
+ },
994
+ {
995
+ "internalType": "uint256",
996
+ "name": "amount",
997
+ "type": "uint256"
998
+ }
999
+ ],
1000
+ "internalType": "struct Piece[]",
1001
+ "name": "pieces",
1002
+ "type": "tuple[]"
1003
+ }
1004
+ ],
1005
+ "internalType": "struct IntervalUnlockSchedule",
1006
+ "name": "unlockSchedule",
1007
+ "type": "tuple"
1008
+ }
1009
+ ],
1010
+ "name": "getIntervalLeafHash",
1011
+ "outputs": [
1012
+ {
1013
+ "internalType": "bytes32",
1014
+ "name": "",
1015
+ "type": "bytes32"
1016
+ }
1017
+ ],
1018
+ "stateMutability": "pure",
1019
+ "type": "function"
1020
+ },
1021
+ {
1022
+ "inputs": [
1023
+ {
1024
+ "internalType": "uint32",
1025
+ "name": "rootIndex",
1026
+ "type": "uint32"
1027
+ },
1028
+ {
1029
+ "internalType": "bytes",
1030
+ "name": "decodableArgs",
1031
+ "type": "bytes"
1032
+ },
1033
+ {
1034
+ "internalType": "bytes32[]",
1035
+ "name": "proof",
1036
+ "type": "bytes32[]"
1037
+ }
1038
+ ],
1039
+ "name": "getLeafJustAllocationData",
1040
+ "outputs": [
1041
+ {
1042
+ "components": [
1043
+ {
1044
+ "internalType": "string",
1045
+ "name": "id",
1046
+ "type": "string"
1047
+ },
1048
+ {
1049
+ "internalType": "address",
1050
+ "name": "originalBeneficiary",
1051
+ "type": "address"
1052
+ },
1053
+ {
1054
+ "internalType": "uint256",
1055
+ "name": "totalAllocation",
1056
+ "type": "uint256"
1057
+ },
1058
+ {
1059
+ "internalType": "bool",
1060
+ "name": "cancelable",
1061
+ "type": "bool"
1062
+ },
1063
+ {
1064
+ "internalType": "bool",
1065
+ "name": "revokable",
1066
+ "type": "bool"
1067
+ },
1068
+ {
1069
+ "internalType": "bool",
1070
+ "name": "transferableByAdmin",
1071
+ "type": "bool"
1072
+ },
1073
+ {
1074
+ "internalType": "bool",
1075
+ "name": "transferableByBeneficiary",
1076
+ "type": "bool"
1077
+ }
1078
+ ],
1079
+ "internalType": "struct Allocation",
1080
+ "name": "",
1081
+ "type": "tuple"
1082
+ }
1083
+ ],
1084
+ "stateMutability": "view",
1085
+ "type": "function"
1086
+ },
1087
+ {
1088
+ "inputs": [],
1089
+ "name": "getPostClaimHandlers",
1090
+ "outputs": [
1091
+ {
1092
+ "internalType": "address[]",
1093
+ "name": "postClaimHandlers",
1094
+ "type": "address[]"
1095
+ }
1096
+ ],
1097
+ "stateMutability": "view",
1098
+ "type": "function"
1099
+ },
1100
+ {
1101
+ "inputs": [
1102
+ {
1103
+ "internalType": "bytes32",
1104
+ "name": "role",
1105
+ "type": "bytes32"
1106
+ }
1107
+ ],
1108
+ "name": "getRoleAdmin",
1109
+ "outputs": [
1110
+ {
1111
+ "internalType": "bytes32",
1112
+ "name": "",
1113
+ "type": "bytes32"
1114
+ }
1115
+ ],
1116
+ "stateMutability": "view",
1117
+ "type": "function"
1118
+ },
1119
+ {
1120
+ "inputs": [
1121
+ {
1122
+ "internalType": "bytes32",
1123
+ "name": "role",
1124
+ "type": "bytes32"
1125
+ },
1126
+ {
1127
+ "internalType": "address",
1128
+ "name": "account",
1129
+ "type": "address"
1130
+ }
1131
+ ],
1132
+ "name": "grantRole",
1133
+ "outputs": [],
1134
+ "stateMutability": "nonpayable",
1135
+ "type": "function"
1136
+ },
1137
+ {
1138
+ "inputs": [
1139
+ {
1140
+ "internalType": "bytes32",
1141
+ "name": "role",
1142
+ "type": "bytes32"
1143
+ },
1144
+ {
1145
+ "internalType": "address",
1146
+ "name": "account",
1147
+ "type": "address"
1148
+ }
1149
+ ],
1150
+ "name": "hasRole",
1151
+ "outputs": [
1152
+ {
1153
+ "internalType": "bool",
1154
+ "name": "",
1155
+ "type": "bool"
1156
+ }
1157
+ ],
1158
+ "stateMutability": "view",
1159
+ "type": "function"
1160
+ },
1161
+ {
1162
+ "inputs": [
1163
+ {
1164
+ "internalType": "uint256",
1165
+ "name": "",
1166
+ "type": "uint256"
1167
+ }
1168
+ ],
1169
+ "name": "merkleRoots",
1170
+ "outputs": [
1171
+ {
1172
+ "internalType": "bytes32",
1173
+ "name": "",
1174
+ "type": "bytes32"
1175
+ }
1176
+ ],
1177
+ "stateMutability": "view",
1178
+ "type": "function"
1179
+ },
1180
+ {
1181
+ "inputs": [
1182
+ {
1183
+ "internalType": "bytes[]",
1184
+ "name": "data",
1185
+ "type": "bytes[]"
1186
+ }
1187
+ ],
1188
+ "name": "multicall",
1189
+ "outputs": [
1190
+ {
1191
+ "internalType": "bytes[]",
1192
+ "name": "results",
1193
+ "type": "bytes[]"
1194
+ }
1195
+ ],
1196
+ "stateMutability": "nonpayable",
1197
+ "type": "function"
1198
+ },
1199
+ {
1200
+ "inputs": [
1201
+ {
1202
+ "internalType": "contract IPostClaimHandler",
1203
+ "name": "postClaimHandler",
1204
+ "type": "address"
1205
+ }
1206
+ ],
1207
+ "name": "removePostClaimHandlerToWhitelist",
1208
+ "outputs": [],
1209
+ "stateMutability": "nonpayable",
1210
+ "type": "function"
1211
+ },
1212
+ {
1213
+ "inputs": [
1214
+ {
1215
+ "internalType": "bytes32",
1216
+ "name": "role",
1217
+ "type": "bytes32"
1218
+ },
1219
+ {
1220
+ "internalType": "address",
1221
+ "name": "callerConfirmation",
1222
+ "type": "address"
1223
+ }
1224
+ ],
1225
+ "name": "renounceRole",
1226
+ "outputs": [],
1227
+ "stateMutability": "nonpayable",
1228
+ "type": "function"
1229
+ },
1230
+ {
1231
+ "inputs": [
1232
+ {
1233
+ "internalType": "address",
1234
+ "name": "_errantTokenAddress",
1235
+ "type": "address"
1236
+ },
1237
+ {
1238
+ "internalType": "address",
1239
+ "name": "_rescueAddress",
1240
+ "type": "address"
1241
+ }
1242
+ ],
1243
+ "name": "rescueTokens",
1244
+ "outputs": [],
1245
+ "stateMutability": "nonpayable",
1246
+ "type": "function"
1247
+ },
1248
+ {
1249
+ "inputs": [
1250
+ {
1251
+ "internalType": "uint32",
1252
+ "name": "rootIndex",
1253
+ "type": "uint32"
1254
+ },
1255
+ {
1256
+ "internalType": "bytes",
1257
+ "name": "decodableArgs",
1258
+ "type": "bytes"
1259
+ },
1260
+ {
1261
+ "internalType": "bytes32[]",
1262
+ "name": "proof",
1263
+ "type": "bytes32[]"
1264
+ }
1265
+ ],
1266
+ "name": "revoke",
1267
+ "outputs": [],
1268
+ "stateMutability": "nonpayable",
1269
+ "type": "function"
1270
+ },
1271
+ {
1272
+ "inputs": [],
1273
+ "name": "revokeAll",
1274
+ "outputs": [],
1275
+ "stateMutability": "nonpayable",
1276
+ "type": "function"
1277
+ },
1278
+ {
1279
+ "inputs": [
1280
+ {
1281
+ "internalType": "bytes32",
1282
+ "name": "role",
1283
+ "type": "bytes32"
1284
+ },
1285
+ {
1286
+ "internalType": "address",
1287
+ "name": "account",
1288
+ "type": "address"
1289
+ }
1290
+ ],
1291
+ "name": "revokeRole",
1292
+ "outputs": [],
1293
+ "stateMutability": "nonpayable",
1294
+ "type": "function"
1295
+ },
1296
+ {
1297
+ "inputs": [
1298
+ {
1299
+ "internalType": "string",
1300
+ "name": "",
1301
+ "type": "string"
1302
+ }
1303
+ ],
1304
+ "name": "schedules",
1305
+ "outputs": [
1306
+ {
1307
+ "internalType": "address",
1308
+ "name": "withdrawalAddress",
1309
+ "type": "address"
1310
+ },
1311
+ {
1312
+ "internalType": "uint32",
1313
+ "name": "terminatedTimestamp",
1314
+ "type": "uint32"
1315
+ },
1316
+ {
1317
+ "internalType": "uint256",
1318
+ "name": "withdrawn",
1319
+ "type": "uint256"
1320
+ },
1321
+ {
1322
+ "internalType": "uint256",
1323
+ "name": "terminatedWithdrawn",
1324
+ "type": "uint256"
1325
+ },
1326
+ {
1327
+ "internalType": "uint256",
1328
+ "name": "fundedAmount",
1329
+ "type": "uint256"
1330
+ },
1331
+ {
1332
+ "internalType": "uint256",
1333
+ "name": "terminatedAmount",
1334
+ "type": "uint256"
1335
+ }
1336
+ ],
1337
+ "stateMutability": "view",
1338
+ "type": "function"
1339
+ },
1340
+ {
1341
+ "inputs": [
1342
+ {
1343
+ "internalType": "uint256",
1344
+ "name": "_claimFee",
1345
+ "type": "uint256"
1346
+ }
1347
+ ],
1348
+ "name": "setClaimFee",
1349
+ "outputs": [],
1350
+ "stateMutability": "nonpayable",
1351
+ "type": "function"
1352
+ },
1353
+ {
1354
+ "inputs": [
1355
+ {
1356
+ "internalType": "bytes4",
1357
+ "name": "interfaceId",
1358
+ "type": "bytes4"
1359
+ }
1360
+ ],
1361
+ "name": "supportsInterface",
1362
+ "outputs": [
1363
+ {
1364
+ "internalType": "bool",
1365
+ "name": "",
1366
+ "type": "bool"
1367
+ }
1368
+ ],
1369
+ "stateMutability": "view",
1370
+ "type": "function"
1371
+ },
1372
+ {
1373
+ "inputs": [],
1374
+ "name": "token",
1375
+ "outputs": [
1376
+ {
1377
+ "internalType": "address",
1378
+ "name": "",
1379
+ "type": "address"
1380
+ }
1381
+ ],
1382
+ "stateMutability": "view",
1383
+ "type": "function"
1384
+ },
1385
+ {
1386
+ "inputs": [],
1387
+ "name": "totalWithdrawn",
1388
+ "outputs": [
1389
+ {
1390
+ "internalType": "uint256",
1391
+ "name": "",
1392
+ "type": "uint256"
1393
+ }
1394
+ ],
1395
+ "stateMutability": "view",
1396
+ "type": "function"
1397
+ },
1398
+ {
1399
+ "inputs": [
1400
+ {
1401
+ "internalType": "address",
1402
+ "name": "newBeneficiaryAddress",
1403
+ "type": "address"
1404
+ },
1405
+ {
1406
+ "internalType": "uint32",
1407
+ "name": "rootIndex",
1408
+ "type": "uint32"
1409
+ },
1410
+ {
1411
+ "internalType": "bytes",
1412
+ "name": "decodableArgs",
1413
+ "type": "bytes"
1414
+ },
1415
+ {
1416
+ "internalType": "bytes32[]",
1417
+ "name": "proof",
1418
+ "type": "bytes32[]"
1419
+ }
1420
+ ],
1421
+ "name": "transferBeneficiaryAddress",
1422
+ "outputs": [],
1423
+ "stateMutability": "nonpayable",
1424
+ "type": "function"
1425
+ },
1426
+ {
1427
+ "inputs": [
1428
+ {
1429
+ "internalType": "bytes32",
1430
+ "name": "merkleRoot",
1431
+ "type": "bytes32"
1432
+ },
1433
+ {
1434
+ "internalType": "bytes",
1435
+ "name": "leafArguments",
1436
+ "type": "bytes"
1437
+ },
1438
+ {
1439
+ "internalType": "bytes32[]",
1440
+ "name": "proof",
1441
+ "type": "bytes32[]"
1442
+ }
1443
+ ],
1444
+ "name": "validateLeaf",
1445
+ "outputs": [],
1446
+ "stateMutability": "pure",
1447
+ "type": "function"
1448
+ },
1449
+ {
1450
+ "inputs": [],
1451
+ "name": "version",
1452
+ "outputs": [
1453
+ {
1454
+ "internalType": "string",
1455
+ "name": "",
1456
+ "type": "string"
1457
+ }
1458
+ ],
1459
+ "stateMutability": "view",
1460
+ "type": "function"
1461
+ },
1462
+ {
1463
+ "inputs": [
1464
+ {
1465
+ "internalType": "uint256",
1466
+ "name": "withdrawalAmount",
1467
+ "type": "uint256"
1468
+ },
1469
+ {
1470
+ "internalType": "uint32",
1471
+ "name": "rootIndex",
1472
+ "type": "uint32"
1473
+ },
1474
+ {
1475
+ "internalType": "bytes",
1476
+ "name": "decodableArgs",
1477
+ "type": "bytes"
1478
+ },
1479
+ {
1480
+ "internalType": "bytes32[]",
1481
+ "name": "proof",
1482
+ "type": "bytes32[]"
1483
+ },
1484
+ {
1485
+ "internalType": "contract IPostClaimHandler",
1486
+ "name": "postClaimHandler",
1487
+ "type": "address"
1488
+ },
1489
+ {
1490
+ "internalType": "bytes",
1491
+ "name": "extraData",
1492
+ "type": "bytes"
1493
+ }
1494
+ ],
1495
+ "name": "withdraw",
1496
+ "outputs": [],
1497
+ "stateMutability": "payable",
1498
+ "type": "function"
1499
+ },
1500
+ {
1501
+ "inputs": [
1502
+ {
1503
+ "internalType": "uint256",
1504
+ "name": "withdrawalAmount",
1505
+ "type": "uint256"
1506
+ },
1507
+ {
1508
+ "internalType": "uint32",
1509
+ "name": "rootIndex",
1510
+ "type": "uint32"
1511
+ },
1512
+ {
1513
+ "internalType": "bytes",
1514
+ "name": "decodableArgs",
1515
+ "type": "bytes"
1516
+ },
1517
+ {
1518
+ "internalType": "bytes32[]",
1519
+ "name": "proof",
1520
+ "type": "bytes32[]"
1521
+ }
1522
+ ],
1523
+ "name": "withdraw",
1524
+ "outputs": [],
1525
+ "stateMutability": "payable",
1526
+ "type": "function"
1527
+ }
1528
+ ];
1529
+ /**
1530
+ * MerkleVester_json Contract Class
1531
+ *
1532
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1533
+ *
1534
+ * @example
1535
+ * ```typescript
1536
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1537
+ * import { mainnet } from 'viem/chains';
1538
+ * import { MerkleVester_json } from 'MerkleVester_json';
1539
+ *
1540
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1541
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1542
+ *
1543
+ * const contract = new MerkleVester_json('0x...', { publicClient, walletClient });
1544
+ *
1545
+ * // Read functions
1546
+ * const result = await contract.balanceOf('0x...');
1547
+ *
1548
+ * // Write functions
1549
+ * const hash = await contract.transfer('0x...', 1000n);
1550
+ *
1551
+ * // Simulate transactions (dry-run)
1552
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1553
+ * console.log('Gas estimate:', simulation.request.gas);
1554
+ *
1555
+ * // Watch events
1556
+ * const unwatch = contract.watch.Transfer((event) => {
1557
+ * console.log('Transfer event:', event);
1558
+ * });
1559
+ * ```
1560
+ */
1561
+ class MerkleVester_json {
1562
+ constructor(address, clients) {
1563
+ this.contractAddress = address;
1564
+ this.publicClient = clients.publicClient;
1565
+ this.contract = (0, viem_1.getContract)({
1566
+ address,
1567
+ abi: exports.MerkleVester_jsonAbi,
1568
+ client: {
1569
+ public: clients.publicClient,
1570
+ wallet: clients.walletClient,
1571
+ },
1572
+ });
1573
+ }
1574
+ /**
1575
+ * Get the contract address
1576
+ */
1577
+ get address() {
1578
+ return this.contractAddress;
1579
+ }
1580
+ /**
1581
+ * Get the underlying viem contract instance
1582
+ */
1583
+ getContract() {
1584
+ return this.contract;
1585
+ }
1586
+ /**
1587
+ * BENEFACTOR
1588
+ * view
1589
+ */
1590
+ async BENEFACTOR() {
1591
+ return this.contract.read.BENEFACTOR();
1592
+ }
1593
+ /**
1594
+ * DEFAULT_ADMIN_ROLE
1595
+ * view
1596
+ */
1597
+ async DEFAULT_ADMIN_ROLE() {
1598
+ return this.contract.read.DEFAULT_ADMIN_ROLE();
1599
+ }
1600
+ /**
1601
+ * FEE_SETTER_ROLE
1602
+ * view
1603
+ */
1604
+ async FEE_SETTER_ROLE() {
1605
+ return this.contract.read.FEE_SETTER_ROLE();
1606
+ }
1607
+ /**
1608
+ * POST_CLAIM_HANDLER_MANAGER
1609
+ * view
1610
+ */
1611
+ async POST_CLAIM_HANDLER_MANAGER() {
1612
+ return this.contract.read.POST_CLAIM_HANDLER_MANAGER();
1613
+ }
1614
+ /**
1615
+ * claimFee
1616
+ * view
1617
+ */
1618
+ async claimFee() {
1619
+ return this.contract.read.claimFee();
1620
+ }
1621
+ /**
1622
+ * feeCollector
1623
+ * view
1624
+ */
1625
+ async feeCollector() {
1626
+ return this.contract.read.feeCollector();
1627
+ }
1628
+ /**
1629
+ * feeSetter
1630
+ * view
1631
+ */
1632
+ async feeSetter() {
1633
+ return this.contract.read.feeSetter();
1634
+ }
1635
+ /**
1636
+ * getCalendarLeafAllocationData
1637
+ * view
1638
+ */
1639
+ async getCalendarLeafAllocationData(rootIndex, decodableArgs, proof) {
1640
+ return this.contract.read.getCalendarLeafAllocationData([rootIndex, decodableArgs, proof]);
1641
+ }
1642
+ /**
1643
+ * getCalendarLeafHash
1644
+ * pure
1645
+ */
1646
+ async getCalendarLeafHash(allocationType, allocation, unlockSchedule) {
1647
+ return this.contract.read.getCalendarLeafHash([allocationType, allocation, unlockSchedule]);
1648
+ }
1649
+ /**
1650
+ * getClaimFee
1651
+ * view
1652
+ */
1653
+ async getClaimFee(allocationId) {
1654
+ return this.contract.read.getClaimFee([allocationId]);
1655
+ }
1656
+ /**
1657
+ * getIntervalLeafAllocationData
1658
+ * view
1659
+ */
1660
+ async getIntervalLeafAllocationData(rootIndex, decodableArgs, proof) {
1661
+ return this.contract.read.getIntervalLeafAllocationData([rootIndex, decodableArgs, proof]);
1662
+ }
1663
+ /**
1664
+ * getIntervalLeafHash
1665
+ * pure
1666
+ */
1667
+ async getIntervalLeafHash(allocationType, allocation, unlockSchedule) {
1668
+ return this.contract.read.getIntervalLeafHash([allocationType, allocation, unlockSchedule]);
1669
+ }
1670
+ /**
1671
+ * getLeafJustAllocationData
1672
+ * view
1673
+ */
1674
+ async getLeafJustAllocationData(rootIndex, decodableArgs, proof) {
1675
+ return this.contract.read.getLeafJustAllocationData([rootIndex, decodableArgs, proof]);
1676
+ }
1677
+ /**
1678
+ * getPostClaimHandlers
1679
+ * view
1680
+ */
1681
+ async getPostClaimHandlers() {
1682
+ return this.contract.read.getPostClaimHandlers();
1683
+ }
1684
+ /**
1685
+ * getRoleAdmin
1686
+ * view
1687
+ */
1688
+ async getRoleAdmin(role) {
1689
+ return this.contract.read.getRoleAdmin([role]);
1690
+ }
1691
+ /**
1692
+ * hasRole
1693
+ * view
1694
+ */
1695
+ async hasRole(role, account) {
1696
+ return this.contract.read.hasRole([role, account]);
1697
+ }
1698
+ /**
1699
+ * merkleRoots
1700
+ * view
1701
+ */
1702
+ async merkleRoots(arg0) {
1703
+ return this.contract.read.merkleRoots([arg0]);
1704
+ }
1705
+ /**
1706
+ * schedules
1707
+ * view
1708
+ */
1709
+ async schedules(arg0) {
1710
+ return this.contract.read.schedules([arg0]);
1711
+ }
1712
+ /**
1713
+ * supportsInterface
1714
+ * view
1715
+ */
1716
+ async supportsInterface(interfaceId) {
1717
+ return this.contract.read.supportsInterface([interfaceId]);
1718
+ }
1719
+ /**
1720
+ * token
1721
+ * view
1722
+ */
1723
+ async token() {
1724
+ return this.contract.read.token();
1725
+ }
1726
+ /**
1727
+ * totalWithdrawn
1728
+ * view
1729
+ */
1730
+ async totalWithdrawn() {
1731
+ return this.contract.read.totalWithdrawn();
1732
+ }
1733
+ /**
1734
+ * validateLeaf
1735
+ * pure
1736
+ */
1737
+ async validateLeaf(merkleRoot, leafArguments, proof) {
1738
+ return this.contract.read.validateLeaf([merkleRoot, leafArguments, proof]);
1739
+ }
1740
+ /**
1741
+ * version
1742
+ * view
1743
+ */
1744
+ async version() {
1745
+ return this.contract.read.version();
1746
+ }
1747
+ /**
1748
+ * addAllocationRoot
1749
+ * nonpayable
1750
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1751
+ */
1752
+ async addAllocationRoot(merkleRoot, options) {
1753
+ if (!this.contract.write) {
1754
+ throw new Error('Wallet client is required for write operations');
1755
+ }
1756
+ return this.contract.write.addAllocationRoot([merkleRoot], options);
1757
+ }
1758
+ /**
1759
+ * addPostClaimHandlerToWhitelist
1760
+ * nonpayable
1761
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1762
+ */
1763
+ async addPostClaimHandlerToWhitelist(postClaimHandler, options) {
1764
+ if (!this.contract.write) {
1765
+ throw new Error('Wallet client is required for write operations');
1766
+ }
1767
+ return this.contract.write.addPostClaimHandlerToWhitelist([postClaimHandler], options);
1768
+ }
1769
+ /**
1770
+ * cancel
1771
+ * nonpayable
1772
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1773
+ */
1774
+ async cancel(rootIndex, decodableArgs, proof, options) {
1775
+ if (!this.contract.write) {
1776
+ throw new Error('Wallet client is required for write operations');
1777
+ }
1778
+ return this.contract.write.cancel([rootIndex, decodableArgs, proof], options);
1779
+ }
1780
+ /**
1781
+ * defund
1782
+ * nonpayable
1783
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1784
+ */
1785
+ async defund(amount, options) {
1786
+ if (!this.contract.write) {
1787
+ throw new Error('Wallet client is required for write operations');
1788
+ }
1789
+ return this.contract.write.defund([amount], options);
1790
+ }
1791
+ /**
1792
+ * fund
1793
+ * nonpayable
1794
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1795
+ */
1796
+ async fund(amount, options) {
1797
+ if (!this.contract.write) {
1798
+ throw new Error('Wallet client is required for write operations');
1799
+ }
1800
+ return this.contract.write.fund([amount], options);
1801
+ }
1802
+ /**
1803
+ * grantRole
1804
+ * nonpayable
1805
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1806
+ */
1807
+ async grantRole(role, account, options) {
1808
+ if (!this.contract.write) {
1809
+ throw new Error('Wallet client is required for write operations');
1810
+ }
1811
+ return this.contract.write.grantRole([role, account], options);
1812
+ }
1813
+ /**
1814
+ * multicall
1815
+ * nonpayable
1816
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1817
+ */
1818
+ async multicall(data, options) {
1819
+ if (!this.contract.write) {
1820
+ throw new Error('Wallet client is required for write operations');
1821
+ }
1822
+ return this.contract.write.multicall([data], options);
1823
+ }
1824
+ /**
1825
+ * removePostClaimHandlerToWhitelist
1826
+ * nonpayable
1827
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1828
+ */
1829
+ async removePostClaimHandlerToWhitelist(postClaimHandler, options) {
1830
+ if (!this.contract.write) {
1831
+ throw new Error('Wallet client is required for write operations');
1832
+ }
1833
+ return this.contract.write.removePostClaimHandlerToWhitelist([postClaimHandler], options);
1834
+ }
1835
+ /**
1836
+ * renounceRole
1837
+ * nonpayable
1838
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1839
+ */
1840
+ async renounceRole(role, callerConfirmation, options) {
1841
+ if (!this.contract.write) {
1842
+ throw new Error('Wallet client is required for write operations');
1843
+ }
1844
+ return this.contract.write.renounceRole([role, callerConfirmation], options);
1845
+ }
1846
+ /**
1847
+ * rescueTokens
1848
+ * nonpayable
1849
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1850
+ */
1851
+ async rescueTokens(_errantTokenAddress, _rescueAddress, options) {
1852
+ if (!this.contract.write) {
1853
+ throw new Error('Wallet client is required for write operations');
1854
+ }
1855
+ return this.contract.write.rescueTokens([_errantTokenAddress, _rescueAddress], options);
1856
+ }
1857
+ /**
1858
+ * revoke
1859
+ * nonpayable
1860
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1861
+ */
1862
+ async revoke(rootIndex, decodableArgs, proof, options) {
1863
+ if (!this.contract.write) {
1864
+ throw new Error('Wallet client is required for write operations');
1865
+ }
1866
+ return this.contract.write.revoke([rootIndex, decodableArgs, proof], options);
1867
+ }
1868
+ /**
1869
+ * revokeAll
1870
+ * nonpayable
1871
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1872
+ */
1873
+ async revokeAll(options) {
1874
+ if (!this.contract.write) {
1875
+ throw new Error('Wallet client is required for write operations');
1876
+ }
1877
+ return this.contract.write.revokeAll(options);
1878
+ }
1879
+ /**
1880
+ * revokeRole
1881
+ * nonpayable
1882
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1883
+ */
1884
+ async revokeRole(role, account, options) {
1885
+ if (!this.contract.write) {
1886
+ throw new Error('Wallet client is required for write operations');
1887
+ }
1888
+ return this.contract.write.revokeRole([role, account], options);
1889
+ }
1890
+ /**
1891
+ * setClaimFee
1892
+ * nonpayable
1893
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1894
+ */
1895
+ async setClaimFee(_claimFee, options) {
1896
+ if (!this.contract.write) {
1897
+ throw new Error('Wallet client is required for write operations');
1898
+ }
1899
+ return this.contract.write.setClaimFee([_claimFee], options);
1900
+ }
1901
+ /**
1902
+ * transferBeneficiaryAddress
1903
+ * nonpayable
1904
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1905
+ */
1906
+ async transferBeneficiaryAddress(newBeneficiaryAddress, rootIndex, decodableArgs, proof, options) {
1907
+ if (!this.contract.write) {
1908
+ throw new Error('Wallet client is required for write operations');
1909
+ }
1910
+ return this.contract.write.transferBeneficiaryAddress([newBeneficiaryAddress, rootIndex, decodableArgs, proof], options);
1911
+ }
1912
+ async withdraw(...args) {
1913
+ if (!this.contract.write) {
1914
+ throw new Error('Wallet client is required for write operations');
1915
+ }
1916
+ return this.contract.write.withdraw(args);
1917
+ }
1918
+ /**
1919
+ * Simulate contract write operations (dry-run without sending transaction)
1920
+ *
1921
+ * @example
1922
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1923
+ * console.log('Gas estimate:', result.request.gas);
1924
+ * console.log('Would succeed:', result.result);
1925
+ */
1926
+ get simulate() {
1927
+ const contract = this.contract;
1928
+ if (!contract.simulate) {
1929
+ throw new Error('Public client is required for simulation');
1930
+ }
1931
+ return {
1932
+ /**
1933
+ * Simulate addAllocationRoot
1934
+ * Returns gas estimate and result without sending transaction
1935
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1936
+ */
1937
+ async addAllocationRoot(merkleRoot, options) {
1938
+ return contract.simulate.addAllocationRoot([merkleRoot], options);
1939
+ },
1940
+ /**
1941
+ * Simulate addPostClaimHandlerToWhitelist
1942
+ * Returns gas estimate and result without sending transaction
1943
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1944
+ */
1945
+ async addPostClaimHandlerToWhitelist(postClaimHandler, options) {
1946
+ return contract.simulate.addPostClaimHandlerToWhitelist([postClaimHandler], options);
1947
+ },
1948
+ /**
1949
+ * Simulate cancel
1950
+ * Returns gas estimate and result without sending transaction
1951
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1952
+ */
1953
+ async cancel(rootIndex, decodableArgs, proof, options) {
1954
+ return contract.simulate.cancel([rootIndex, decodableArgs, proof], options);
1955
+ },
1956
+ /**
1957
+ * Simulate defund
1958
+ * Returns gas estimate and result without sending transaction
1959
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1960
+ */
1961
+ async defund(amount, options) {
1962
+ return contract.simulate.defund([amount], options);
1963
+ },
1964
+ /**
1965
+ * Simulate fund
1966
+ * Returns gas estimate and result without sending transaction
1967
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1968
+ */
1969
+ async fund(amount, options) {
1970
+ return contract.simulate.fund([amount], options);
1971
+ },
1972
+ /**
1973
+ * Simulate grantRole
1974
+ * Returns gas estimate and result without sending transaction
1975
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1976
+ */
1977
+ async grantRole(role, account, options) {
1978
+ return contract.simulate.grantRole([role, account], options);
1979
+ },
1980
+ /**
1981
+ * Simulate multicall
1982
+ * Returns gas estimate and result without sending transaction
1983
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1984
+ */
1985
+ async multicall(data, options) {
1986
+ return contract.simulate.multicall([data], options);
1987
+ },
1988
+ /**
1989
+ * Simulate removePostClaimHandlerToWhitelist
1990
+ * Returns gas estimate and result without sending transaction
1991
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1992
+ */
1993
+ async removePostClaimHandlerToWhitelist(postClaimHandler, options) {
1994
+ return contract.simulate.removePostClaimHandlerToWhitelist([postClaimHandler], options);
1995
+ },
1996
+ /**
1997
+ * Simulate renounceRole
1998
+ * Returns gas estimate and result without sending transaction
1999
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2000
+ */
2001
+ async renounceRole(role, callerConfirmation, options) {
2002
+ return contract.simulate.renounceRole([role, callerConfirmation], options);
2003
+ },
2004
+ /**
2005
+ * Simulate rescueTokens
2006
+ * Returns gas estimate and result without sending transaction
2007
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2008
+ */
2009
+ async rescueTokens(_errantTokenAddress, _rescueAddress, options) {
2010
+ return contract.simulate.rescueTokens([_errantTokenAddress, _rescueAddress], options);
2011
+ },
2012
+ /**
2013
+ * Simulate revoke
2014
+ * Returns gas estimate and result without sending transaction
2015
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2016
+ */
2017
+ async revoke(rootIndex, decodableArgs, proof, options) {
2018
+ return contract.simulate.revoke([rootIndex, decodableArgs, proof], options);
2019
+ },
2020
+ /**
2021
+ * Simulate revokeAll
2022
+ * Returns gas estimate and result without sending transaction
2023
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2024
+ */
2025
+ async revokeAll(options) {
2026
+ return contract.simulate.revokeAll(options);
2027
+ },
2028
+ /**
2029
+ * Simulate revokeRole
2030
+ * Returns gas estimate and result without sending transaction
2031
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2032
+ */
2033
+ async revokeRole(role, account, options) {
2034
+ return contract.simulate.revokeRole([role, account], options);
2035
+ },
2036
+ /**
2037
+ * Simulate setClaimFee
2038
+ * Returns gas estimate and result without sending transaction
2039
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2040
+ */
2041
+ async setClaimFee(_claimFee, options) {
2042
+ return contract.simulate.setClaimFee([_claimFee], options);
2043
+ },
2044
+ /**
2045
+ * Simulate transferBeneficiaryAddress
2046
+ * Returns gas estimate and result without sending transaction
2047
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2048
+ */
2049
+ async transferBeneficiaryAddress(newBeneficiaryAddress, rootIndex, decodableArgs, proof, options) {
2050
+ return contract.simulate.transferBeneficiaryAddress([newBeneficiaryAddress, rootIndex, decodableArgs, proof], options);
2051
+ },
2052
+ /**
2053
+ * Simulate withdraw
2054
+ * Returns gas estimate and result without sending transaction
2055
+ * Supports multiple overloads: (uint256, uint32, bytes, bytes32[], address, bytes), (uint256, uint32, bytes, bytes32[])
2056
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2057
+ */
2058
+ async withdraw(...args) {
2059
+ return contract.simulate.withdraw(args);
2060
+ }
2061
+ };
2062
+ }
2063
+ /**
2064
+ * Watch contract events
2065
+ *
2066
+ * @example
2067
+ * // Watch all Transfer events
2068
+ * const unwatch = contract.watch.Transfer((event) => {
2069
+ * console.log('Transfer:', event);
2070
+ * });
2071
+ *
2072
+ * // Stop watching
2073
+ * unwatch();
2074
+ */
2075
+ get watch() {
2076
+ return {
2077
+ /**
2078
+ * Watch RoleAdminChanged events
2079
+ * @param callback Function to call when event is emitted
2080
+ * @param filter Optional filter for indexed parameters
2081
+ * @returns Unwatch function to stop listening
2082
+ */
2083
+ RoleAdminChanged: (callback, filter) => {
2084
+ return this.publicClient.watchContractEvent({
2085
+ address: this.contractAddress,
2086
+ abi: exports.MerkleVester_jsonAbi,
2087
+ eventName: 'RoleAdminChanged',
2088
+ args: filter,
2089
+ onLogs: (logs) => {
2090
+ logs.forEach((log) => {
2091
+ callback(log.args);
2092
+ });
2093
+ },
2094
+ });
2095
+ },
2096
+ /**
2097
+ * Watch RoleGranted events
2098
+ * @param callback Function to call when event is emitted
2099
+ * @param filter Optional filter for indexed parameters
2100
+ * @returns Unwatch function to stop listening
2101
+ */
2102
+ RoleGranted: (callback, filter) => {
2103
+ return this.publicClient.watchContractEvent({
2104
+ address: this.contractAddress,
2105
+ abi: exports.MerkleVester_jsonAbi,
2106
+ eventName: 'RoleGranted',
2107
+ args: filter,
2108
+ onLogs: (logs) => {
2109
+ logs.forEach((log) => {
2110
+ callback(log.args);
2111
+ });
2112
+ },
2113
+ });
2114
+ },
2115
+ /**
2116
+ * Watch RoleRevoked events
2117
+ * @param callback Function to call when event is emitted
2118
+ * @param filter Optional filter for indexed parameters
2119
+ * @returns Unwatch function to stop listening
2120
+ */
2121
+ RoleRevoked: (callback, filter) => {
2122
+ return this.publicClient.watchContractEvent({
2123
+ address: this.contractAddress,
2124
+ abi: exports.MerkleVester_jsonAbi,
2125
+ eventName: 'RoleRevoked',
2126
+ args: filter,
2127
+ onLogs: (logs) => {
2128
+ logs.forEach((log) => {
2129
+ callback(log.args);
2130
+ });
2131
+ },
2132
+ });
2133
+ },
2134
+ /**
2135
+ * Watch ScheduleCanceled events
2136
+ * @param callback Function to call when event is emitted
2137
+ * @param filter Optional filter for indexed parameters
2138
+ * @returns Unwatch function to stop listening
2139
+ */
2140
+ ScheduleCanceled: (callback) => {
2141
+ return this.publicClient.watchContractEvent({
2142
+ address: this.contractAddress,
2143
+ abi: exports.MerkleVester_jsonAbi,
2144
+ eventName: 'ScheduleCanceled',
2145
+ onLogs: (logs) => {
2146
+ logs.forEach((log) => {
2147
+ callback(log.args);
2148
+ });
2149
+ },
2150
+ });
2151
+ },
2152
+ /**
2153
+ * Watch ScheduleRevoked events
2154
+ * @param callback Function to call when event is emitted
2155
+ * @param filter Optional filter for indexed parameters
2156
+ * @returns Unwatch function to stop listening
2157
+ */
2158
+ ScheduleRevoked: (callback) => {
2159
+ return this.publicClient.watchContractEvent({
2160
+ address: this.contractAddress,
2161
+ abi: exports.MerkleVester_jsonAbi,
2162
+ eventName: 'ScheduleRevoked',
2163
+ onLogs: (logs) => {
2164
+ logs.forEach((log) => {
2165
+ callback(log.args);
2166
+ });
2167
+ },
2168
+ });
2169
+ },
2170
+ /**
2171
+ * Watch TransferredBeneficiary events
2172
+ * @param callback Function to call when event is emitted
2173
+ * @param filter Optional filter for indexed parameters
2174
+ * @returns Unwatch function to stop listening
2175
+ */
2176
+ TransferredBeneficiary: (callback) => {
2177
+ return this.publicClient.watchContractEvent({
2178
+ address: this.contractAddress,
2179
+ abi: exports.MerkleVester_jsonAbi,
2180
+ eventName: 'TransferredBeneficiary',
2181
+ onLogs: (logs) => {
2182
+ logs.forEach((log) => {
2183
+ callback(log.args);
2184
+ });
2185
+ },
2186
+ });
2187
+ }
2188
+ };
2189
+ }
2190
+ }
2191
+ exports.MerkleVester_json = MerkleVester_json;