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