@gitmyabi/distributioncreator 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3810 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * CampaignParameters struct type
7
+ */
8
+ export type CampaignParameters = {
9
+ campaignId: `0x${string}`;
10
+ creator: `0x${string}`;
11
+ rewardToken: `0x${string}`;
12
+ amount: bigint;
13
+ campaignType: bigint;
14
+ startTimestamp: bigint;
15
+ duration: bigint;
16
+ campaignData: `0x${string}`;
17
+ };
18
+
19
+ /**
20
+ * RewardTokenAmounts struct type
21
+ */
22
+ export type RewardTokenAmounts = {
23
+ token: `0x${string}`;
24
+ minimumAmountPerEpoch: bigint;
25
+ };
26
+ /**
27
+ * DistributionCreator ABI
28
+ *
29
+ * This ABI is typed using viem's type system for full type safety.
30
+ */
31
+ export const DistributionCreatorAbi = [
32
+ {
33
+ "inputs": [],
34
+ "stateMutability": "nonpayable",
35
+ "type": "constructor"
36
+ },
37
+ {
38
+ "inputs": [],
39
+ "name": "CampaignAlreadyExists",
40
+ "type": "error"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "CampaignDoesNotExist",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "inputs": [],
49
+ "name": "CampaignDurationNull",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "inputs": [],
54
+ "name": "CampaignRewardTokenNotWhitelisted",
55
+ "type": "error"
56
+ },
57
+ {
58
+ "inputs": [],
59
+ "name": "CampaignRewardTooLow",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "InvalidLengths",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [],
69
+ "name": "InvalidOverride",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [],
74
+ "name": "InvalidParam",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "InvalidReallocation",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [],
84
+ "name": "NotAllowed",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [],
89
+ "name": "NotGovernor",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [],
94
+ "name": "NotGovernorOrGuardian",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "NotSigned",
100
+ "type": "error"
101
+ },
102
+ {
103
+ "inputs": [],
104
+ "name": "OperatorNotAllowed",
105
+ "type": "error"
106
+ },
107
+ {
108
+ "inputs": [],
109
+ "name": "ZeroAddress",
110
+ "type": "error"
111
+ },
112
+ {
113
+ "anonymous": false,
114
+ "inputs": [
115
+ {
116
+ "indexed": false,
117
+ "internalType": "address",
118
+ "name": "previousAdmin",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "indexed": false,
123
+ "internalType": "address",
124
+ "name": "newAdmin",
125
+ "type": "address"
126
+ }
127
+ ],
128
+ "name": "AdminChanged",
129
+ "type": "event"
130
+ },
131
+ {
132
+ "anonymous": false,
133
+ "inputs": [
134
+ {
135
+ "indexed": true,
136
+ "internalType": "address",
137
+ "name": "beacon",
138
+ "type": "address"
139
+ }
140
+ ],
141
+ "name": "BeaconUpgraded",
142
+ "type": "event"
143
+ },
144
+ {
145
+ "anonymous": false,
146
+ "inputs": [
147
+ {
148
+ "indexed": true,
149
+ "internalType": "address",
150
+ "name": "user",
151
+ "type": "address"
152
+ },
153
+ {
154
+ "indexed": true,
155
+ "internalType": "address",
156
+ "name": "operator",
157
+ "type": "address"
158
+ },
159
+ {
160
+ "indexed": false,
161
+ "internalType": "bool",
162
+ "name": "isWhitelisted",
163
+ "type": "bool"
164
+ }
165
+ ],
166
+ "name": "CampaignOperatorToggled",
167
+ "type": "event"
168
+ },
169
+ {
170
+ "anonymous": false,
171
+ "inputs": [
172
+ {
173
+ "indexed": false,
174
+ "internalType": "bytes32",
175
+ "name": "_campaignId",
176
+ "type": "bytes32"
177
+ },
178
+ {
179
+ "components": [
180
+ {
181
+ "internalType": "bytes32",
182
+ "name": "campaignId",
183
+ "type": "bytes32"
184
+ },
185
+ {
186
+ "internalType": "address",
187
+ "name": "creator",
188
+ "type": "address"
189
+ },
190
+ {
191
+ "internalType": "address",
192
+ "name": "rewardToken",
193
+ "type": "address"
194
+ },
195
+ {
196
+ "internalType": "uint256",
197
+ "name": "amount",
198
+ "type": "uint256"
199
+ },
200
+ {
201
+ "internalType": "uint32",
202
+ "name": "campaignType",
203
+ "type": "uint32"
204
+ },
205
+ {
206
+ "internalType": "uint32",
207
+ "name": "startTimestamp",
208
+ "type": "uint32"
209
+ },
210
+ {
211
+ "internalType": "uint32",
212
+ "name": "duration",
213
+ "type": "uint32"
214
+ },
215
+ {
216
+ "internalType": "bytes",
217
+ "name": "campaignData",
218
+ "type": "bytes"
219
+ }
220
+ ],
221
+ "indexed": false,
222
+ "internalType": "struct CampaignParameters",
223
+ "name": "campaign",
224
+ "type": "tuple"
225
+ }
226
+ ],
227
+ "name": "CampaignOverride",
228
+ "type": "event"
229
+ },
230
+ {
231
+ "anonymous": false,
232
+ "inputs": [
233
+ {
234
+ "indexed": false,
235
+ "internalType": "bytes32",
236
+ "name": "_campaignId",
237
+ "type": "bytes32"
238
+ },
239
+ {
240
+ "indexed": false,
241
+ "internalType": "address[]",
242
+ "name": "from",
243
+ "type": "address[]"
244
+ },
245
+ {
246
+ "indexed": true,
247
+ "internalType": "address",
248
+ "name": "to",
249
+ "type": "address"
250
+ }
251
+ ],
252
+ "name": "CampaignReallocation",
253
+ "type": "event"
254
+ },
255
+ {
256
+ "anonymous": false,
257
+ "inputs": [
258
+ {
259
+ "indexed": false,
260
+ "internalType": "uint32",
261
+ "name": "campaignType",
262
+ "type": "uint32"
263
+ },
264
+ {
265
+ "indexed": false,
266
+ "internalType": "uint256",
267
+ "name": "_fees",
268
+ "type": "uint256"
269
+ }
270
+ ],
271
+ "name": "CampaignSpecificFeesSet",
272
+ "type": "event"
273
+ },
274
+ {
275
+ "anonymous": false,
276
+ "inputs": [
277
+ {
278
+ "indexed": true,
279
+ "internalType": "address",
280
+ "name": "user",
281
+ "type": "address"
282
+ },
283
+ {
284
+ "indexed": false,
285
+ "internalType": "bytes32",
286
+ "name": "conditionsHash",
287
+ "type": "bytes32"
288
+ }
289
+ ],
290
+ "name": "ConditionsAccepted",
291
+ "type": "event"
292
+ },
293
+ {
294
+ "anonymous": false,
295
+ "inputs": [
296
+ {
297
+ "indexed": true,
298
+ "internalType": "address",
299
+ "name": "user",
300
+ "type": "address"
301
+ },
302
+ {
303
+ "indexed": true,
304
+ "internalType": "address",
305
+ "name": "operator",
306
+ "type": "address"
307
+ },
308
+ {
309
+ "indexed": true,
310
+ "internalType": "address",
311
+ "name": "token",
312
+ "type": "address"
313
+ },
314
+ {
315
+ "indexed": false,
316
+ "internalType": "uint256",
317
+ "name": "amount",
318
+ "type": "uint256"
319
+ }
320
+ ],
321
+ "name": "CreatorAllowanceUpdated",
322
+ "type": "event"
323
+ },
324
+ {
325
+ "anonymous": false,
326
+ "inputs": [
327
+ {
328
+ "indexed": true,
329
+ "internalType": "address",
330
+ "name": "user",
331
+ "type": "address"
332
+ },
333
+ {
334
+ "indexed": true,
335
+ "internalType": "address",
336
+ "name": "token",
337
+ "type": "address"
338
+ },
339
+ {
340
+ "indexed": false,
341
+ "internalType": "uint256",
342
+ "name": "amount",
343
+ "type": "uint256"
344
+ }
345
+ ],
346
+ "name": "CreatorBalanceUpdated",
347
+ "type": "event"
348
+ },
349
+ {
350
+ "anonymous": false,
351
+ "inputs": [
352
+ {
353
+ "indexed": true,
354
+ "internalType": "address",
355
+ "name": "_distributor",
356
+ "type": "address"
357
+ }
358
+ ],
359
+ "name": "DistributorUpdated",
360
+ "type": "event"
361
+ },
362
+ {
363
+ "anonymous": false,
364
+ "inputs": [
365
+ {
366
+ "indexed": true,
367
+ "internalType": "address",
368
+ "name": "user",
369
+ "type": "address"
370
+ },
371
+ {
372
+ "indexed": false,
373
+ "internalType": "uint256",
374
+ "name": "userFeeRebate",
375
+ "type": "uint256"
376
+ }
377
+ ],
378
+ "name": "FeeRebateUpdated",
379
+ "type": "event"
380
+ },
381
+ {
382
+ "anonymous": false,
383
+ "inputs": [
384
+ {
385
+ "indexed": true,
386
+ "internalType": "address",
387
+ "name": "_feeRecipient",
388
+ "type": "address"
389
+ }
390
+ ],
391
+ "name": "FeeRecipientUpdated",
392
+ "type": "event"
393
+ },
394
+ {
395
+ "anonymous": false,
396
+ "inputs": [
397
+ {
398
+ "indexed": false,
399
+ "internalType": "uint256",
400
+ "name": "_fees",
401
+ "type": "uint256"
402
+ }
403
+ ],
404
+ "name": "FeesSet",
405
+ "type": "event"
406
+ },
407
+ {
408
+ "anonymous": false,
409
+ "inputs": [
410
+ {
411
+ "indexed": false,
412
+ "internalType": "uint8",
413
+ "name": "version",
414
+ "type": "uint8"
415
+ }
416
+ ],
417
+ "name": "Initialized",
418
+ "type": "event"
419
+ },
420
+ {
421
+ "anonymous": false,
422
+ "inputs": [
423
+ {
424
+ "indexed": false,
425
+ "internalType": "bytes32",
426
+ "name": "_messageHash",
427
+ "type": "bytes32"
428
+ }
429
+ ],
430
+ "name": "MessageUpdated",
431
+ "type": "event"
432
+ },
433
+ {
434
+ "anonymous": false,
435
+ "inputs": [
436
+ {
437
+ "components": [
438
+ {
439
+ "internalType": "bytes32",
440
+ "name": "campaignId",
441
+ "type": "bytes32"
442
+ },
443
+ {
444
+ "internalType": "address",
445
+ "name": "creator",
446
+ "type": "address"
447
+ },
448
+ {
449
+ "internalType": "address",
450
+ "name": "rewardToken",
451
+ "type": "address"
452
+ },
453
+ {
454
+ "internalType": "uint256",
455
+ "name": "amount",
456
+ "type": "uint256"
457
+ },
458
+ {
459
+ "internalType": "uint32",
460
+ "name": "campaignType",
461
+ "type": "uint32"
462
+ },
463
+ {
464
+ "internalType": "uint32",
465
+ "name": "startTimestamp",
466
+ "type": "uint32"
467
+ },
468
+ {
469
+ "internalType": "uint32",
470
+ "name": "duration",
471
+ "type": "uint32"
472
+ },
473
+ {
474
+ "internalType": "bytes",
475
+ "name": "campaignData",
476
+ "type": "bytes"
477
+ }
478
+ ],
479
+ "indexed": false,
480
+ "internalType": "struct CampaignParameters",
481
+ "name": "campaign",
482
+ "type": "tuple"
483
+ }
484
+ ],
485
+ "name": "NewCampaign",
486
+ "type": "event"
487
+ },
488
+ {
489
+ "anonymous": false,
490
+ "inputs": [
491
+ {
492
+ "indexed": true,
493
+ "internalType": "address",
494
+ "name": "token",
495
+ "type": "address"
496
+ },
497
+ {
498
+ "indexed": false,
499
+ "internalType": "uint256",
500
+ "name": "amount",
501
+ "type": "uint256"
502
+ }
503
+ ],
504
+ "name": "RewardTokenMinimumAmountUpdated",
505
+ "type": "event"
506
+ },
507
+ {
508
+ "anonymous": false,
509
+ "inputs": [
510
+ {
511
+ "indexed": true,
512
+ "internalType": "address",
513
+ "name": "implementation",
514
+ "type": "address"
515
+ }
516
+ ],
517
+ "name": "Upgraded",
518
+ "type": "event"
519
+ },
520
+ {
521
+ "anonymous": false,
522
+ "inputs": [
523
+ {
524
+ "indexed": true,
525
+ "internalType": "address",
526
+ "name": "user",
527
+ "type": "address"
528
+ },
529
+ {
530
+ "indexed": false,
531
+ "internalType": "uint256",
532
+ "name": "toggleStatus",
533
+ "type": "uint256"
534
+ }
535
+ ],
536
+ "name": "UserSigningWhitelistToggled",
537
+ "type": "event"
538
+ },
539
+ {
540
+ "inputs": [],
541
+ "name": "BASE_9",
542
+ "outputs": [
543
+ {
544
+ "internalType": "uint256",
545
+ "name": "",
546
+ "type": "uint256"
547
+ }
548
+ ],
549
+ "stateMutability": "view",
550
+ "type": "function"
551
+ },
552
+ {
553
+ "inputs": [],
554
+ "name": "CHAIN_ID",
555
+ "outputs": [
556
+ {
557
+ "internalType": "uint256",
558
+ "name": "",
559
+ "type": "uint256"
560
+ }
561
+ ],
562
+ "stateMutability": "view",
563
+ "type": "function"
564
+ },
565
+ {
566
+ "inputs": [],
567
+ "name": "HOUR",
568
+ "outputs": [
569
+ {
570
+ "internalType": "uint32",
571
+ "name": "",
572
+ "type": "uint32"
573
+ }
574
+ ],
575
+ "stateMutability": "view",
576
+ "type": "function"
577
+ },
578
+ {
579
+ "inputs": [
580
+ {
581
+ "internalType": "address",
582
+ "name": "",
583
+ "type": "address"
584
+ }
585
+ ],
586
+ "name": "_nonces",
587
+ "outputs": [
588
+ {
589
+ "internalType": "uint256",
590
+ "name": "",
591
+ "type": "uint256"
592
+ }
593
+ ],
594
+ "stateMutability": "view",
595
+ "type": "function"
596
+ },
597
+ {
598
+ "inputs": [],
599
+ "name": "acceptConditions",
600
+ "outputs": [],
601
+ "stateMutability": "nonpayable",
602
+ "type": "function"
603
+ },
604
+ {
605
+ "inputs": [],
606
+ "name": "accessControlManager",
607
+ "outputs": [
608
+ {
609
+ "internalType": "contract IAccessControlManager",
610
+ "name": "",
611
+ "type": "address"
612
+ }
613
+ ],
614
+ "stateMutability": "view",
615
+ "type": "function"
616
+ },
617
+ {
618
+ "inputs": [
619
+ {
620
+ "internalType": "bytes32",
621
+ "name": "_campaignId",
622
+ "type": "bytes32"
623
+ }
624
+ ],
625
+ "name": "campaign",
626
+ "outputs": [
627
+ {
628
+ "components": [
629
+ {
630
+ "internalType": "bytes32",
631
+ "name": "campaignId",
632
+ "type": "bytes32"
633
+ },
634
+ {
635
+ "internalType": "address",
636
+ "name": "creator",
637
+ "type": "address"
638
+ },
639
+ {
640
+ "internalType": "address",
641
+ "name": "rewardToken",
642
+ "type": "address"
643
+ },
644
+ {
645
+ "internalType": "uint256",
646
+ "name": "amount",
647
+ "type": "uint256"
648
+ },
649
+ {
650
+ "internalType": "uint32",
651
+ "name": "campaignType",
652
+ "type": "uint32"
653
+ },
654
+ {
655
+ "internalType": "uint32",
656
+ "name": "startTimestamp",
657
+ "type": "uint32"
658
+ },
659
+ {
660
+ "internalType": "uint32",
661
+ "name": "duration",
662
+ "type": "uint32"
663
+ },
664
+ {
665
+ "internalType": "bytes",
666
+ "name": "campaignData",
667
+ "type": "bytes"
668
+ }
669
+ ],
670
+ "internalType": "struct CampaignParameters",
671
+ "name": "",
672
+ "type": "tuple"
673
+ }
674
+ ],
675
+ "stateMutability": "view",
676
+ "type": "function"
677
+ },
678
+ {
679
+ "inputs": [
680
+ {
681
+ "components": [
682
+ {
683
+ "internalType": "bytes32",
684
+ "name": "campaignId",
685
+ "type": "bytes32"
686
+ },
687
+ {
688
+ "internalType": "address",
689
+ "name": "creator",
690
+ "type": "address"
691
+ },
692
+ {
693
+ "internalType": "address",
694
+ "name": "rewardToken",
695
+ "type": "address"
696
+ },
697
+ {
698
+ "internalType": "uint256",
699
+ "name": "amount",
700
+ "type": "uint256"
701
+ },
702
+ {
703
+ "internalType": "uint32",
704
+ "name": "campaignType",
705
+ "type": "uint32"
706
+ },
707
+ {
708
+ "internalType": "uint32",
709
+ "name": "startTimestamp",
710
+ "type": "uint32"
711
+ },
712
+ {
713
+ "internalType": "uint32",
714
+ "name": "duration",
715
+ "type": "uint32"
716
+ },
717
+ {
718
+ "internalType": "bytes",
719
+ "name": "campaignData",
720
+ "type": "bytes"
721
+ }
722
+ ],
723
+ "internalType": "struct CampaignParameters",
724
+ "name": "campaignData",
725
+ "type": "tuple"
726
+ }
727
+ ],
728
+ "name": "campaignId",
729
+ "outputs": [
730
+ {
731
+ "internalType": "bytes32",
732
+ "name": "",
733
+ "type": "bytes32"
734
+ }
735
+ ],
736
+ "stateMutability": "view",
737
+ "type": "function"
738
+ },
739
+ {
740
+ "inputs": [
741
+ {
742
+ "internalType": "uint256",
743
+ "name": "",
744
+ "type": "uint256"
745
+ }
746
+ ],
747
+ "name": "campaignList",
748
+ "outputs": [
749
+ {
750
+ "internalType": "bytes32",
751
+ "name": "campaignId",
752
+ "type": "bytes32"
753
+ },
754
+ {
755
+ "internalType": "address",
756
+ "name": "creator",
757
+ "type": "address"
758
+ },
759
+ {
760
+ "internalType": "address",
761
+ "name": "rewardToken",
762
+ "type": "address"
763
+ },
764
+ {
765
+ "internalType": "uint256",
766
+ "name": "amount",
767
+ "type": "uint256"
768
+ },
769
+ {
770
+ "internalType": "uint32",
771
+ "name": "campaignType",
772
+ "type": "uint32"
773
+ },
774
+ {
775
+ "internalType": "uint32",
776
+ "name": "startTimestamp",
777
+ "type": "uint32"
778
+ },
779
+ {
780
+ "internalType": "uint32",
781
+ "name": "duration",
782
+ "type": "uint32"
783
+ },
784
+ {
785
+ "internalType": "bytes",
786
+ "name": "campaignData",
787
+ "type": "bytes"
788
+ }
789
+ ],
790
+ "stateMutability": "view",
791
+ "type": "function"
792
+ },
793
+ {
794
+ "inputs": [
795
+ {
796
+ "internalType": "bytes32",
797
+ "name": "",
798
+ "type": "bytes32"
799
+ },
800
+ {
801
+ "internalType": "uint256",
802
+ "name": "",
803
+ "type": "uint256"
804
+ }
805
+ ],
806
+ "name": "campaignListReallocation",
807
+ "outputs": [
808
+ {
809
+ "internalType": "address",
810
+ "name": "",
811
+ "type": "address"
812
+ }
813
+ ],
814
+ "stateMutability": "view",
815
+ "type": "function"
816
+ },
817
+ {
818
+ "inputs": [
819
+ {
820
+ "internalType": "bytes32",
821
+ "name": "_campaignId",
822
+ "type": "bytes32"
823
+ }
824
+ ],
825
+ "name": "campaignLookup",
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": "address",
840
+ "name": "",
841
+ "type": "address"
842
+ },
843
+ {
844
+ "internalType": "address",
845
+ "name": "",
846
+ "type": "address"
847
+ }
848
+ ],
849
+ "name": "campaignOperators",
850
+ "outputs": [
851
+ {
852
+ "internalType": "uint256",
853
+ "name": "",
854
+ "type": "uint256"
855
+ }
856
+ ],
857
+ "stateMutability": "view",
858
+ "type": "function"
859
+ },
860
+ {
861
+ "inputs": [
862
+ {
863
+ "internalType": "bytes32",
864
+ "name": "",
865
+ "type": "bytes32"
866
+ }
867
+ ],
868
+ "name": "campaignOverrides",
869
+ "outputs": [
870
+ {
871
+ "internalType": "bytes32",
872
+ "name": "campaignId",
873
+ "type": "bytes32"
874
+ },
875
+ {
876
+ "internalType": "address",
877
+ "name": "creator",
878
+ "type": "address"
879
+ },
880
+ {
881
+ "internalType": "address",
882
+ "name": "rewardToken",
883
+ "type": "address"
884
+ },
885
+ {
886
+ "internalType": "uint256",
887
+ "name": "amount",
888
+ "type": "uint256"
889
+ },
890
+ {
891
+ "internalType": "uint32",
892
+ "name": "campaignType",
893
+ "type": "uint32"
894
+ },
895
+ {
896
+ "internalType": "uint32",
897
+ "name": "startTimestamp",
898
+ "type": "uint32"
899
+ },
900
+ {
901
+ "internalType": "uint32",
902
+ "name": "duration",
903
+ "type": "uint32"
904
+ },
905
+ {
906
+ "internalType": "bytes",
907
+ "name": "campaignData",
908
+ "type": "bytes"
909
+ }
910
+ ],
911
+ "stateMutability": "view",
912
+ "type": "function"
913
+ },
914
+ {
915
+ "inputs": [
916
+ {
917
+ "internalType": "bytes32",
918
+ "name": "",
919
+ "type": "bytes32"
920
+ },
921
+ {
922
+ "internalType": "uint256",
923
+ "name": "",
924
+ "type": "uint256"
925
+ }
926
+ ],
927
+ "name": "campaignOverridesTimestamp",
928
+ "outputs": [
929
+ {
930
+ "internalType": "uint256",
931
+ "name": "",
932
+ "type": "uint256"
933
+ }
934
+ ],
935
+ "stateMutability": "view",
936
+ "type": "function"
937
+ },
938
+ {
939
+ "inputs": [
940
+ {
941
+ "internalType": "bytes32",
942
+ "name": "",
943
+ "type": "bytes32"
944
+ },
945
+ {
946
+ "internalType": "address",
947
+ "name": "",
948
+ "type": "address"
949
+ }
950
+ ],
951
+ "name": "campaignReallocation",
952
+ "outputs": [
953
+ {
954
+ "internalType": "address",
955
+ "name": "",
956
+ "type": "address"
957
+ }
958
+ ],
959
+ "stateMutability": "view",
960
+ "type": "function"
961
+ },
962
+ {
963
+ "inputs": [
964
+ {
965
+ "internalType": "uint32",
966
+ "name": "",
967
+ "type": "uint32"
968
+ }
969
+ ],
970
+ "name": "campaignSpecificFees",
971
+ "outputs": [
972
+ {
973
+ "internalType": "uint256",
974
+ "name": "",
975
+ "type": "uint256"
976
+ }
977
+ ],
978
+ "stateMutability": "view",
979
+ "type": "function"
980
+ },
981
+ {
982
+ "inputs": [
983
+ {
984
+ "components": [
985
+ {
986
+ "internalType": "bytes32",
987
+ "name": "campaignId",
988
+ "type": "bytes32"
989
+ },
990
+ {
991
+ "internalType": "address",
992
+ "name": "creator",
993
+ "type": "address"
994
+ },
995
+ {
996
+ "internalType": "address",
997
+ "name": "rewardToken",
998
+ "type": "address"
999
+ },
1000
+ {
1001
+ "internalType": "uint256",
1002
+ "name": "amount",
1003
+ "type": "uint256"
1004
+ },
1005
+ {
1006
+ "internalType": "uint32",
1007
+ "name": "campaignType",
1008
+ "type": "uint32"
1009
+ },
1010
+ {
1011
+ "internalType": "uint32",
1012
+ "name": "startTimestamp",
1013
+ "type": "uint32"
1014
+ },
1015
+ {
1016
+ "internalType": "uint32",
1017
+ "name": "duration",
1018
+ "type": "uint32"
1019
+ },
1020
+ {
1021
+ "internalType": "bytes",
1022
+ "name": "campaignData",
1023
+ "type": "bytes"
1024
+ }
1025
+ ],
1026
+ "internalType": "struct CampaignParameters",
1027
+ "name": "newCampaign",
1028
+ "type": "tuple"
1029
+ }
1030
+ ],
1031
+ "name": "createCampaign",
1032
+ "outputs": [
1033
+ {
1034
+ "internalType": "bytes32",
1035
+ "name": "",
1036
+ "type": "bytes32"
1037
+ }
1038
+ ],
1039
+ "stateMutability": "nonpayable",
1040
+ "type": "function"
1041
+ },
1042
+ {
1043
+ "inputs": [
1044
+ {
1045
+ "components": [
1046
+ {
1047
+ "internalType": "bytes32",
1048
+ "name": "campaignId",
1049
+ "type": "bytes32"
1050
+ },
1051
+ {
1052
+ "internalType": "address",
1053
+ "name": "creator",
1054
+ "type": "address"
1055
+ },
1056
+ {
1057
+ "internalType": "address",
1058
+ "name": "rewardToken",
1059
+ "type": "address"
1060
+ },
1061
+ {
1062
+ "internalType": "uint256",
1063
+ "name": "amount",
1064
+ "type": "uint256"
1065
+ },
1066
+ {
1067
+ "internalType": "uint32",
1068
+ "name": "campaignType",
1069
+ "type": "uint32"
1070
+ },
1071
+ {
1072
+ "internalType": "uint32",
1073
+ "name": "startTimestamp",
1074
+ "type": "uint32"
1075
+ },
1076
+ {
1077
+ "internalType": "uint32",
1078
+ "name": "duration",
1079
+ "type": "uint32"
1080
+ },
1081
+ {
1082
+ "internalType": "bytes",
1083
+ "name": "campaignData",
1084
+ "type": "bytes"
1085
+ }
1086
+ ],
1087
+ "internalType": "struct CampaignParameters[]",
1088
+ "name": "campaigns",
1089
+ "type": "tuple[]"
1090
+ }
1091
+ ],
1092
+ "name": "createCampaigns",
1093
+ "outputs": [
1094
+ {
1095
+ "internalType": "bytes32[]",
1096
+ "name": "",
1097
+ "type": "bytes32[]"
1098
+ }
1099
+ ],
1100
+ "stateMutability": "nonpayable",
1101
+ "type": "function"
1102
+ },
1103
+ {
1104
+ "inputs": [
1105
+ {
1106
+ "internalType": "address",
1107
+ "name": "",
1108
+ "type": "address"
1109
+ },
1110
+ {
1111
+ "internalType": "address",
1112
+ "name": "",
1113
+ "type": "address"
1114
+ },
1115
+ {
1116
+ "internalType": "address",
1117
+ "name": "",
1118
+ "type": "address"
1119
+ }
1120
+ ],
1121
+ "name": "creatorAllowance",
1122
+ "outputs": [
1123
+ {
1124
+ "internalType": "uint256",
1125
+ "name": "",
1126
+ "type": "uint256"
1127
+ }
1128
+ ],
1129
+ "stateMutability": "view",
1130
+ "type": "function"
1131
+ },
1132
+ {
1133
+ "inputs": [
1134
+ {
1135
+ "internalType": "address",
1136
+ "name": "",
1137
+ "type": "address"
1138
+ },
1139
+ {
1140
+ "internalType": "address",
1141
+ "name": "",
1142
+ "type": "address"
1143
+ }
1144
+ ],
1145
+ "name": "creatorBalance",
1146
+ "outputs": [
1147
+ {
1148
+ "internalType": "uint256",
1149
+ "name": "",
1150
+ "type": "uint256"
1151
+ }
1152
+ ],
1153
+ "stateMutability": "view",
1154
+ "type": "function"
1155
+ },
1156
+ {
1157
+ "inputs": [
1158
+ {
1159
+ "internalType": "address",
1160
+ "name": "user",
1161
+ "type": "address"
1162
+ },
1163
+ {
1164
+ "internalType": "address",
1165
+ "name": "operator",
1166
+ "type": "address"
1167
+ },
1168
+ {
1169
+ "internalType": "address",
1170
+ "name": "rewardToken",
1171
+ "type": "address"
1172
+ },
1173
+ {
1174
+ "internalType": "uint256",
1175
+ "name": "amount",
1176
+ "type": "uint256"
1177
+ }
1178
+ ],
1179
+ "name": "decreaseTokenAllowance",
1180
+ "outputs": [],
1181
+ "stateMutability": "nonpayable",
1182
+ "type": "function"
1183
+ },
1184
+ {
1185
+ "inputs": [
1186
+ {
1187
+ "internalType": "address",
1188
+ "name": "user",
1189
+ "type": "address"
1190
+ },
1191
+ {
1192
+ "internalType": "address",
1193
+ "name": "rewardToken",
1194
+ "type": "address"
1195
+ },
1196
+ {
1197
+ "internalType": "address",
1198
+ "name": "to",
1199
+ "type": "address"
1200
+ },
1201
+ {
1202
+ "internalType": "uint256",
1203
+ "name": "amount",
1204
+ "type": "uint256"
1205
+ }
1206
+ ],
1207
+ "name": "decreaseTokenBalance",
1208
+ "outputs": [],
1209
+ "stateMutability": "nonpayable",
1210
+ "type": "function"
1211
+ },
1212
+ {
1213
+ "inputs": [],
1214
+ "name": "defaultFees",
1215
+ "outputs": [
1216
+ {
1217
+ "internalType": "uint256",
1218
+ "name": "",
1219
+ "type": "uint256"
1220
+ }
1221
+ ],
1222
+ "stateMutability": "view",
1223
+ "type": "function"
1224
+ },
1225
+ {
1226
+ "inputs": [
1227
+ {
1228
+ "internalType": "uint256",
1229
+ "name": "",
1230
+ "type": "uint256"
1231
+ }
1232
+ ],
1233
+ "name": "distributionList",
1234
+ "outputs": [
1235
+ {
1236
+ "internalType": "bytes32",
1237
+ "name": "rewardId",
1238
+ "type": "bytes32"
1239
+ },
1240
+ {
1241
+ "internalType": "address",
1242
+ "name": "uniV3Pool",
1243
+ "type": "address"
1244
+ },
1245
+ {
1246
+ "internalType": "address",
1247
+ "name": "rewardToken",
1248
+ "type": "address"
1249
+ },
1250
+ {
1251
+ "internalType": "uint256",
1252
+ "name": "amount",
1253
+ "type": "uint256"
1254
+ },
1255
+ {
1256
+ "internalType": "uint32",
1257
+ "name": "propToken0",
1258
+ "type": "uint32"
1259
+ },
1260
+ {
1261
+ "internalType": "uint32",
1262
+ "name": "propToken1",
1263
+ "type": "uint32"
1264
+ },
1265
+ {
1266
+ "internalType": "uint32",
1267
+ "name": "propFees",
1268
+ "type": "uint32"
1269
+ },
1270
+ {
1271
+ "internalType": "uint32",
1272
+ "name": "epochStart",
1273
+ "type": "uint32"
1274
+ },
1275
+ {
1276
+ "internalType": "uint32",
1277
+ "name": "numEpoch",
1278
+ "type": "uint32"
1279
+ },
1280
+ {
1281
+ "internalType": "uint32",
1282
+ "name": "isOutOfRangeIncentivized",
1283
+ "type": "uint32"
1284
+ },
1285
+ {
1286
+ "internalType": "uint32",
1287
+ "name": "boostedReward",
1288
+ "type": "uint32"
1289
+ },
1290
+ {
1291
+ "internalType": "address",
1292
+ "name": "boostingAddress",
1293
+ "type": "address"
1294
+ },
1295
+ {
1296
+ "internalType": "bytes",
1297
+ "name": "additionalData",
1298
+ "type": "bytes"
1299
+ }
1300
+ ],
1301
+ "stateMutability": "view",
1302
+ "type": "function"
1303
+ },
1304
+ {
1305
+ "inputs": [],
1306
+ "name": "distributor",
1307
+ "outputs": [
1308
+ {
1309
+ "internalType": "address",
1310
+ "name": "",
1311
+ "type": "address"
1312
+ }
1313
+ ],
1314
+ "stateMutability": "view",
1315
+ "type": "function"
1316
+ },
1317
+ {
1318
+ "inputs": [
1319
+ {
1320
+ "internalType": "address",
1321
+ "name": "",
1322
+ "type": "address"
1323
+ }
1324
+ ],
1325
+ "name": "feeRebate",
1326
+ "outputs": [
1327
+ {
1328
+ "internalType": "uint256",
1329
+ "name": "",
1330
+ "type": "uint256"
1331
+ }
1332
+ ],
1333
+ "stateMutability": "view",
1334
+ "type": "function"
1335
+ },
1336
+ {
1337
+ "inputs": [],
1338
+ "name": "feeRecipient",
1339
+ "outputs": [
1340
+ {
1341
+ "internalType": "address",
1342
+ "name": "",
1343
+ "type": "address"
1344
+ }
1345
+ ],
1346
+ "stateMutability": "view",
1347
+ "type": "function"
1348
+ },
1349
+ {
1350
+ "inputs": [
1351
+ {
1352
+ "internalType": "bytes32",
1353
+ "name": "_campaignId",
1354
+ "type": "bytes32"
1355
+ }
1356
+ ],
1357
+ "name": "getCampaignListReallocation",
1358
+ "outputs": [
1359
+ {
1360
+ "internalType": "address[]",
1361
+ "name": "",
1362
+ "type": "address[]"
1363
+ }
1364
+ ],
1365
+ "stateMutability": "view",
1366
+ "type": "function"
1367
+ },
1368
+ {
1369
+ "inputs": [
1370
+ {
1371
+ "internalType": "bytes32",
1372
+ "name": "_campaignId",
1373
+ "type": "bytes32"
1374
+ },
1375
+ {
1376
+ "internalType": "uint256",
1377
+ "name": "index",
1378
+ "type": "uint256"
1379
+ }
1380
+ ],
1381
+ "name": "getCampaignListReallocationAt",
1382
+ "outputs": [
1383
+ {
1384
+ "internalType": "address",
1385
+ "name": "",
1386
+ "type": "address"
1387
+ }
1388
+ ],
1389
+ "stateMutability": "view",
1390
+ "type": "function"
1391
+ },
1392
+ {
1393
+ "inputs": [
1394
+ {
1395
+ "internalType": "bytes32",
1396
+ "name": "_campaignId",
1397
+ "type": "bytes32"
1398
+ }
1399
+ ],
1400
+ "name": "getCampaignOverridesTimestamp",
1401
+ "outputs": [
1402
+ {
1403
+ "internalType": "uint256[]",
1404
+ "name": "",
1405
+ "type": "uint256[]"
1406
+ }
1407
+ ],
1408
+ "stateMutability": "view",
1409
+ "type": "function"
1410
+ },
1411
+ {
1412
+ "inputs": [
1413
+ {
1414
+ "internalType": "bytes32",
1415
+ "name": "_campaignId",
1416
+ "type": "bytes32"
1417
+ }
1418
+ ],
1419
+ "name": "getLatestCampaignParams",
1420
+ "outputs": [
1421
+ {
1422
+ "components": [
1423
+ {
1424
+ "internalType": "bytes32",
1425
+ "name": "campaignId",
1426
+ "type": "bytes32"
1427
+ },
1428
+ {
1429
+ "internalType": "address",
1430
+ "name": "creator",
1431
+ "type": "address"
1432
+ },
1433
+ {
1434
+ "internalType": "address",
1435
+ "name": "rewardToken",
1436
+ "type": "address"
1437
+ },
1438
+ {
1439
+ "internalType": "uint256",
1440
+ "name": "amount",
1441
+ "type": "uint256"
1442
+ },
1443
+ {
1444
+ "internalType": "uint32",
1445
+ "name": "campaignType",
1446
+ "type": "uint32"
1447
+ },
1448
+ {
1449
+ "internalType": "uint32",
1450
+ "name": "startTimestamp",
1451
+ "type": "uint32"
1452
+ },
1453
+ {
1454
+ "internalType": "uint32",
1455
+ "name": "duration",
1456
+ "type": "uint32"
1457
+ },
1458
+ {
1459
+ "internalType": "bytes",
1460
+ "name": "campaignData",
1461
+ "type": "bytes"
1462
+ }
1463
+ ],
1464
+ "internalType": "struct CampaignParameters",
1465
+ "name": "",
1466
+ "type": "tuple"
1467
+ }
1468
+ ],
1469
+ "stateMutability": "view",
1470
+ "type": "function"
1471
+ },
1472
+ {
1473
+ "inputs": [],
1474
+ "name": "getValidRewardTokens",
1475
+ "outputs": [
1476
+ {
1477
+ "components": [
1478
+ {
1479
+ "internalType": "address",
1480
+ "name": "token",
1481
+ "type": "address"
1482
+ },
1483
+ {
1484
+ "internalType": "uint256",
1485
+ "name": "minimumAmountPerEpoch",
1486
+ "type": "uint256"
1487
+ }
1488
+ ],
1489
+ "internalType": "struct RewardTokenAmounts[]",
1490
+ "name": "",
1491
+ "type": "tuple[]"
1492
+ }
1493
+ ],
1494
+ "stateMutability": "view",
1495
+ "type": "function"
1496
+ },
1497
+ {
1498
+ "inputs": [
1499
+ {
1500
+ "internalType": "uint32",
1501
+ "name": "skip",
1502
+ "type": "uint32"
1503
+ },
1504
+ {
1505
+ "internalType": "uint32",
1506
+ "name": "first",
1507
+ "type": "uint32"
1508
+ }
1509
+ ],
1510
+ "name": "getValidRewardTokens",
1511
+ "outputs": [
1512
+ {
1513
+ "components": [
1514
+ {
1515
+ "internalType": "address",
1516
+ "name": "token",
1517
+ "type": "address"
1518
+ },
1519
+ {
1520
+ "internalType": "uint256",
1521
+ "name": "minimumAmountPerEpoch",
1522
+ "type": "uint256"
1523
+ }
1524
+ ],
1525
+ "internalType": "struct RewardTokenAmounts[]",
1526
+ "name": "",
1527
+ "type": "tuple[]"
1528
+ },
1529
+ {
1530
+ "internalType": "uint256",
1531
+ "name": "",
1532
+ "type": "uint256"
1533
+ }
1534
+ ],
1535
+ "stateMutability": "view",
1536
+ "type": "function"
1537
+ },
1538
+ {
1539
+ "inputs": [
1540
+ {
1541
+ "internalType": "address",
1542
+ "name": "user",
1543
+ "type": "address"
1544
+ },
1545
+ {
1546
+ "internalType": "address",
1547
+ "name": "operator",
1548
+ "type": "address"
1549
+ },
1550
+ {
1551
+ "internalType": "address",
1552
+ "name": "rewardToken",
1553
+ "type": "address"
1554
+ },
1555
+ {
1556
+ "internalType": "uint256",
1557
+ "name": "amount",
1558
+ "type": "uint256"
1559
+ }
1560
+ ],
1561
+ "name": "increaseTokenAllowance",
1562
+ "outputs": [],
1563
+ "stateMutability": "nonpayable",
1564
+ "type": "function"
1565
+ },
1566
+ {
1567
+ "inputs": [
1568
+ {
1569
+ "internalType": "address",
1570
+ "name": "user",
1571
+ "type": "address"
1572
+ },
1573
+ {
1574
+ "internalType": "address",
1575
+ "name": "rewardToken",
1576
+ "type": "address"
1577
+ },
1578
+ {
1579
+ "internalType": "uint256",
1580
+ "name": "amount",
1581
+ "type": "uint256"
1582
+ }
1583
+ ],
1584
+ "name": "increaseTokenBalance",
1585
+ "outputs": [],
1586
+ "stateMutability": "nonpayable",
1587
+ "type": "function"
1588
+ },
1589
+ {
1590
+ "inputs": [
1591
+ {
1592
+ "internalType": "contract IAccessControlManager",
1593
+ "name": "_accessControlManager",
1594
+ "type": "address"
1595
+ },
1596
+ {
1597
+ "internalType": "address",
1598
+ "name": "_distributor",
1599
+ "type": "address"
1600
+ },
1601
+ {
1602
+ "internalType": "uint256",
1603
+ "name": "_fees",
1604
+ "type": "uint256"
1605
+ }
1606
+ ],
1607
+ "name": "initialize",
1608
+ "outputs": [],
1609
+ "stateMutability": "nonpayable",
1610
+ "type": "function"
1611
+ },
1612
+ {
1613
+ "inputs": [
1614
+ {
1615
+ "internalType": "address",
1616
+ "name": "",
1617
+ "type": "address"
1618
+ }
1619
+ ],
1620
+ "name": "isWhitelistedToken",
1621
+ "outputs": [
1622
+ {
1623
+ "internalType": "uint256",
1624
+ "name": "",
1625
+ "type": "uint256"
1626
+ }
1627
+ ],
1628
+ "stateMutability": "view",
1629
+ "type": "function"
1630
+ },
1631
+ {
1632
+ "inputs": [],
1633
+ "name": "message",
1634
+ "outputs": [
1635
+ {
1636
+ "internalType": "string",
1637
+ "name": "",
1638
+ "type": "string"
1639
+ }
1640
+ ],
1641
+ "stateMutability": "view",
1642
+ "type": "function"
1643
+ },
1644
+ {
1645
+ "inputs": [],
1646
+ "name": "messageHash",
1647
+ "outputs": [
1648
+ {
1649
+ "internalType": "bytes32",
1650
+ "name": "",
1651
+ "type": "bytes32"
1652
+ }
1653
+ ],
1654
+ "stateMutability": "view",
1655
+ "type": "function"
1656
+ },
1657
+ {
1658
+ "inputs": [
1659
+ {
1660
+ "internalType": "bytes32",
1661
+ "name": "_campaignId",
1662
+ "type": "bytes32"
1663
+ },
1664
+ {
1665
+ "components": [
1666
+ {
1667
+ "internalType": "bytes32",
1668
+ "name": "campaignId",
1669
+ "type": "bytes32"
1670
+ },
1671
+ {
1672
+ "internalType": "address",
1673
+ "name": "creator",
1674
+ "type": "address"
1675
+ },
1676
+ {
1677
+ "internalType": "address",
1678
+ "name": "rewardToken",
1679
+ "type": "address"
1680
+ },
1681
+ {
1682
+ "internalType": "uint256",
1683
+ "name": "amount",
1684
+ "type": "uint256"
1685
+ },
1686
+ {
1687
+ "internalType": "uint32",
1688
+ "name": "campaignType",
1689
+ "type": "uint32"
1690
+ },
1691
+ {
1692
+ "internalType": "uint32",
1693
+ "name": "startTimestamp",
1694
+ "type": "uint32"
1695
+ },
1696
+ {
1697
+ "internalType": "uint32",
1698
+ "name": "duration",
1699
+ "type": "uint32"
1700
+ },
1701
+ {
1702
+ "internalType": "bytes",
1703
+ "name": "campaignData",
1704
+ "type": "bytes"
1705
+ }
1706
+ ],
1707
+ "internalType": "struct CampaignParameters",
1708
+ "name": "newCampaign",
1709
+ "type": "tuple"
1710
+ }
1711
+ ],
1712
+ "name": "overrideCampaign",
1713
+ "outputs": [],
1714
+ "stateMutability": "nonpayable",
1715
+ "type": "function"
1716
+ },
1717
+ {
1718
+ "inputs": [],
1719
+ "name": "proxiableUUID",
1720
+ "outputs": [
1721
+ {
1722
+ "internalType": "bytes32",
1723
+ "name": "",
1724
+ "type": "bytes32"
1725
+ }
1726
+ ],
1727
+ "stateMutability": "view",
1728
+ "type": "function"
1729
+ },
1730
+ {
1731
+ "inputs": [
1732
+ {
1733
+ "internalType": "bytes32",
1734
+ "name": "_campaignId",
1735
+ "type": "bytes32"
1736
+ },
1737
+ {
1738
+ "internalType": "address[]",
1739
+ "name": "froms",
1740
+ "type": "address[]"
1741
+ },
1742
+ {
1743
+ "internalType": "address",
1744
+ "name": "to",
1745
+ "type": "address"
1746
+ }
1747
+ ],
1748
+ "name": "reallocateCampaignRewards",
1749
+ "outputs": [],
1750
+ "stateMutability": "nonpayable",
1751
+ "type": "function"
1752
+ },
1753
+ {
1754
+ "inputs": [
1755
+ {
1756
+ "internalType": "address",
1757
+ "name": "token",
1758
+ "type": "address"
1759
+ },
1760
+ {
1761
+ "internalType": "address",
1762
+ "name": "to",
1763
+ "type": "address"
1764
+ },
1765
+ {
1766
+ "internalType": "uint256",
1767
+ "name": "amount",
1768
+ "type": "uint256"
1769
+ }
1770
+ ],
1771
+ "name": "recover",
1772
+ "outputs": [],
1773
+ "stateMutability": "nonpayable",
1774
+ "type": "function"
1775
+ },
1776
+ {
1777
+ "inputs": [
1778
+ {
1779
+ "internalType": "address",
1780
+ "name": "",
1781
+ "type": "address"
1782
+ }
1783
+ ],
1784
+ "name": "rewardTokenMinAmounts",
1785
+ "outputs": [
1786
+ {
1787
+ "internalType": "uint256",
1788
+ "name": "",
1789
+ "type": "uint256"
1790
+ }
1791
+ ],
1792
+ "stateMutability": "view",
1793
+ "type": "function"
1794
+ },
1795
+ {
1796
+ "inputs": [
1797
+ {
1798
+ "internalType": "uint256",
1799
+ "name": "",
1800
+ "type": "uint256"
1801
+ }
1802
+ ],
1803
+ "name": "rewardTokens",
1804
+ "outputs": [
1805
+ {
1806
+ "internalType": "address",
1807
+ "name": "",
1808
+ "type": "address"
1809
+ }
1810
+ ],
1811
+ "stateMutability": "view",
1812
+ "type": "function"
1813
+ },
1814
+ {
1815
+ "inputs": [
1816
+ {
1817
+ "internalType": "uint32",
1818
+ "name": "campaignType",
1819
+ "type": "uint32"
1820
+ },
1821
+ {
1822
+ "internalType": "uint256",
1823
+ "name": "_fees",
1824
+ "type": "uint256"
1825
+ }
1826
+ ],
1827
+ "name": "setCampaignFees",
1828
+ "outputs": [],
1829
+ "stateMutability": "nonpayable",
1830
+ "type": "function"
1831
+ },
1832
+ {
1833
+ "inputs": [
1834
+ {
1835
+ "internalType": "address",
1836
+ "name": "_feeRecipient",
1837
+ "type": "address"
1838
+ }
1839
+ ],
1840
+ "name": "setFeeRecipient",
1841
+ "outputs": [],
1842
+ "stateMutability": "nonpayable",
1843
+ "type": "function"
1844
+ },
1845
+ {
1846
+ "inputs": [
1847
+ {
1848
+ "internalType": "uint256",
1849
+ "name": "_defaultFees",
1850
+ "type": "uint256"
1851
+ }
1852
+ ],
1853
+ "name": "setFees",
1854
+ "outputs": [],
1855
+ "stateMutability": "nonpayable",
1856
+ "type": "function"
1857
+ },
1858
+ {
1859
+ "inputs": [
1860
+ {
1861
+ "internalType": "string",
1862
+ "name": "_message",
1863
+ "type": "string"
1864
+ }
1865
+ ],
1866
+ "name": "setMessage",
1867
+ "outputs": [],
1868
+ "stateMutability": "nonpayable",
1869
+ "type": "function"
1870
+ },
1871
+ {
1872
+ "inputs": [
1873
+ {
1874
+ "internalType": "address",
1875
+ "name": "_distributor",
1876
+ "type": "address"
1877
+ }
1878
+ ],
1879
+ "name": "setNewDistributor",
1880
+ "outputs": [],
1881
+ "stateMutability": "nonpayable",
1882
+ "type": "function"
1883
+ },
1884
+ {
1885
+ "inputs": [
1886
+ {
1887
+ "internalType": "address[]",
1888
+ "name": "tokens",
1889
+ "type": "address[]"
1890
+ },
1891
+ {
1892
+ "internalType": "uint256[]",
1893
+ "name": "amounts",
1894
+ "type": "uint256[]"
1895
+ }
1896
+ ],
1897
+ "name": "setRewardTokenMinAmounts",
1898
+ "outputs": [],
1899
+ "stateMutability": "nonpayable",
1900
+ "type": "function"
1901
+ },
1902
+ {
1903
+ "inputs": [
1904
+ {
1905
+ "internalType": "address",
1906
+ "name": "user",
1907
+ "type": "address"
1908
+ },
1909
+ {
1910
+ "internalType": "uint256",
1911
+ "name": "userFeeRebate",
1912
+ "type": "uint256"
1913
+ }
1914
+ ],
1915
+ "name": "setUserFeeRebate",
1916
+ "outputs": [],
1917
+ "stateMutability": "nonpayable",
1918
+ "type": "function"
1919
+ },
1920
+ {
1921
+ "inputs": [
1922
+ {
1923
+ "components": [
1924
+ {
1925
+ "internalType": "bytes32",
1926
+ "name": "campaignId",
1927
+ "type": "bytes32"
1928
+ },
1929
+ {
1930
+ "internalType": "address",
1931
+ "name": "creator",
1932
+ "type": "address"
1933
+ },
1934
+ {
1935
+ "internalType": "address",
1936
+ "name": "rewardToken",
1937
+ "type": "address"
1938
+ },
1939
+ {
1940
+ "internalType": "uint256",
1941
+ "name": "amount",
1942
+ "type": "uint256"
1943
+ },
1944
+ {
1945
+ "internalType": "uint32",
1946
+ "name": "campaignType",
1947
+ "type": "uint32"
1948
+ },
1949
+ {
1950
+ "internalType": "uint32",
1951
+ "name": "startTimestamp",
1952
+ "type": "uint32"
1953
+ },
1954
+ {
1955
+ "internalType": "uint32",
1956
+ "name": "duration",
1957
+ "type": "uint32"
1958
+ },
1959
+ {
1960
+ "internalType": "bytes",
1961
+ "name": "campaignData",
1962
+ "type": "bytes"
1963
+ }
1964
+ ],
1965
+ "internalType": "struct CampaignParameters",
1966
+ "name": "newCampaign",
1967
+ "type": "tuple"
1968
+ },
1969
+ {
1970
+ "internalType": "bytes",
1971
+ "name": "",
1972
+ "type": "bytes"
1973
+ }
1974
+ ],
1975
+ "name": "signAndCreateCampaign",
1976
+ "outputs": [
1977
+ {
1978
+ "internalType": "bytes32",
1979
+ "name": "",
1980
+ "type": "bytes32"
1981
+ }
1982
+ ],
1983
+ "stateMutability": "nonpayable",
1984
+ "type": "function"
1985
+ },
1986
+ {
1987
+ "inputs": [
1988
+ {
1989
+ "internalType": "address",
1990
+ "name": "user",
1991
+ "type": "address"
1992
+ },
1993
+ {
1994
+ "internalType": "address",
1995
+ "name": "operator",
1996
+ "type": "address"
1997
+ }
1998
+ ],
1999
+ "name": "toggleCampaignOperator",
2000
+ "outputs": [],
2001
+ "stateMutability": "nonpayable",
2002
+ "type": "function"
2003
+ },
2004
+ {
2005
+ "inputs": [
2006
+ {
2007
+ "internalType": "address",
2008
+ "name": "user",
2009
+ "type": "address"
2010
+ }
2011
+ ],
2012
+ "name": "toggleSigningWhitelist",
2013
+ "outputs": [],
2014
+ "stateMutability": "nonpayable",
2015
+ "type": "function"
2016
+ },
2017
+ {
2018
+ "inputs": [
2019
+ {
2020
+ "internalType": "address",
2021
+ "name": "newImplementation",
2022
+ "type": "address"
2023
+ }
2024
+ ],
2025
+ "name": "upgradeTo",
2026
+ "outputs": [],
2027
+ "stateMutability": "nonpayable",
2028
+ "type": "function"
2029
+ },
2030
+ {
2031
+ "inputs": [
2032
+ {
2033
+ "internalType": "address",
2034
+ "name": "newImplementation",
2035
+ "type": "address"
2036
+ },
2037
+ {
2038
+ "internalType": "bytes",
2039
+ "name": "data",
2040
+ "type": "bytes"
2041
+ }
2042
+ ],
2043
+ "name": "upgradeToAndCall",
2044
+ "outputs": [],
2045
+ "stateMutability": "payable",
2046
+ "type": "function"
2047
+ },
2048
+ {
2049
+ "inputs": [
2050
+ {
2051
+ "internalType": "address",
2052
+ "name": "",
2053
+ "type": "address"
2054
+ }
2055
+ ],
2056
+ "name": "userSignatureWhitelist",
2057
+ "outputs": [
2058
+ {
2059
+ "internalType": "uint256",
2060
+ "name": "",
2061
+ "type": "uint256"
2062
+ }
2063
+ ],
2064
+ "stateMutability": "view",
2065
+ "type": "function"
2066
+ },
2067
+ {
2068
+ "inputs": [
2069
+ {
2070
+ "internalType": "address",
2071
+ "name": "",
2072
+ "type": "address"
2073
+ }
2074
+ ],
2075
+ "name": "userSignatures",
2076
+ "outputs": [
2077
+ {
2078
+ "internalType": "bytes32",
2079
+ "name": "",
2080
+ "type": "bytes32"
2081
+ }
2082
+ ],
2083
+ "stateMutability": "view",
2084
+ "type": "function"
2085
+ }
2086
+ ] as const satisfies Abi;
2087
+
2088
+ /**
2089
+ * Type-safe ABI for DistributionCreator
2090
+ */
2091
+ export type DistributionCreatorAbi = typeof DistributionCreatorAbi;
2092
+
2093
+ /**
2094
+ * Contract instance type for DistributionCreator
2095
+ */
2096
+ // Use any for contract type to avoid complex viem type issues
2097
+ // The runtime behavior is type-safe through viem's ABI typing
2098
+ export type DistributionCreatorContract = any;
2099
+
2100
+ /**
2101
+ * DistributionCreator Contract Class
2102
+ *
2103
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
2104
+ *
2105
+ * @example
2106
+ * ```typescript
2107
+ * import { createPublicClient, createWalletClient, http } from 'viem';
2108
+ * import { mainnet } from 'viem/chains';
2109
+ * import { DistributionCreator } from 'DistributionCreator';
2110
+ *
2111
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
2112
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
2113
+ *
2114
+ * const contract = new DistributionCreator('0x...', { publicClient, walletClient });
2115
+ *
2116
+ * // Read functions
2117
+ * const result = await contract.balanceOf('0x...');
2118
+ *
2119
+ * // Write functions
2120
+ * const hash = await contract.transfer('0x...', 1000n);
2121
+ *
2122
+ * // Simulate transactions (dry-run)
2123
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
2124
+ * console.log('Gas estimate:', simulation.request.gas);
2125
+ *
2126
+ * // Watch events
2127
+ * const unwatch = contract.watch.Transfer((event) => {
2128
+ * console.log('Transfer event:', event);
2129
+ * });
2130
+ * ```
2131
+ */
2132
+ export class DistributionCreator {
2133
+ private contract: DistributionCreatorContract;
2134
+ private contractAddress: Address;
2135
+ private publicClient: PublicClient;
2136
+
2137
+ constructor(
2138
+ address: Address,
2139
+ clients: {
2140
+ publicClient: PublicClient;
2141
+ walletClient?: WalletClient;
2142
+ }
2143
+ ) {
2144
+ this.contractAddress = address;
2145
+ this.publicClient = clients.publicClient;
2146
+ this.contract = getContract({
2147
+ address,
2148
+ abi: DistributionCreatorAbi,
2149
+ client: {
2150
+ public: clients.publicClient,
2151
+ wallet: clients.walletClient,
2152
+ },
2153
+ });
2154
+ }
2155
+
2156
+ /**
2157
+ * Get the contract address
2158
+ */
2159
+ get address(): Address {
2160
+ return this.contractAddress;
2161
+ }
2162
+
2163
+ /**
2164
+ * Get the underlying viem contract instance.
2165
+ */
2166
+ getContract(): DistributionCreatorContract {
2167
+ return this.contract;
2168
+ }
2169
+
2170
+ /**
2171
+ * BASE_9
2172
+ * view
2173
+ */
2174
+ async BASE_9(): Promise<bigint> {
2175
+ return this.contract.read.BASE_9() as Promise<bigint>;
2176
+ }
2177
+
2178
+ /**
2179
+ * CHAIN_ID
2180
+ * view
2181
+ */
2182
+ async CHAIN_ID(): Promise<bigint> {
2183
+ return this.contract.read.CHAIN_ID() as Promise<bigint>;
2184
+ }
2185
+
2186
+ /**
2187
+ * HOUR
2188
+ * view
2189
+ */
2190
+ async HOUR(): Promise<bigint> {
2191
+ return this.contract.read.HOUR() as Promise<bigint>;
2192
+ }
2193
+
2194
+ /**
2195
+ * _nonces
2196
+ * view
2197
+ */
2198
+ async _nonces(arg0: `0x${string}`): Promise<bigint> {
2199
+ return this.contract.read._nonces([arg0] as const) as Promise<bigint>;
2200
+ }
2201
+
2202
+ /**
2203
+ * accessControlManager
2204
+ * view
2205
+ */
2206
+ async accessControlManager(): Promise<`0x${string}`> {
2207
+ return this.contract.read.accessControlManager() as Promise<`0x${string}`>;
2208
+ }
2209
+
2210
+ /**
2211
+ * campaign
2212
+ * view
2213
+ */
2214
+ async campaign(_campaignId: `0x${string}`): Promise<CampaignParameters> {
2215
+ return this.contract.read.campaign([_campaignId] as const) as Promise<CampaignParameters>;
2216
+ }
2217
+
2218
+ /**
2219
+ * campaignId
2220
+ * view
2221
+ */
2222
+ async campaignId(campaignData: CampaignParameters): Promise<`0x${string}`> {
2223
+ return this.contract.read.campaignId([campaignData] as const) as Promise<`0x${string}`>;
2224
+ }
2225
+
2226
+ /**
2227
+ * campaignList
2228
+ * view
2229
+ */
2230
+ async campaignList(arg0: bigint): Promise<[`0x${string}`, `0x${string}`, `0x${string}`, bigint, bigint, bigint, bigint, `0x${string}`]> {
2231
+ return this.contract.read.campaignList([arg0] as const) as Promise<[`0x${string}`, `0x${string}`, `0x${string}`, bigint, bigint, bigint, bigint, `0x${string}`]>;
2232
+ }
2233
+
2234
+ /**
2235
+ * campaignListReallocation
2236
+ * view
2237
+ */
2238
+ async campaignListReallocation(arg0: `0x${string}`, arg1: bigint): Promise<`0x${string}`> {
2239
+ return this.contract.read.campaignListReallocation([arg0, arg1] as const) as Promise<`0x${string}`>;
2240
+ }
2241
+
2242
+ /**
2243
+ * campaignLookup
2244
+ * view
2245
+ */
2246
+ async campaignLookup(_campaignId: `0x${string}`): Promise<bigint> {
2247
+ return this.contract.read.campaignLookup([_campaignId] as const) as Promise<bigint>;
2248
+ }
2249
+
2250
+ /**
2251
+ * campaignOperators
2252
+ * view
2253
+ */
2254
+ async campaignOperators(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
2255
+ return this.contract.read.campaignOperators([arg0, arg1] as const) as Promise<bigint>;
2256
+ }
2257
+
2258
+ /**
2259
+ * campaignOverrides
2260
+ * view
2261
+ */
2262
+ async campaignOverrides(arg0: `0x${string}`): Promise<[`0x${string}`, `0x${string}`, `0x${string}`, bigint, bigint, bigint, bigint, `0x${string}`]> {
2263
+ return this.contract.read.campaignOverrides([arg0] as const) as Promise<[`0x${string}`, `0x${string}`, `0x${string}`, bigint, bigint, bigint, bigint, `0x${string}`]>;
2264
+ }
2265
+
2266
+ /**
2267
+ * campaignOverridesTimestamp
2268
+ * view
2269
+ */
2270
+ async campaignOverridesTimestamp(arg0: `0x${string}`, arg1: bigint): Promise<bigint> {
2271
+ return this.contract.read.campaignOverridesTimestamp([arg0, arg1] as const) as Promise<bigint>;
2272
+ }
2273
+
2274
+ /**
2275
+ * campaignReallocation
2276
+ * view
2277
+ */
2278
+ async campaignReallocation(arg0: `0x${string}`, arg1: `0x${string}`): Promise<`0x${string}`> {
2279
+ return this.contract.read.campaignReallocation([arg0, arg1] as const) as Promise<`0x${string}`>;
2280
+ }
2281
+
2282
+ /**
2283
+ * campaignSpecificFees
2284
+ * view
2285
+ */
2286
+ async campaignSpecificFees(arg0: bigint): Promise<bigint> {
2287
+ return this.contract.read.campaignSpecificFees([arg0] as const) as Promise<bigint>;
2288
+ }
2289
+
2290
+ /**
2291
+ * creatorAllowance
2292
+ * view
2293
+ */
2294
+ async creatorAllowance(arg0: `0x${string}`, arg1: `0x${string}`, arg2: `0x${string}`): Promise<bigint> {
2295
+ return this.contract.read.creatorAllowance([arg0, arg1, arg2] as const) as Promise<bigint>;
2296
+ }
2297
+
2298
+ /**
2299
+ * creatorBalance
2300
+ * view
2301
+ */
2302
+ async creatorBalance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
2303
+ return this.contract.read.creatorBalance([arg0, arg1] as const) as Promise<bigint>;
2304
+ }
2305
+
2306
+ /**
2307
+ * defaultFees
2308
+ * view
2309
+ */
2310
+ async defaultFees(): Promise<bigint> {
2311
+ return this.contract.read.defaultFees() as Promise<bigint>;
2312
+ }
2313
+
2314
+ /**
2315
+ * distributionList
2316
+ * view
2317
+ */
2318
+ async distributionList(arg0: bigint): Promise<[`0x${string}`, `0x${string}`, `0x${string}`, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, `0x${string}`, `0x${string}`]> {
2319
+ return this.contract.read.distributionList([arg0] as const) as Promise<[`0x${string}`, `0x${string}`, `0x${string}`, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, `0x${string}`, `0x${string}`]>;
2320
+ }
2321
+
2322
+ /**
2323
+ * distributor
2324
+ * view
2325
+ */
2326
+ async distributor(): Promise<`0x${string}`> {
2327
+ return this.contract.read.distributor() as Promise<`0x${string}`>;
2328
+ }
2329
+
2330
+ /**
2331
+ * feeRebate
2332
+ * view
2333
+ */
2334
+ async feeRebate(arg0: `0x${string}`): Promise<bigint> {
2335
+ return this.contract.read.feeRebate([arg0] as const) as Promise<bigint>;
2336
+ }
2337
+
2338
+ /**
2339
+ * feeRecipient
2340
+ * view
2341
+ */
2342
+ async feeRecipient(): Promise<`0x${string}`> {
2343
+ return this.contract.read.feeRecipient() as Promise<`0x${string}`>;
2344
+ }
2345
+
2346
+ /**
2347
+ * getCampaignListReallocation
2348
+ * view
2349
+ */
2350
+ async getCampaignListReallocation(_campaignId: `0x${string}`): Promise<`0x${string}`[]> {
2351
+ return this.contract.read.getCampaignListReallocation([_campaignId] as const) as Promise<`0x${string}`[]>;
2352
+ }
2353
+
2354
+ /**
2355
+ * getCampaignListReallocationAt
2356
+ * view
2357
+ */
2358
+ async getCampaignListReallocationAt(_campaignId: `0x${string}`, index: bigint): Promise<`0x${string}`> {
2359
+ return this.contract.read.getCampaignListReallocationAt([_campaignId, index] as const) as Promise<`0x${string}`>;
2360
+ }
2361
+
2362
+ /**
2363
+ * getCampaignOverridesTimestamp
2364
+ * view
2365
+ */
2366
+ async getCampaignOverridesTimestamp(_campaignId: `0x${string}`): Promise<bigint[]> {
2367
+ return this.contract.read.getCampaignOverridesTimestamp([_campaignId] as const) as Promise<bigint[]>;
2368
+ }
2369
+
2370
+ /**
2371
+ * getLatestCampaignParams
2372
+ * view
2373
+ */
2374
+ async getLatestCampaignParams(_campaignId: `0x${string}`): Promise<CampaignParameters> {
2375
+ return this.contract.read.getLatestCampaignParams([_campaignId] as const) as Promise<CampaignParameters>;
2376
+ }
2377
+
2378
+ async getValidRewardTokens(): Promise<RewardTokenAmounts[]>;
2379
+ async getValidRewardTokens(skip: bigint, first: bigint): Promise<[RewardTokenAmounts[], bigint]>;
2380
+ async getValidRewardTokens(...args: any[]): Promise<any> {
2381
+ return this.contract.read.getValidRewardTokens(args as any) as Promise<any>;
2382
+ }
2383
+
2384
+ /**
2385
+ * isWhitelistedToken
2386
+ * view
2387
+ */
2388
+ async isWhitelistedToken(arg0: `0x${string}`): Promise<bigint> {
2389
+ return this.contract.read.isWhitelistedToken([arg0] as const) as Promise<bigint>;
2390
+ }
2391
+
2392
+ /**
2393
+ * message
2394
+ * view
2395
+ */
2396
+ async message(): Promise<string> {
2397
+ return this.contract.read.message() as Promise<string>;
2398
+ }
2399
+
2400
+ /**
2401
+ * messageHash
2402
+ * view
2403
+ */
2404
+ async messageHash(): Promise<`0x${string}`> {
2405
+ return this.contract.read.messageHash() as Promise<`0x${string}`>;
2406
+ }
2407
+
2408
+ /**
2409
+ * proxiableUUID
2410
+ * view
2411
+ */
2412
+ async proxiableUUID(): Promise<`0x${string}`> {
2413
+ return this.contract.read.proxiableUUID() as Promise<`0x${string}`>;
2414
+ }
2415
+
2416
+ /**
2417
+ * rewardTokenMinAmounts
2418
+ * view
2419
+ */
2420
+ async rewardTokenMinAmounts(arg0: `0x${string}`): Promise<bigint> {
2421
+ return this.contract.read.rewardTokenMinAmounts([arg0] as const) as Promise<bigint>;
2422
+ }
2423
+
2424
+ /**
2425
+ * rewardTokens
2426
+ * view
2427
+ */
2428
+ async rewardTokens(arg0: bigint): Promise<`0x${string}`> {
2429
+ return this.contract.read.rewardTokens([arg0] as const) as Promise<`0x${string}`>;
2430
+ }
2431
+
2432
+ /**
2433
+ * userSignatureWhitelist
2434
+ * view
2435
+ */
2436
+ async userSignatureWhitelist(arg0: `0x${string}`): Promise<bigint> {
2437
+ return this.contract.read.userSignatureWhitelist([arg0] as const) as Promise<bigint>;
2438
+ }
2439
+
2440
+ /**
2441
+ * userSignatures
2442
+ * view
2443
+ */
2444
+ async userSignatures(arg0: `0x${string}`): Promise<`0x${string}`> {
2445
+ return this.contract.read.userSignatures([arg0] as const) as Promise<`0x${string}`>;
2446
+ }
2447
+
2448
+ /**
2449
+ * acceptConditions
2450
+ * nonpayable
2451
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2452
+ */
2453
+ async acceptConditions(options?: {
2454
+ accessList?: import('viem').AccessList;
2455
+ authorizationList?: import('viem').AuthorizationList;
2456
+ chain?: import('viem').Chain | null;
2457
+ dataSuffix?: `0x${string}`;
2458
+ gas?: bigint;
2459
+ gasPrice?: bigint;
2460
+ maxFeePerGas?: bigint;
2461
+ maxPriorityFeePerGas?: bigint;
2462
+ nonce?: number;
2463
+ value?: bigint;
2464
+ }): Promise<`0x${string}`> {
2465
+ if (!this.contract.write) {
2466
+ throw new Error('Wallet client is required for write operations');
2467
+ }
2468
+ return this.contract.write.acceptConditions(options) as Promise<`0x${string}`>;
2469
+ }
2470
+
2471
+ /**
2472
+ * createCampaign
2473
+ * nonpayable
2474
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2475
+ */
2476
+ async createCampaign(newCampaign: CampaignParameters, options?: {
2477
+ accessList?: import('viem').AccessList;
2478
+ authorizationList?: import('viem').AuthorizationList;
2479
+ chain?: import('viem').Chain | null;
2480
+ dataSuffix?: `0x${string}`;
2481
+ gas?: bigint;
2482
+ gasPrice?: bigint;
2483
+ maxFeePerGas?: bigint;
2484
+ maxPriorityFeePerGas?: bigint;
2485
+ nonce?: number;
2486
+ value?: bigint;
2487
+ }): Promise<`0x${string}`> {
2488
+ if (!this.contract.write) {
2489
+ throw new Error('Wallet client is required for write operations');
2490
+ }
2491
+ return this.contract.write.createCampaign([newCampaign] as const, options) as Promise<`0x${string}`>;
2492
+ }
2493
+
2494
+ /**
2495
+ * createCampaigns
2496
+ * nonpayable
2497
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2498
+ */
2499
+ async createCampaigns(campaigns: CampaignParameters[], options?: {
2500
+ accessList?: import('viem').AccessList;
2501
+ authorizationList?: import('viem').AuthorizationList;
2502
+ chain?: import('viem').Chain | null;
2503
+ dataSuffix?: `0x${string}`;
2504
+ gas?: bigint;
2505
+ gasPrice?: bigint;
2506
+ maxFeePerGas?: bigint;
2507
+ maxPriorityFeePerGas?: bigint;
2508
+ nonce?: number;
2509
+ value?: bigint;
2510
+ }): Promise<`0x${string}`> {
2511
+ if (!this.contract.write) {
2512
+ throw new Error('Wallet client is required for write operations');
2513
+ }
2514
+ return this.contract.write.createCampaigns([campaigns] as const, options) as Promise<`0x${string}`>;
2515
+ }
2516
+
2517
+ /**
2518
+ * decreaseTokenAllowance
2519
+ * nonpayable
2520
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2521
+ */
2522
+ async decreaseTokenAllowance(user: `0x${string}`, operator: `0x${string}`, rewardToken: `0x${string}`, amount: bigint, options?: {
2523
+ accessList?: import('viem').AccessList;
2524
+ authorizationList?: import('viem').AuthorizationList;
2525
+ chain?: import('viem').Chain | null;
2526
+ dataSuffix?: `0x${string}`;
2527
+ gas?: bigint;
2528
+ gasPrice?: bigint;
2529
+ maxFeePerGas?: bigint;
2530
+ maxPriorityFeePerGas?: bigint;
2531
+ nonce?: number;
2532
+ value?: bigint;
2533
+ }): Promise<`0x${string}`> {
2534
+ if (!this.contract.write) {
2535
+ throw new Error('Wallet client is required for write operations');
2536
+ }
2537
+ return this.contract.write.decreaseTokenAllowance([user, operator, rewardToken, amount] as const, options) as Promise<`0x${string}`>;
2538
+ }
2539
+
2540
+ /**
2541
+ * decreaseTokenBalance
2542
+ * nonpayable
2543
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2544
+ */
2545
+ async decreaseTokenBalance(user: `0x${string}`, rewardToken: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
2546
+ accessList?: import('viem').AccessList;
2547
+ authorizationList?: import('viem').AuthorizationList;
2548
+ chain?: import('viem').Chain | null;
2549
+ dataSuffix?: `0x${string}`;
2550
+ gas?: bigint;
2551
+ gasPrice?: bigint;
2552
+ maxFeePerGas?: bigint;
2553
+ maxPriorityFeePerGas?: bigint;
2554
+ nonce?: number;
2555
+ value?: bigint;
2556
+ }): Promise<`0x${string}`> {
2557
+ if (!this.contract.write) {
2558
+ throw new Error('Wallet client is required for write operations');
2559
+ }
2560
+ return this.contract.write.decreaseTokenBalance([user, rewardToken, to, amount] as const, options) as Promise<`0x${string}`>;
2561
+ }
2562
+
2563
+ /**
2564
+ * increaseTokenAllowance
2565
+ * nonpayable
2566
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2567
+ */
2568
+ async increaseTokenAllowance(user: `0x${string}`, operator: `0x${string}`, rewardToken: `0x${string}`, amount: bigint, options?: {
2569
+ accessList?: import('viem').AccessList;
2570
+ authorizationList?: import('viem').AuthorizationList;
2571
+ chain?: import('viem').Chain | null;
2572
+ dataSuffix?: `0x${string}`;
2573
+ gas?: bigint;
2574
+ gasPrice?: bigint;
2575
+ maxFeePerGas?: bigint;
2576
+ maxPriorityFeePerGas?: bigint;
2577
+ nonce?: number;
2578
+ value?: bigint;
2579
+ }): Promise<`0x${string}`> {
2580
+ if (!this.contract.write) {
2581
+ throw new Error('Wallet client is required for write operations');
2582
+ }
2583
+ return this.contract.write.increaseTokenAllowance([user, operator, rewardToken, amount] as const, options) as Promise<`0x${string}`>;
2584
+ }
2585
+
2586
+ /**
2587
+ * increaseTokenBalance
2588
+ * nonpayable
2589
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2590
+ */
2591
+ async increaseTokenBalance(user: `0x${string}`, rewardToken: `0x${string}`, amount: bigint, options?: {
2592
+ accessList?: import('viem').AccessList;
2593
+ authorizationList?: import('viem').AuthorizationList;
2594
+ chain?: import('viem').Chain | null;
2595
+ dataSuffix?: `0x${string}`;
2596
+ gas?: bigint;
2597
+ gasPrice?: bigint;
2598
+ maxFeePerGas?: bigint;
2599
+ maxPriorityFeePerGas?: bigint;
2600
+ nonce?: number;
2601
+ value?: bigint;
2602
+ }): Promise<`0x${string}`> {
2603
+ if (!this.contract.write) {
2604
+ throw new Error('Wallet client is required for write operations');
2605
+ }
2606
+ return this.contract.write.increaseTokenBalance([user, rewardToken, amount] as const, options) as Promise<`0x${string}`>;
2607
+ }
2608
+
2609
+ /**
2610
+ * initialize
2611
+ * nonpayable
2612
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2613
+ */
2614
+ async initialize(_accessControlManager: `0x${string}`, _distributor: `0x${string}`, _fees: bigint, options?: {
2615
+ accessList?: import('viem').AccessList;
2616
+ authorizationList?: import('viem').AuthorizationList;
2617
+ chain?: import('viem').Chain | null;
2618
+ dataSuffix?: `0x${string}`;
2619
+ gas?: bigint;
2620
+ gasPrice?: bigint;
2621
+ maxFeePerGas?: bigint;
2622
+ maxPriorityFeePerGas?: bigint;
2623
+ nonce?: number;
2624
+ value?: bigint;
2625
+ }): Promise<`0x${string}`> {
2626
+ if (!this.contract.write) {
2627
+ throw new Error('Wallet client is required for write operations');
2628
+ }
2629
+ return this.contract.write.initialize([_accessControlManager, _distributor, _fees] as const, options) as Promise<`0x${string}`>;
2630
+ }
2631
+
2632
+ /**
2633
+ * overrideCampaign
2634
+ * nonpayable
2635
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2636
+ */
2637
+ async overrideCampaign(_campaignId: `0x${string}`, newCampaign: CampaignParameters, options?: {
2638
+ accessList?: import('viem').AccessList;
2639
+ authorizationList?: import('viem').AuthorizationList;
2640
+ chain?: import('viem').Chain | null;
2641
+ dataSuffix?: `0x${string}`;
2642
+ gas?: bigint;
2643
+ gasPrice?: bigint;
2644
+ maxFeePerGas?: bigint;
2645
+ maxPriorityFeePerGas?: bigint;
2646
+ nonce?: number;
2647
+ value?: bigint;
2648
+ }): Promise<`0x${string}`> {
2649
+ if (!this.contract.write) {
2650
+ throw new Error('Wallet client is required for write operations');
2651
+ }
2652
+ return this.contract.write.overrideCampaign([_campaignId, newCampaign] as const, options) as Promise<`0x${string}`>;
2653
+ }
2654
+
2655
+ /**
2656
+ * reallocateCampaignRewards
2657
+ * nonpayable
2658
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2659
+ */
2660
+ async reallocateCampaignRewards(_campaignId: `0x${string}`, froms: `0x${string}`[], to: `0x${string}`, options?: {
2661
+ accessList?: import('viem').AccessList;
2662
+ authorizationList?: import('viem').AuthorizationList;
2663
+ chain?: import('viem').Chain | null;
2664
+ dataSuffix?: `0x${string}`;
2665
+ gas?: bigint;
2666
+ gasPrice?: bigint;
2667
+ maxFeePerGas?: bigint;
2668
+ maxPriorityFeePerGas?: bigint;
2669
+ nonce?: number;
2670
+ value?: bigint;
2671
+ }): Promise<`0x${string}`> {
2672
+ if (!this.contract.write) {
2673
+ throw new Error('Wallet client is required for write operations');
2674
+ }
2675
+ return this.contract.write.reallocateCampaignRewards([_campaignId, froms, to] as const, options) as Promise<`0x${string}`>;
2676
+ }
2677
+
2678
+ /**
2679
+ * recover
2680
+ * nonpayable
2681
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2682
+ */
2683
+ async recover(token: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
2684
+ accessList?: import('viem').AccessList;
2685
+ authorizationList?: import('viem').AuthorizationList;
2686
+ chain?: import('viem').Chain | null;
2687
+ dataSuffix?: `0x${string}`;
2688
+ gas?: bigint;
2689
+ gasPrice?: bigint;
2690
+ maxFeePerGas?: bigint;
2691
+ maxPriorityFeePerGas?: bigint;
2692
+ nonce?: number;
2693
+ value?: bigint;
2694
+ }): Promise<`0x${string}`> {
2695
+ if (!this.contract.write) {
2696
+ throw new Error('Wallet client is required for write operations');
2697
+ }
2698
+ return this.contract.write.recover([token, to, amount] as const, options) as Promise<`0x${string}`>;
2699
+ }
2700
+
2701
+ /**
2702
+ * setCampaignFees
2703
+ * nonpayable
2704
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2705
+ */
2706
+ async setCampaignFees(campaignType: bigint, _fees: bigint, options?: {
2707
+ accessList?: import('viem').AccessList;
2708
+ authorizationList?: import('viem').AuthorizationList;
2709
+ chain?: import('viem').Chain | null;
2710
+ dataSuffix?: `0x${string}`;
2711
+ gas?: bigint;
2712
+ gasPrice?: bigint;
2713
+ maxFeePerGas?: bigint;
2714
+ maxPriorityFeePerGas?: bigint;
2715
+ nonce?: number;
2716
+ value?: bigint;
2717
+ }): Promise<`0x${string}`> {
2718
+ if (!this.contract.write) {
2719
+ throw new Error('Wallet client is required for write operations');
2720
+ }
2721
+ return this.contract.write.setCampaignFees([campaignType, _fees] as const, options) as Promise<`0x${string}`>;
2722
+ }
2723
+
2724
+ /**
2725
+ * setFeeRecipient
2726
+ * nonpayable
2727
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2728
+ */
2729
+ async setFeeRecipient(_feeRecipient: `0x${string}`, options?: {
2730
+ accessList?: import('viem').AccessList;
2731
+ authorizationList?: import('viem').AuthorizationList;
2732
+ chain?: import('viem').Chain | null;
2733
+ dataSuffix?: `0x${string}`;
2734
+ gas?: bigint;
2735
+ gasPrice?: bigint;
2736
+ maxFeePerGas?: bigint;
2737
+ maxPriorityFeePerGas?: bigint;
2738
+ nonce?: number;
2739
+ value?: bigint;
2740
+ }): Promise<`0x${string}`> {
2741
+ if (!this.contract.write) {
2742
+ throw new Error('Wallet client is required for write operations');
2743
+ }
2744
+ return this.contract.write.setFeeRecipient([_feeRecipient] as const, options) as Promise<`0x${string}`>;
2745
+ }
2746
+
2747
+ /**
2748
+ * setFees
2749
+ * nonpayable
2750
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2751
+ */
2752
+ async setFees(_defaultFees: bigint, options?: {
2753
+ accessList?: import('viem').AccessList;
2754
+ authorizationList?: import('viem').AuthorizationList;
2755
+ chain?: import('viem').Chain | null;
2756
+ dataSuffix?: `0x${string}`;
2757
+ gas?: bigint;
2758
+ gasPrice?: bigint;
2759
+ maxFeePerGas?: bigint;
2760
+ maxPriorityFeePerGas?: bigint;
2761
+ nonce?: number;
2762
+ value?: bigint;
2763
+ }): Promise<`0x${string}`> {
2764
+ if (!this.contract.write) {
2765
+ throw new Error('Wallet client is required for write operations');
2766
+ }
2767
+ return this.contract.write.setFees([_defaultFees] as const, options) as Promise<`0x${string}`>;
2768
+ }
2769
+
2770
+ /**
2771
+ * setMessage
2772
+ * nonpayable
2773
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2774
+ */
2775
+ async setMessage(_message: string, options?: {
2776
+ accessList?: import('viem').AccessList;
2777
+ authorizationList?: import('viem').AuthorizationList;
2778
+ chain?: import('viem').Chain | null;
2779
+ dataSuffix?: `0x${string}`;
2780
+ gas?: bigint;
2781
+ gasPrice?: bigint;
2782
+ maxFeePerGas?: bigint;
2783
+ maxPriorityFeePerGas?: bigint;
2784
+ nonce?: number;
2785
+ value?: bigint;
2786
+ }): Promise<`0x${string}`> {
2787
+ if (!this.contract.write) {
2788
+ throw new Error('Wallet client is required for write operations');
2789
+ }
2790
+ return this.contract.write.setMessage([_message] as const, options) as Promise<`0x${string}`>;
2791
+ }
2792
+
2793
+ /**
2794
+ * setNewDistributor
2795
+ * nonpayable
2796
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2797
+ */
2798
+ async setNewDistributor(_distributor: `0x${string}`, options?: {
2799
+ accessList?: import('viem').AccessList;
2800
+ authorizationList?: import('viem').AuthorizationList;
2801
+ chain?: import('viem').Chain | null;
2802
+ dataSuffix?: `0x${string}`;
2803
+ gas?: bigint;
2804
+ gasPrice?: bigint;
2805
+ maxFeePerGas?: bigint;
2806
+ maxPriorityFeePerGas?: bigint;
2807
+ nonce?: number;
2808
+ value?: bigint;
2809
+ }): Promise<`0x${string}`> {
2810
+ if (!this.contract.write) {
2811
+ throw new Error('Wallet client is required for write operations');
2812
+ }
2813
+ return this.contract.write.setNewDistributor([_distributor] as const, options) as Promise<`0x${string}`>;
2814
+ }
2815
+
2816
+ /**
2817
+ * setRewardTokenMinAmounts
2818
+ * nonpayable
2819
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2820
+ */
2821
+ async setRewardTokenMinAmounts(tokens: `0x${string}`[], amounts: bigint[], options?: {
2822
+ accessList?: import('viem').AccessList;
2823
+ authorizationList?: import('viem').AuthorizationList;
2824
+ chain?: import('viem').Chain | null;
2825
+ dataSuffix?: `0x${string}`;
2826
+ gas?: bigint;
2827
+ gasPrice?: bigint;
2828
+ maxFeePerGas?: bigint;
2829
+ maxPriorityFeePerGas?: bigint;
2830
+ nonce?: number;
2831
+ value?: bigint;
2832
+ }): Promise<`0x${string}`> {
2833
+ if (!this.contract.write) {
2834
+ throw new Error('Wallet client is required for write operations');
2835
+ }
2836
+ return this.contract.write.setRewardTokenMinAmounts([tokens, amounts] as const, options) as Promise<`0x${string}`>;
2837
+ }
2838
+
2839
+ /**
2840
+ * setUserFeeRebate
2841
+ * nonpayable
2842
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2843
+ */
2844
+ async setUserFeeRebate(user: `0x${string}`, userFeeRebate: bigint, options?: {
2845
+ accessList?: import('viem').AccessList;
2846
+ authorizationList?: import('viem').AuthorizationList;
2847
+ chain?: import('viem').Chain | null;
2848
+ dataSuffix?: `0x${string}`;
2849
+ gas?: bigint;
2850
+ gasPrice?: bigint;
2851
+ maxFeePerGas?: bigint;
2852
+ maxPriorityFeePerGas?: bigint;
2853
+ nonce?: number;
2854
+ value?: bigint;
2855
+ }): Promise<`0x${string}`> {
2856
+ if (!this.contract.write) {
2857
+ throw new Error('Wallet client is required for write operations');
2858
+ }
2859
+ return this.contract.write.setUserFeeRebate([user, userFeeRebate] as const, options) as Promise<`0x${string}`>;
2860
+ }
2861
+
2862
+ /**
2863
+ * signAndCreateCampaign
2864
+ * nonpayable
2865
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2866
+ */
2867
+ async signAndCreateCampaign(newCampaign: CampaignParameters, arg1: `0x${string}`, options?: {
2868
+ accessList?: import('viem').AccessList;
2869
+ authorizationList?: import('viem').AuthorizationList;
2870
+ chain?: import('viem').Chain | null;
2871
+ dataSuffix?: `0x${string}`;
2872
+ gas?: bigint;
2873
+ gasPrice?: bigint;
2874
+ maxFeePerGas?: bigint;
2875
+ maxPriorityFeePerGas?: bigint;
2876
+ nonce?: number;
2877
+ value?: bigint;
2878
+ }): Promise<`0x${string}`> {
2879
+ if (!this.contract.write) {
2880
+ throw new Error('Wallet client is required for write operations');
2881
+ }
2882
+ return this.contract.write.signAndCreateCampaign([newCampaign, arg1] as const, options) as Promise<`0x${string}`>;
2883
+ }
2884
+
2885
+ /**
2886
+ * toggleCampaignOperator
2887
+ * nonpayable
2888
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2889
+ */
2890
+ async toggleCampaignOperator(user: `0x${string}`, operator: `0x${string}`, options?: {
2891
+ accessList?: import('viem').AccessList;
2892
+ authorizationList?: import('viem').AuthorizationList;
2893
+ chain?: import('viem').Chain | null;
2894
+ dataSuffix?: `0x${string}`;
2895
+ gas?: bigint;
2896
+ gasPrice?: bigint;
2897
+ maxFeePerGas?: bigint;
2898
+ maxPriorityFeePerGas?: bigint;
2899
+ nonce?: number;
2900
+ value?: bigint;
2901
+ }): Promise<`0x${string}`> {
2902
+ if (!this.contract.write) {
2903
+ throw new Error('Wallet client is required for write operations');
2904
+ }
2905
+ return this.contract.write.toggleCampaignOperator([user, operator] as const, options) as Promise<`0x${string}`>;
2906
+ }
2907
+
2908
+ /**
2909
+ * toggleSigningWhitelist
2910
+ * nonpayable
2911
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2912
+ */
2913
+ async toggleSigningWhitelist(user: `0x${string}`, options?: {
2914
+ accessList?: import('viem').AccessList;
2915
+ authorizationList?: import('viem').AuthorizationList;
2916
+ chain?: import('viem').Chain | null;
2917
+ dataSuffix?: `0x${string}`;
2918
+ gas?: bigint;
2919
+ gasPrice?: bigint;
2920
+ maxFeePerGas?: bigint;
2921
+ maxPriorityFeePerGas?: bigint;
2922
+ nonce?: number;
2923
+ value?: bigint;
2924
+ }): Promise<`0x${string}`> {
2925
+ if (!this.contract.write) {
2926
+ throw new Error('Wallet client is required for write operations');
2927
+ }
2928
+ return this.contract.write.toggleSigningWhitelist([user] as const, options) as Promise<`0x${string}`>;
2929
+ }
2930
+
2931
+ /**
2932
+ * upgradeTo
2933
+ * nonpayable
2934
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2935
+ */
2936
+ async upgradeTo(newImplementation: `0x${string}`, options?: {
2937
+ accessList?: import('viem').AccessList;
2938
+ authorizationList?: import('viem').AuthorizationList;
2939
+ chain?: import('viem').Chain | null;
2940
+ dataSuffix?: `0x${string}`;
2941
+ gas?: bigint;
2942
+ gasPrice?: bigint;
2943
+ maxFeePerGas?: bigint;
2944
+ maxPriorityFeePerGas?: bigint;
2945
+ nonce?: number;
2946
+ value?: bigint;
2947
+ }): Promise<`0x${string}`> {
2948
+ if (!this.contract.write) {
2949
+ throw new Error('Wallet client is required for write operations');
2950
+ }
2951
+ return this.contract.write.upgradeTo([newImplementation] as const, options) as Promise<`0x${string}`>;
2952
+ }
2953
+
2954
+ /**
2955
+ * upgradeToAndCall
2956
+ * payable
2957
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2958
+ */
2959
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
2960
+ accessList?: import('viem').AccessList;
2961
+ authorizationList?: import('viem').AuthorizationList;
2962
+ chain?: import('viem').Chain | null;
2963
+ dataSuffix?: `0x${string}`;
2964
+ gas?: bigint;
2965
+ gasPrice?: bigint;
2966
+ maxFeePerGas?: bigint;
2967
+ maxPriorityFeePerGas?: bigint;
2968
+ nonce?: number;
2969
+ value?: bigint;
2970
+ }): Promise<`0x${string}`> {
2971
+ if (!this.contract.write) {
2972
+ throw new Error('Wallet client is required for write operations');
2973
+ }
2974
+ return this.contract.write.upgradeToAndCall([newImplementation, data] as const, options) as Promise<`0x${string}`>;
2975
+ }
2976
+
2977
+
2978
+
2979
+ /**
2980
+ * Simulate contract write operations (dry-run without sending transaction)
2981
+ *
2982
+ * @example
2983
+ * const result = await contract.simulate.transfer('0x...', 1000n);
2984
+ * console.log('Gas estimate:', result.request.gas);
2985
+ * console.log('Would succeed:', result.result);
2986
+ */
2987
+ get simulate() {
2988
+ const contract = this.contract;
2989
+ if (!contract.simulate) {
2990
+ throw new Error('Public client is required for simulation');
2991
+ }
2992
+ return {
2993
+ /**
2994
+ * Simulate acceptConditions
2995
+ * Returns gas estimate and result without sending transaction
2996
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2997
+ */
2998
+ async acceptConditions(options?: {
2999
+ accessList?: import('viem').AccessList;
3000
+ authorizationList?: import('viem').AuthorizationList;
3001
+ chain?: import('viem').Chain | null;
3002
+ dataSuffix?: `0x${string}`;
3003
+ gas?: bigint;
3004
+ gasPrice?: bigint;
3005
+ maxFeePerGas?: bigint;
3006
+ maxPriorityFeePerGas?: bigint;
3007
+ nonce?: number;
3008
+ value?: bigint;
3009
+ }): Promise<void> {
3010
+ return contract.simulate.acceptConditions(options) as Promise<void>;
3011
+ },
3012
+ /**
3013
+ * Simulate createCampaign
3014
+ * Returns gas estimate and result without sending transaction
3015
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3016
+ */
3017
+ async createCampaign(newCampaign: CampaignParameters, options?: {
3018
+ accessList?: import('viem').AccessList;
3019
+ authorizationList?: import('viem').AuthorizationList;
3020
+ chain?: import('viem').Chain | null;
3021
+ dataSuffix?: `0x${string}`;
3022
+ gas?: bigint;
3023
+ gasPrice?: bigint;
3024
+ maxFeePerGas?: bigint;
3025
+ maxPriorityFeePerGas?: bigint;
3026
+ nonce?: number;
3027
+ value?: bigint;
3028
+ }): Promise<`0x${string}`> {
3029
+ return contract.simulate.createCampaign([newCampaign] as const, options) as Promise<`0x${string}`>;
3030
+ },
3031
+ /**
3032
+ * Simulate createCampaigns
3033
+ * Returns gas estimate and result without sending transaction
3034
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3035
+ */
3036
+ async createCampaigns(campaigns: CampaignParameters[], options?: {
3037
+ accessList?: import('viem').AccessList;
3038
+ authorizationList?: import('viem').AuthorizationList;
3039
+ chain?: import('viem').Chain | null;
3040
+ dataSuffix?: `0x${string}`;
3041
+ gas?: bigint;
3042
+ gasPrice?: bigint;
3043
+ maxFeePerGas?: bigint;
3044
+ maxPriorityFeePerGas?: bigint;
3045
+ nonce?: number;
3046
+ value?: bigint;
3047
+ }): Promise<`0x${string}`[]> {
3048
+ return contract.simulate.createCampaigns([campaigns] as const, options) as Promise<`0x${string}`[]>;
3049
+ },
3050
+ /**
3051
+ * Simulate decreaseTokenAllowance
3052
+ * Returns gas estimate and result without sending transaction
3053
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3054
+ */
3055
+ async decreaseTokenAllowance(user: `0x${string}`, operator: `0x${string}`, rewardToken: `0x${string}`, amount: bigint, options?: {
3056
+ accessList?: import('viem').AccessList;
3057
+ authorizationList?: import('viem').AuthorizationList;
3058
+ chain?: import('viem').Chain | null;
3059
+ dataSuffix?: `0x${string}`;
3060
+ gas?: bigint;
3061
+ gasPrice?: bigint;
3062
+ maxFeePerGas?: bigint;
3063
+ maxPriorityFeePerGas?: bigint;
3064
+ nonce?: number;
3065
+ value?: bigint;
3066
+ }): Promise<void> {
3067
+ return contract.simulate.decreaseTokenAllowance([user, operator, rewardToken, amount] as const, options) as Promise<void>;
3068
+ },
3069
+ /**
3070
+ * Simulate decreaseTokenBalance
3071
+ * Returns gas estimate and result without sending transaction
3072
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3073
+ */
3074
+ async decreaseTokenBalance(user: `0x${string}`, rewardToken: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
3075
+ accessList?: import('viem').AccessList;
3076
+ authorizationList?: import('viem').AuthorizationList;
3077
+ chain?: import('viem').Chain | null;
3078
+ dataSuffix?: `0x${string}`;
3079
+ gas?: bigint;
3080
+ gasPrice?: bigint;
3081
+ maxFeePerGas?: bigint;
3082
+ maxPriorityFeePerGas?: bigint;
3083
+ nonce?: number;
3084
+ value?: bigint;
3085
+ }): Promise<void> {
3086
+ return contract.simulate.decreaseTokenBalance([user, rewardToken, to, amount] as const, options) as Promise<void>;
3087
+ },
3088
+ /**
3089
+ * Simulate increaseTokenAllowance
3090
+ * Returns gas estimate and result without sending transaction
3091
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3092
+ */
3093
+ async increaseTokenAllowance(user: `0x${string}`, operator: `0x${string}`, rewardToken: `0x${string}`, amount: bigint, options?: {
3094
+ accessList?: import('viem').AccessList;
3095
+ authorizationList?: import('viem').AuthorizationList;
3096
+ chain?: import('viem').Chain | null;
3097
+ dataSuffix?: `0x${string}`;
3098
+ gas?: bigint;
3099
+ gasPrice?: bigint;
3100
+ maxFeePerGas?: bigint;
3101
+ maxPriorityFeePerGas?: bigint;
3102
+ nonce?: number;
3103
+ value?: bigint;
3104
+ }): Promise<void> {
3105
+ return contract.simulate.increaseTokenAllowance([user, operator, rewardToken, amount] as const, options) as Promise<void>;
3106
+ },
3107
+ /**
3108
+ * Simulate increaseTokenBalance
3109
+ * Returns gas estimate and result without sending transaction
3110
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3111
+ */
3112
+ async increaseTokenBalance(user: `0x${string}`, rewardToken: `0x${string}`, amount: bigint, options?: {
3113
+ accessList?: import('viem').AccessList;
3114
+ authorizationList?: import('viem').AuthorizationList;
3115
+ chain?: import('viem').Chain | null;
3116
+ dataSuffix?: `0x${string}`;
3117
+ gas?: bigint;
3118
+ gasPrice?: bigint;
3119
+ maxFeePerGas?: bigint;
3120
+ maxPriorityFeePerGas?: bigint;
3121
+ nonce?: number;
3122
+ value?: bigint;
3123
+ }): Promise<void> {
3124
+ return contract.simulate.increaseTokenBalance([user, rewardToken, amount] as const, options) as Promise<void>;
3125
+ },
3126
+ /**
3127
+ * Simulate initialize
3128
+ * Returns gas estimate and result without sending transaction
3129
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3130
+ */
3131
+ async initialize(_accessControlManager: `0x${string}`, _distributor: `0x${string}`, _fees: bigint, options?: {
3132
+ accessList?: import('viem').AccessList;
3133
+ authorizationList?: import('viem').AuthorizationList;
3134
+ chain?: import('viem').Chain | null;
3135
+ dataSuffix?: `0x${string}`;
3136
+ gas?: bigint;
3137
+ gasPrice?: bigint;
3138
+ maxFeePerGas?: bigint;
3139
+ maxPriorityFeePerGas?: bigint;
3140
+ nonce?: number;
3141
+ value?: bigint;
3142
+ }): Promise<void> {
3143
+ return contract.simulate.initialize([_accessControlManager, _distributor, _fees] as const, options) as Promise<void>;
3144
+ },
3145
+ /**
3146
+ * Simulate overrideCampaign
3147
+ * Returns gas estimate and result without sending transaction
3148
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3149
+ */
3150
+ async overrideCampaign(_campaignId: `0x${string}`, newCampaign: CampaignParameters, options?: {
3151
+ accessList?: import('viem').AccessList;
3152
+ authorizationList?: import('viem').AuthorizationList;
3153
+ chain?: import('viem').Chain | null;
3154
+ dataSuffix?: `0x${string}`;
3155
+ gas?: bigint;
3156
+ gasPrice?: bigint;
3157
+ maxFeePerGas?: bigint;
3158
+ maxPriorityFeePerGas?: bigint;
3159
+ nonce?: number;
3160
+ value?: bigint;
3161
+ }): Promise<void> {
3162
+ return contract.simulate.overrideCampaign([_campaignId, newCampaign] as const, options) as Promise<void>;
3163
+ },
3164
+ /**
3165
+ * Simulate reallocateCampaignRewards
3166
+ * Returns gas estimate and result without sending transaction
3167
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3168
+ */
3169
+ async reallocateCampaignRewards(_campaignId: `0x${string}`, froms: `0x${string}`[], to: `0x${string}`, options?: {
3170
+ accessList?: import('viem').AccessList;
3171
+ authorizationList?: import('viem').AuthorizationList;
3172
+ chain?: import('viem').Chain | null;
3173
+ dataSuffix?: `0x${string}`;
3174
+ gas?: bigint;
3175
+ gasPrice?: bigint;
3176
+ maxFeePerGas?: bigint;
3177
+ maxPriorityFeePerGas?: bigint;
3178
+ nonce?: number;
3179
+ value?: bigint;
3180
+ }): Promise<void> {
3181
+ return contract.simulate.reallocateCampaignRewards([_campaignId, froms, to] as const, options) as Promise<void>;
3182
+ },
3183
+ /**
3184
+ * Simulate recover
3185
+ * Returns gas estimate and result without sending transaction
3186
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3187
+ */
3188
+ async recover(token: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
3189
+ accessList?: import('viem').AccessList;
3190
+ authorizationList?: import('viem').AuthorizationList;
3191
+ chain?: import('viem').Chain | null;
3192
+ dataSuffix?: `0x${string}`;
3193
+ gas?: bigint;
3194
+ gasPrice?: bigint;
3195
+ maxFeePerGas?: bigint;
3196
+ maxPriorityFeePerGas?: bigint;
3197
+ nonce?: number;
3198
+ value?: bigint;
3199
+ }): Promise<void> {
3200
+ return contract.simulate.recover([token, to, amount] as const, options) as Promise<void>;
3201
+ },
3202
+ /**
3203
+ * Simulate setCampaignFees
3204
+ * Returns gas estimate and result without sending transaction
3205
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3206
+ */
3207
+ async setCampaignFees(campaignType: bigint, _fees: bigint, options?: {
3208
+ accessList?: import('viem').AccessList;
3209
+ authorizationList?: import('viem').AuthorizationList;
3210
+ chain?: import('viem').Chain | null;
3211
+ dataSuffix?: `0x${string}`;
3212
+ gas?: bigint;
3213
+ gasPrice?: bigint;
3214
+ maxFeePerGas?: bigint;
3215
+ maxPriorityFeePerGas?: bigint;
3216
+ nonce?: number;
3217
+ value?: bigint;
3218
+ }): Promise<void> {
3219
+ return contract.simulate.setCampaignFees([campaignType, _fees] as const, options) as Promise<void>;
3220
+ },
3221
+ /**
3222
+ * Simulate setFeeRecipient
3223
+ * Returns gas estimate and result without sending transaction
3224
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3225
+ */
3226
+ async setFeeRecipient(_feeRecipient: `0x${string}`, options?: {
3227
+ accessList?: import('viem').AccessList;
3228
+ authorizationList?: import('viem').AuthorizationList;
3229
+ chain?: import('viem').Chain | null;
3230
+ dataSuffix?: `0x${string}`;
3231
+ gas?: bigint;
3232
+ gasPrice?: bigint;
3233
+ maxFeePerGas?: bigint;
3234
+ maxPriorityFeePerGas?: bigint;
3235
+ nonce?: number;
3236
+ value?: bigint;
3237
+ }): Promise<void> {
3238
+ return contract.simulate.setFeeRecipient([_feeRecipient] as const, options) as Promise<void>;
3239
+ },
3240
+ /**
3241
+ * Simulate setFees
3242
+ * Returns gas estimate and result without sending transaction
3243
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3244
+ */
3245
+ async setFees(_defaultFees: bigint, options?: {
3246
+ accessList?: import('viem').AccessList;
3247
+ authorizationList?: import('viem').AuthorizationList;
3248
+ chain?: import('viem').Chain | null;
3249
+ dataSuffix?: `0x${string}`;
3250
+ gas?: bigint;
3251
+ gasPrice?: bigint;
3252
+ maxFeePerGas?: bigint;
3253
+ maxPriorityFeePerGas?: bigint;
3254
+ nonce?: number;
3255
+ value?: bigint;
3256
+ }): Promise<void> {
3257
+ return contract.simulate.setFees([_defaultFees] as const, options) as Promise<void>;
3258
+ },
3259
+ /**
3260
+ * Simulate setMessage
3261
+ * Returns gas estimate and result without sending transaction
3262
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3263
+ */
3264
+ async setMessage(_message: string, options?: {
3265
+ accessList?: import('viem').AccessList;
3266
+ authorizationList?: import('viem').AuthorizationList;
3267
+ chain?: import('viem').Chain | null;
3268
+ dataSuffix?: `0x${string}`;
3269
+ gas?: bigint;
3270
+ gasPrice?: bigint;
3271
+ maxFeePerGas?: bigint;
3272
+ maxPriorityFeePerGas?: bigint;
3273
+ nonce?: number;
3274
+ value?: bigint;
3275
+ }): Promise<void> {
3276
+ return contract.simulate.setMessage([_message] as const, options) as Promise<void>;
3277
+ },
3278
+ /**
3279
+ * Simulate setNewDistributor
3280
+ * Returns gas estimate and result without sending transaction
3281
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3282
+ */
3283
+ async setNewDistributor(_distributor: `0x${string}`, options?: {
3284
+ accessList?: import('viem').AccessList;
3285
+ authorizationList?: import('viem').AuthorizationList;
3286
+ chain?: import('viem').Chain | null;
3287
+ dataSuffix?: `0x${string}`;
3288
+ gas?: bigint;
3289
+ gasPrice?: bigint;
3290
+ maxFeePerGas?: bigint;
3291
+ maxPriorityFeePerGas?: bigint;
3292
+ nonce?: number;
3293
+ value?: bigint;
3294
+ }): Promise<void> {
3295
+ return contract.simulate.setNewDistributor([_distributor] as const, options) as Promise<void>;
3296
+ },
3297
+ /**
3298
+ * Simulate setRewardTokenMinAmounts
3299
+ * Returns gas estimate and result without sending transaction
3300
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3301
+ */
3302
+ async setRewardTokenMinAmounts(tokens: `0x${string}`[], amounts: bigint[], options?: {
3303
+ accessList?: import('viem').AccessList;
3304
+ authorizationList?: import('viem').AuthorizationList;
3305
+ chain?: import('viem').Chain | null;
3306
+ dataSuffix?: `0x${string}`;
3307
+ gas?: bigint;
3308
+ gasPrice?: bigint;
3309
+ maxFeePerGas?: bigint;
3310
+ maxPriorityFeePerGas?: bigint;
3311
+ nonce?: number;
3312
+ value?: bigint;
3313
+ }): Promise<void> {
3314
+ return contract.simulate.setRewardTokenMinAmounts([tokens, amounts] as const, options) as Promise<void>;
3315
+ },
3316
+ /**
3317
+ * Simulate setUserFeeRebate
3318
+ * Returns gas estimate and result without sending transaction
3319
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3320
+ */
3321
+ async setUserFeeRebate(user: `0x${string}`, userFeeRebate: bigint, options?: {
3322
+ accessList?: import('viem').AccessList;
3323
+ authorizationList?: import('viem').AuthorizationList;
3324
+ chain?: import('viem').Chain | null;
3325
+ dataSuffix?: `0x${string}`;
3326
+ gas?: bigint;
3327
+ gasPrice?: bigint;
3328
+ maxFeePerGas?: bigint;
3329
+ maxPriorityFeePerGas?: bigint;
3330
+ nonce?: number;
3331
+ value?: bigint;
3332
+ }): Promise<void> {
3333
+ return contract.simulate.setUserFeeRebate([user, userFeeRebate] as const, options) as Promise<void>;
3334
+ },
3335
+ /**
3336
+ * Simulate signAndCreateCampaign
3337
+ * Returns gas estimate and result without sending transaction
3338
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3339
+ */
3340
+ async signAndCreateCampaign(newCampaign: CampaignParameters, arg1: `0x${string}`, options?: {
3341
+ accessList?: import('viem').AccessList;
3342
+ authorizationList?: import('viem').AuthorizationList;
3343
+ chain?: import('viem').Chain | null;
3344
+ dataSuffix?: `0x${string}`;
3345
+ gas?: bigint;
3346
+ gasPrice?: bigint;
3347
+ maxFeePerGas?: bigint;
3348
+ maxPriorityFeePerGas?: bigint;
3349
+ nonce?: number;
3350
+ value?: bigint;
3351
+ }): Promise<`0x${string}`> {
3352
+ return contract.simulate.signAndCreateCampaign([newCampaign, arg1] as const, options) as Promise<`0x${string}`>;
3353
+ },
3354
+ /**
3355
+ * Simulate toggleCampaignOperator
3356
+ * Returns gas estimate and result without sending transaction
3357
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3358
+ */
3359
+ async toggleCampaignOperator(user: `0x${string}`, operator: `0x${string}`, options?: {
3360
+ accessList?: import('viem').AccessList;
3361
+ authorizationList?: import('viem').AuthorizationList;
3362
+ chain?: import('viem').Chain | null;
3363
+ dataSuffix?: `0x${string}`;
3364
+ gas?: bigint;
3365
+ gasPrice?: bigint;
3366
+ maxFeePerGas?: bigint;
3367
+ maxPriorityFeePerGas?: bigint;
3368
+ nonce?: number;
3369
+ value?: bigint;
3370
+ }): Promise<void> {
3371
+ return contract.simulate.toggleCampaignOperator([user, operator] as const, options) as Promise<void>;
3372
+ },
3373
+ /**
3374
+ * Simulate toggleSigningWhitelist
3375
+ * Returns gas estimate and result without sending transaction
3376
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3377
+ */
3378
+ async toggleSigningWhitelist(user: `0x${string}`, options?: {
3379
+ accessList?: import('viem').AccessList;
3380
+ authorizationList?: import('viem').AuthorizationList;
3381
+ chain?: import('viem').Chain | null;
3382
+ dataSuffix?: `0x${string}`;
3383
+ gas?: bigint;
3384
+ gasPrice?: bigint;
3385
+ maxFeePerGas?: bigint;
3386
+ maxPriorityFeePerGas?: bigint;
3387
+ nonce?: number;
3388
+ value?: bigint;
3389
+ }): Promise<void> {
3390
+ return contract.simulate.toggleSigningWhitelist([user] as const, options) as Promise<void>;
3391
+ },
3392
+ /**
3393
+ * Simulate upgradeTo
3394
+ * Returns gas estimate and result without sending transaction
3395
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3396
+ */
3397
+ async upgradeTo(newImplementation: `0x${string}`, options?: {
3398
+ accessList?: import('viem').AccessList;
3399
+ authorizationList?: import('viem').AuthorizationList;
3400
+ chain?: import('viem').Chain | null;
3401
+ dataSuffix?: `0x${string}`;
3402
+ gas?: bigint;
3403
+ gasPrice?: bigint;
3404
+ maxFeePerGas?: bigint;
3405
+ maxPriorityFeePerGas?: bigint;
3406
+ nonce?: number;
3407
+ value?: bigint;
3408
+ }): Promise<void> {
3409
+ return contract.simulate.upgradeTo([newImplementation] as const, options) as Promise<void>;
3410
+ },
3411
+ /**
3412
+ * Simulate upgradeToAndCall
3413
+ * Returns gas estimate and result without sending transaction
3414
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3415
+ */
3416
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
3417
+ accessList?: import('viem').AccessList;
3418
+ authorizationList?: import('viem').AuthorizationList;
3419
+ chain?: import('viem').Chain | null;
3420
+ dataSuffix?: `0x${string}`;
3421
+ gas?: bigint;
3422
+ gasPrice?: bigint;
3423
+ maxFeePerGas?: bigint;
3424
+ maxPriorityFeePerGas?: bigint;
3425
+ nonce?: number;
3426
+ value?: bigint;
3427
+ }): Promise<void> {
3428
+ return contract.simulate.upgradeToAndCall([newImplementation, data] as const, options) as Promise<void>;
3429
+ }
3430
+ };
3431
+ }
3432
+
3433
+ /**
3434
+ * Watch contract events
3435
+ *
3436
+ * @example
3437
+ * // Watch all Transfer events
3438
+ * const unwatch = contract.watch.Transfer((event) => {
3439
+ * console.log('Transfer:', event);
3440
+ * });
3441
+ *
3442
+ * // Stop watching
3443
+ * unwatch();
3444
+ */
3445
+ get watch() {
3446
+ return {
3447
+ /**
3448
+ * Watch AdminChanged events
3449
+ * @param callback Function to call when event is emitted
3450
+ * @param filter Optional filter for indexed parameters
3451
+ * @returns Unwatch function to stop listening
3452
+ */
3453
+ AdminChanged: (callback: (event: { previousAdmin: `0x${string}`; newAdmin: `0x${string}` }) => void) => {
3454
+ return this.publicClient.watchContractEvent({
3455
+ address: this.contractAddress,
3456
+ abi: DistributionCreatorAbi,
3457
+ eventName: 'AdminChanged',
3458
+
3459
+ onLogs: (logs: any[]) => {
3460
+ logs.forEach((log: any) => {
3461
+ callback(log.args as any);
3462
+ });
3463
+ },
3464
+ }) as () => void;
3465
+ },
3466
+ /**
3467
+ * Watch BeaconUpgraded events
3468
+ * @param callback Function to call when event is emitted
3469
+ * @param filter Optional filter for indexed parameters
3470
+ * @returns Unwatch function to stop listening
3471
+ */
3472
+ BeaconUpgraded: (callback: (event: { beacon: `0x${string}` }) => void, filter?: { beacon?: `0x${string}` | `0x${string}`[] | null }) => {
3473
+ return this.publicClient.watchContractEvent({
3474
+ address: this.contractAddress,
3475
+ abi: DistributionCreatorAbi,
3476
+ eventName: 'BeaconUpgraded',
3477
+ args: filter as any,
3478
+ onLogs: (logs: any[]) => {
3479
+ logs.forEach((log: any) => {
3480
+ callback(log.args as any);
3481
+ });
3482
+ },
3483
+ }) as () => void;
3484
+ },
3485
+ /**
3486
+ * Watch CampaignOperatorToggled events
3487
+ * @param callback Function to call when event is emitted
3488
+ * @param filter Optional filter for indexed parameters
3489
+ * @returns Unwatch function to stop listening
3490
+ */
3491
+ CampaignOperatorToggled: (callback: (event: { user: `0x${string}`; operator: `0x${string}`; isWhitelisted: boolean }) => void, filter?: { user?: `0x${string}` | `0x${string}`[] | null; operator?: `0x${string}` | `0x${string}`[] | null }) => {
3492
+ return this.publicClient.watchContractEvent({
3493
+ address: this.contractAddress,
3494
+ abi: DistributionCreatorAbi,
3495
+ eventName: 'CampaignOperatorToggled',
3496
+ args: filter as any,
3497
+ onLogs: (logs: any[]) => {
3498
+ logs.forEach((log: any) => {
3499
+ callback(log.args as any);
3500
+ });
3501
+ },
3502
+ }) as () => void;
3503
+ },
3504
+ /**
3505
+ * Watch CampaignOverride events
3506
+ * @param callback Function to call when event is emitted
3507
+ * @param filter Optional filter for indexed parameters
3508
+ * @returns Unwatch function to stop listening
3509
+ */
3510
+ CampaignOverride: (callback: (event: { _campaignId: `0x${string}`; campaign: CampaignParameters }) => void) => {
3511
+ return this.publicClient.watchContractEvent({
3512
+ address: this.contractAddress,
3513
+ abi: DistributionCreatorAbi,
3514
+ eventName: 'CampaignOverride',
3515
+
3516
+ onLogs: (logs: any[]) => {
3517
+ logs.forEach((log: any) => {
3518
+ callback(log.args as any);
3519
+ });
3520
+ },
3521
+ }) as () => void;
3522
+ },
3523
+ /**
3524
+ * Watch CampaignReallocation events
3525
+ * @param callback Function to call when event is emitted
3526
+ * @param filter Optional filter for indexed parameters
3527
+ * @returns Unwatch function to stop listening
3528
+ */
3529
+ CampaignReallocation: (callback: (event: { _campaignId: `0x${string}`; from: `0x${string}`[]; to: `0x${string}` }) => void, filter?: { to?: `0x${string}` | `0x${string}`[] | null }) => {
3530
+ return this.publicClient.watchContractEvent({
3531
+ address: this.contractAddress,
3532
+ abi: DistributionCreatorAbi,
3533
+ eventName: 'CampaignReallocation',
3534
+ args: filter as any,
3535
+ onLogs: (logs: any[]) => {
3536
+ logs.forEach((log: any) => {
3537
+ callback(log.args as any);
3538
+ });
3539
+ },
3540
+ }) as () => void;
3541
+ },
3542
+ /**
3543
+ * Watch CampaignSpecificFeesSet events
3544
+ * @param callback Function to call when event is emitted
3545
+ * @param filter Optional filter for indexed parameters
3546
+ * @returns Unwatch function to stop listening
3547
+ */
3548
+ CampaignSpecificFeesSet: (callback: (event: { campaignType: bigint; _fees: bigint }) => void) => {
3549
+ return this.publicClient.watchContractEvent({
3550
+ address: this.contractAddress,
3551
+ abi: DistributionCreatorAbi,
3552
+ eventName: 'CampaignSpecificFeesSet',
3553
+
3554
+ onLogs: (logs: any[]) => {
3555
+ logs.forEach((log: any) => {
3556
+ callback(log.args as any);
3557
+ });
3558
+ },
3559
+ }) as () => void;
3560
+ },
3561
+ /**
3562
+ * Watch ConditionsAccepted events
3563
+ * @param callback Function to call when event is emitted
3564
+ * @param filter Optional filter for indexed parameters
3565
+ * @returns Unwatch function to stop listening
3566
+ */
3567
+ ConditionsAccepted: (callback: (event: { user: `0x${string}`; conditionsHash: `0x${string}` }) => void, filter?: { user?: `0x${string}` | `0x${string}`[] | null }) => {
3568
+ return this.publicClient.watchContractEvent({
3569
+ address: this.contractAddress,
3570
+ abi: DistributionCreatorAbi,
3571
+ eventName: 'ConditionsAccepted',
3572
+ args: filter as any,
3573
+ onLogs: (logs: any[]) => {
3574
+ logs.forEach((log: any) => {
3575
+ callback(log.args as any);
3576
+ });
3577
+ },
3578
+ }) as () => void;
3579
+ },
3580
+ /**
3581
+ * Watch CreatorAllowanceUpdated events
3582
+ * @param callback Function to call when event is emitted
3583
+ * @param filter Optional filter for indexed parameters
3584
+ * @returns Unwatch function to stop listening
3585
+ */
3586
+ CreatorAllowanceUpdated: (callback: (event: { user: `0x${string}`; operator: `0x${string}`; token: `0x${string}`; amount: bigint }) => void, filter?: { user?: `0x${string}` | `0x${string}`[] | null; operator?: `0x${string}` | `0x${string}`[] | null; token?: `0x${string}` | `0x${string}`[] | null }) => {
3587
+ return this.publicClient.watchContractEvent({
3588
+ address: this.contractAddress,
3589
+ abi: DistributionCreatorAbi,
3590
+ eventName: 'CreatorAllowanceUpdated',
3591
+ args: filter as any,
3592
+ onLogs: (logs: any[]) => {
3593
+ logs.forEach((log: any) => {
3594
+ callback(log.args as any);
3595
+ });
3596
+ },
3597
+ }) as () => void;
3598
+ },
3599
+ /**
3600
+ * Watch CreatorBalanceUpdated events
3601
+ * @param callback Function to call when event is emitted
3602
+ * @param filter Optional filter for indexed parameters
3603
+ * @returns Unwatch function to stop listening
3604
+ */
3605
+ CreatorBalanceUpdated: (callback: (event: { user: `0x${string}`; token: `0x${string}`; amount: bigint }) => void, filter?: { user?: `0x${string}` | `0x${string}`[] | null; token?: `0x${string}` | `0x${string}`[] | null }) => {
3606
+ return this.publicClient.watchContractEvent({
3607
+ address: this.contractAddress,
3608
+ abi: DistributionCreatorAbi,
3609
+ eventName: 'CreatorBalanceUpdated',
3610
+ args: filter as any,
3611
+ onLogs: (logs: any[]) => {
3612
+ logs.forEach((log: any) => {
3613
+ callback(log.args as any);
3614
+ });
3615
+ },
3616
+ }) as () => void;
3617
+ },
3618
+ /**
3619
+ * Watch DistributorUpdated events
3620
+ * @param callback Function to call when event is emitted
3621
+ * @param filter Optional filter for indexed parameters
3622
+ * @returns Unwatch function to stop listening
3623
+ */
3624
+ DistributorUpdated: (callback: (event: { _distributor: `0x${string}` }) => void, filter?: { _distributor?: `0x${string}` | `0x${string}`[] | null }) => {
3625
+ return this.publicClient.watchContractEvent({
3626
+ address: this.contractAddress,
3627
+ abi: DistributionCreatorAbi,
3628
+ eventName: 'DistributorUpdated',
3629
+ args: filter as any,
3630
+ onLogs: (logs: any[]) => {
3631
+ logs.forEach((log: any) => {
3632
+ callback(log.args as any);
3633
+ });
3634
+ },
3635
+ }) as () => void;
3636
+ },
3637
+ /**
3638
+ * Watch FeeRebateUpdated events
3639
+ * @param callback Function to call when event is emitted
3640
+ * @param filter Optional filter for indexed parameters
3641
+ * @returns Unwatch function to stop listening
3642
+ */
3643
+ FeeRebateUpdated: (callback: (event: { user: `0x${string}`; userFeeRebate: bigint }) => void, filter?: { user?: `0x${string}` | `0x${string}`[] | null }) => {
3644
+ return this.publicClient.watchContractEvent({
3645
+ address: this.contractAddress,
3646
+ abi: DistributionCreatorAbi,
3647
+ eventName: 'FeeRebateUpdated',
3648
+ args: filter as any,
3649
+ onLogs: (logs: any[]) => {
3650
+ logs.forEach((log: any) => {
3651
+ callback(log.args as any);
3652
+ });
3653
+ },
3654
+ }) as () => void;
3655
+ },
3656
+ /**
3657
+ * Watch FeeRecipientUpdated events
3658
+ * @param callback Function to call when event is emitted
3659
+ * @param filter Optional filter for indexed parameters
3660
+ * @returns Unwatch function to stop listening
3661
+ */
3662
+ FeeRecipientUpdated: (callback: (event: { _feeRecipient: `0x${string}` }) => void, filter?: { _feeRecipient?: `0x${string}` | `0x${string}`[] | null }) => {
3663
+ return this.publicClient.watchContractEvent({
3664
+ address: this.contractAddress,
3665
+ abi: DistributionCreatorAbi,
3666
+ eventName: 'FeeRecipientUpdated',
3667
+ args: filter as any,
3668
+ onLogs: (logs: any[]) => {
3669
+ logs.forEach((log: any) => {
3670
+ callback(log.args as any);
3671
+ });
3672
+ },
3673
+ }) as () => void;
3674
+ },
3675
+ /**
3676
+ * Watch FeesSet events
3677
+ * @param callback Function to call when event is emitted
3678
+ * @param filter Optional filter for indexed parameters
3679
+ * @returns Unwatch function to stop listening
3680
+ */
3681
+ FeesSet: (callback: (event: { _fees: bigint }) => void) => {
3682
+ return this.publicClient.watchContractEvent({
3683
+ address: this.contractAddress,
3684
+ abi: DistributionCreatorAbi,
3685
+ eventName: 'FeesSet',
3686
+
3687
+ onLogs: (logs: any[]) => {
3688
+ logs.forEach((log: any) => {
3689
+ callback(log.args as any);
3690
+ });
3691
+ },
3692
+ }) as () => void;
3693
+ },
3694
+ /**
3695
+ * Watch Initialized events
3696
+ * @param callback Function to call when event is emitted
3697
+ * @param filter Optional filter for indexed parameters
3698
+ * @returns Unwatch function to stop listening
3699
+ */
3700
+ Initialized: (callback: (event: { version: bigint }) => void) => {
3701
+ return this.publicClient.watchContractEvent({
3702
+ address: this.contractAddress,
3703
+ abi: DistributionCreatorAbi,
3704
+ eventName: 'Initialized',
3705
+
3706
+ onLogs: (logs: any[]) => {
3707
+ logs.forEach((log: any) => {
3708
+ callback(log.args as any);
3709
+ });
3710
+ },
3711
+ }) as () => void;
3712
+ },
3713
+ /**
3714
+ * Watch MessageUpdated events
3715
+ * @param callback Function to call when event is emitted
3716
+ * @param filter Optional filter for indexed parameters
3717
+ * @returns Unwatch function to stop listening
3718
+ */
3719
+ MessageUpdated: (callback: (event: { _messageHash: `0x${string}` }) => void) => {
3720
+ return this.publicClient.watchContractEvent({
3721
+ address: this.contractAddress,
3722
+ abi: DistributionCreatorAbi,
3723
+ eventName: 'MessageUpdated',
3724
+
3725
+ onLogs: (logs: any[]) => {
3726
+ logs.forEach((log: any) => {
3727
+ callback(log.args as any);
3728
+ });
3729
+ },
3730
+ }) as () => void;
3731
+ },
3732
+ /**
3733
+ * Watch NewCampaign events
3734
+ * @param callback Function to call when event is emitted
3735
+ * @param filter Optional filter for indexed parameters
3736
+ * @returns Unwatch function to stop listening
3737
+ */
3738
+ NewCampaign: (callback: (event: { campaign: CampaignParameters }) => void) => {
3739
+ return this.publicClient.watchContractEvent({
3740
+ address: this.contractAddress,
3741
+ abi: DistributionCreatorAbi,
3742
+ eventName: 'NewCampaign',
3743
+
3744
+ onLogs: (logs: any[]) => {
3745
+ logs.forEach((log: any) => {
3746
+ callback(log.args as any);
3747
+ });
3748
+ },
3749
+ }) as () => void;
3750
+ },
3751
+ /**
3752
+ * Watch RewardTokenMinimumAmountUpdated events
3753
+ * @param callback Function to call when event is emitted
3754
+ * @param filter Optional filter for indexed parameters
3755
+ * @returns Unwatch function to stop listening
3756
+ */
3757
+ RewardTokenMinimumAmountUpdated: (callback: (event: { token: `0x${string}`; amount: bigint }) => void, filter?: { token?: `0x${string}` | `0x${string}`[] | null }) => {
3758
+ return this.publicClient.watchContractEvent({
3759
+ address: this.contractAddress,
3760
+ abi: DistributionCreatorAbi,
3761
+ eventName: 'RewardTokenMinimumAmountUpdated',
3762
+ args: filter as any,
3763
+ onLogs: (logs: any[]) => {
3764
+ logs.forEach((log: any) => {
3765
+ callback(log.args as any);
3766
+ });
3767
+ },
3768
+ }) as () => void;
3769
+ },
3770
+ /**
3771
+ * Watch Upgraded events
3772
+ * @param callback Function to call when event is emitted
3773
+ * @param filter Optional filter for indexed parameters
3774
+ * @returns Unwatch function to stop listening
3775
+ */
3776
+ Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation?: `0x${string}` | `0x${string}`[] | null }) => {
3777
+ return this.publicClient.watchContractEvent({
3778
+ address: this.contractAddress,
3779
+ abi: DistributionCreatorAbi,
3780
+ eventName: 'Upgraded',
3781
+ args: filter as any,
3782
+ onLogs: (logs: any[]) => {
3783
+ logs.forEach((log: any) => {
3784
+ callback(log.args as any);
3785
+ });
3786
+ },
3787
+ }) as () => void;
3788
+ },
3789
+ /**
3790
+ * Watch UserSigningWhitelistToggled events
3791
+ * @param callback Function to call when event is emitted
3792
+ * @param filter Optional filter for indexed parameters
3793
+ * @returns Unwatch function to stop listening
3794
+ */
3795
+ UserSigningWhitelistToggled: (callback: (event: { user: `0x${string}`; toggleStatus: bigint }) => void, filter?: { user?: `0x${string}` | `0x${string}`[] | null }) => {
3796
+ return this.publicClient.watchContractEvent({
3797
+ address: this.contractAddress,
3798
+ abi: DistributionCreatorAbi,
3799
+ eventName: 'UserSigningWhitelistToggled',
3800
+ args: filter as any,
3801
+ onLogs: (logs: any[]) => {
3802
+ logs.forEach((log: any) => {
3803
+ callback(log.args as any);
3804
+ });
3805
+ },
3806
+ }) as () => void;
3807
+ }
3808
+ };
3809
+ }
3810
+ }