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