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