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