@gitmyabi/nftfundraisecollection 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,1767 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * NftFundRaiseCollection_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const NftFundRaiseCollection_jsonAbi = [
10
+ {
11
+ "inputs": [
12
+ {
13
+ "internalType": "address",
14
+ "name": "initialOwner",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "internalType": "address",
19
+ "name": "usdtAddr",
20
+ "type": "address"
21
+ }
22
+ ],
23
+ "stateMutability": "nonpayable",
24
+ "type": "constructor"
25
+ },
26
+ {
27
+ "inputs": [
28
+ {
29
+ "internalType": "address",
30
+ "name": "sender",
31
+ "type": "address"
32
+ },
33
+ {
34
+ "internalType": "uint256",
35
+ "name": "balance",
36
+ "type": "uint256"
37
+ },
38
+ {
39
+ "internalType": "uint256",
40
+ "name": "needed",
41
+ "type": "uint256"
42
+ },
43
+ {
44
+ "internalType": "uint256",
45
+ "name": "tokenId",
46
+ "type": "uint256"
47
+ }
48
+ ],
49
+ "name": "ERC1155InsufficientBalance",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "inputs": [
54
+ {
55
+ "internalType": "address",
56
+ "name": "approver",
57
+ "type": "address"
58
+ }
59
+ ],
60
+ "name": "ERC1155InvalidApprover",
61
+ "type": "error"
62
+ },
63
+ {
64
+ "inputs": [
65
+ {
66
+ "internalType": "uint256",
67
+ "name": "idsLength",
68
+ "type": "uint256"
69
+ },
70
+ {
71
+ "internalType": "uint256",
72
+ "name": "valuesLength",
73
+ "type": "uint256"
74
+ }
75
+ ],
76
+ "name": "ERC1155InvalidArrayLength",
77
+ "type": "error"
78
+ },
79
+ {
80
+ "inputs": [
81
+ {
82
+ "internalType": "address",
83
+ "name": "operator",
84
+ "type": "address"
85
+ }
86
+ ],
87
+ "name": "ERC1155InvalidOperator",
88
+ "type": "error"
89
+ },
90
+ {
91
+ "inputs": [
92
+ {
93
+ "internalType": "address",
94
+ "name": "receiver",
95
+ "type": "address"
96
+ }
97
+ ],
98
+ "name": "ERC1155InvalidReceiver",
99
+ "type": "error"
100
+ },
101
+ {
102
+ "inputs": [
103
+ {
104
+ "internalType": "address",
105
+ "name": "sender",
106
+ "type": "address"
107
+ }
108
+ ],
109
+ "name": "ERC1155InvalidSender",
110
+ "type": "error"
111
+ },
112
+ {
113
+ "inputs": [
114
+ {
115
+ "internalType": "address",
116
+ "name": "operator",
117
+ "type": "address"
118
+ },
119
+ {
120
+ "internalType": "address",
121
+ "name": "owner",
122
+ "type": "address"
123
+ }
124
+ ],
125
+ "name": "ERC1155MissingApprovalForAll",
126
+ "type": "error"
127
+ },
128
+ {
129
+ "inputs": [
130
+ {
131
+ "internalType": "address",
132
+ "name": "owner",
133
+ "type": "address"
134
+ }
135
+ ],
136
+ "name": "OwnableInvalidOwner",
137
+ "type": "error"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "internalType": "address",
143
+ "name": "account",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "name": "OwnableUnauthorizedAccount",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [],
152
+ "name": "ReentrancyGuardReentrantCall",
153
+ "type": "error"
154
+ },
155
+ {
156
+ "inputs": [
157
+ {
158
+ "internalType": "address",
159
+ "name": "token",
160
+ "type": "address"
161
+ }
162
+ ],
163
+ "name": "SafeERC20FailedOperation",
164
+ "type": "error"
165
+ },
166
+ {
167
+ "anonymous": false,
168
+ "inputs": [
169
+ {
170
+ "indexed": true,
171
+ "internalType": "address",
172
+ "name": "account",
173
+ "type": "address"
174
+ },
175
+ {
176
+ "indexed": true,
177
+ "internalType": "address",
178
+ "name": "operator",
179
+ "type": "address"
180
+ },
181
+ {
182
+ "indexed": false,
183
+ "internalType": "bool",
184
+ "name": "approved",
185
+ "type": "bool"
186
+ }
187
+ ],
188
+ "name": "ApprovalForAll",
189
+ "type": "event"
190
+ },
191
+ {
192
+ "anonymous": false,
193
+ "inputs": [
194
+ {
195
+ "indexed": false,
196
+ "internalType": "uint256",
197
+ "name": "roundId",
198
+ "type": "uint256"
199
+ },
200
+ {
201
+ "indexed": false,
202
+ "internalType": "uint128",
203
+ "name": "startTime",
204
+ "type": "uint128"
205
+ },
206
+ {
207
+ "indexed": false,
208
+ "internalType": "uint128",
209
+ "name": "endTime",
210
+ "type": "uint128"
211
+ },
212
+ {
213
+ "indexed": false,
214
+ "internalType": "uint256",
215
+ "name": "usdtPerNft",
216
+ "type": "uint256"
217
+ }
218
+ ],
219
+ "name": "ClaimRoundCreated",
220
+ "type": "event"
221
+ },
222
+ {
223
+ "anonymous": false,
224
+ "inputs": [
225
+ {
226
+ "indexed": false,
227
+ "internalType": "uint256",
228
+ "name": "roundId",
229
+ "type": "uint256"
230
+ },
231
+ {
232
+ "indexed": false,
233
+ "internalType": "address",
234
+ "name": "account",
235
+ "type": "address"
236
+ },
237
+ {
238
+ "indexed": false,
239
+ "internalType": "uint256",
240
+ "name": "tokenId",
241
+ "type": "uint256"
242
+ },
243
+ {
244
+ "indexed": false,
245
+ "internalType": "uint256",
246
+ "name": "amount",
247
+ "type": "uint256"
248
+ }
249
+ ],
250
+ "name": "Claimed",
251
+ "type": "event"
252
+ },
253
+ {
254
+ "anonymous": false,
255
+ "inputs": [
256
+ {
257
+ "indexed": true,
258
+ "internalType": "address",
259
+ "name": "previousOwner",
260
+ "type": "address"
261
+ },
262
+ {
263
+ "indexed": true,
264
+ "internalType": "address",
265
+ "name": "newOwner",
266
+ "type": "address"
267
+ }
268
+ ],
269
+ "name": "OwnershipTransferred",
270
+ "type": "event"
271
+ },
272
+ {
273
+ "anonymous": false,
274
+ "inputs": [
275
+ {
276
+ "indexed": true,
277
+ "internalType": "address",
278
+ "name": "operator",
279
+ "type": "address"
280
+ },
281
+ {
282
+ "indexed": true,
283
+ "internalType": "address",
284
+ "name": "from",
285
+ "type": "address"
286
+ },
287
+ {
288
+ "indexed": true,
289
+ "internalType": "address",
290
+ "name": "to",
291
+ "type": "address"
292
+ },
293
+ {
294
+ "indexed": false,
295
+ "internalType": "uint256[]",
296
+ "name": "ids",
297
+ "type": "uint256[]"
298
+ },
299
+ {
300
+ "indexed": false,
301
+ "internalType": "uint256[]",
302
+ "name": "values",
303
+ "type": "uint256[]"
304
+ }
305
+ ],
306
+ "name": "TransferBatch",
307
+ "type": "event"
308
+ },
309
+ {
310
+ "anonymous": false,
311
+ "inputs": [
312
+ {
313
+ "indexed": true,
314
+ "internalType": "address",
315
+ "name": "operator",
316
+ "type": "address"
317
+ },
318
+ {
319
+ "indexed": true,
320
+ "internalType": "address",
321
+ "name": "from",
322
+ "type": "address"
323
+ },
324
+ {
325
+ "indexed": true,
326
+ "internalType": "address",
327
+ "name": "to",
328
+ "type": "address"
329
+ },
330
+ {
331
+ "indexed": false,
332
+ "internalType": "uint256",
333
+ "name": "id",
334
+ "type": "uint256"
335
+ },
336
+ {
337
+ "indexed": false,
338
+ "internalType": "uint256",
339
+ "name": "value",
340
+ "type": "uint256"
341
+ }
342
+ ],
343
+ "name": "TransferSingle",
344
+ "type": "event"
345
+ },
346
+ {
347
+ "anonymous": false,
348
+ "inputs": [
349
+ {
350
+ "indexed": false,
351
+ "internalType": "string",
352
+ "name": "value",
353
+ "type": "string"
354
+ },
355
+ {
356
+ "indexed": true,
357
+ "internalType": "uint256",
358
+ "name": "id",
359
+ "type": "uint256"
360
+ }
361
+ ],
362
+ "name": "URI",
363
+ "type": "event"
364
+ },
365
+ {
366
+ "inputs": [
367
+ {
368
+ "internalType": "uint128",
369
+ "name": "startTime",
370
+ "type": "uint128"
371
+ },
372
+ {
373
+ "internalType": "uint256",
374
+ "name": "usdtAmountPerNft",
375
+ "type": "uint256"
376
+ }
377
+ ],
378
+ "name": "addClaimRound",
379
+ "outputs": [],
380
+ "stateMutability": "nonpayable",
381
+ "type": "function"
382
+ },
383
+ {
384
+ "inputs": [
385
+ {
386
+ "internalType": "address",
387
+ "name": "newAddress",
388
+ "type": "address"
389
+ }
390
+ ],
391
+ "name": "addTransferAllowedAddress",
392
+ "outputs": [],
393
+ "stateMutability": "nonpayable",
394
+ "type": "function"
395
+ },
396
+ {
397
+ "inputs": [
398
+ {
399
+ "internalType": "uint256",
400
+ "name": "roundId",
401
+ "type": "uint256"
402
+ },
403
+ {
404
+ "internalType": "uint256",
405
+ "name": "tokenId",
406
+ "type": "uint256"
407
+ },
408
+ {
409
+ "internalType": "address",
410
+ "name": "acct",
411
+ "type": "address"
412
+ }
413
+ ],
414
+ "name": "alreadyClaimedInRound",
415
+ "outputs": [
416
+ {
417
+ "internalType": "uint256",
418
+ "name": "",
419
+ "type": "uint256"
420
+ }
421
+ ],
422
+ "stateMutability": "view",
423
+ "type": "function"
424
+ },
425
+ {
426
+ "inputs": [
427
+ {
428
+ "internalType": "address",
429
+ "name": "account",
430
+ "type": "address"
431
+ },
432
+ {
433
+ "internalType": "uint256",
434
+ "name": "id",
435
+ "type": "uint256"
436
+ }
437
+ ],
438
+ "name": "balanceOf",
439
+ "outputs": [
440
+ {
441
+ "internalType": "uint256",
442
+ "name": "",
443
+ "type": "uint256"
444
+ }
445
+ ],
446
+ "stateMutability": "view",
447
+ "type": "function"
448
+ },
449
+ {
450
+ "inputs": [
451
+ {
452
+ "internalType": "address[]",
453
+ "name": "accounts",
454
+ "type": "address[]"
455
+ },
456
+ {
457
+ "internalType": "uint256[]",
458
+ "name": "ids",
459
+ "type": "uint256[]"
460
+ }
461
+ ],
462
+ "name": "balanceOfBatch",
463
+ "outputs": [
464
+ {
465
+ "internalType": "uint256[]",
466
+ "name": "",
467
+ "type": "uint256[]"
468
+ }
469
+ ],
470
+ "stateMutability": "view",
471
+ "type": "function"
472
+ },
473
+ {
474
+ "inputs": [
475
+ {
476
+ "internalType": "uint256",
477
+ "name": "roundId",
478
+ "type": "uint256"
479
+ },
480
+ {
481
+ "internalType": "uint256[]",
482
+ "name": "tokenIds",
483
+ "type": "uint256[]"
484
+ }
485
+ ],
486
+ "name": "batchOwnerClaim",
487
+ "outputs": [],
488
+ "stateMutability": "nonpayable",
489
+ "type": "function"
490
+ },
491
+ {
492
+ "inputs": [
493
+ {
494
+ "internalType": "address",
495
+ "name": "to",
496
+ "type": "address"
497
+ },
498
+ {
499
+ "internalType": "uint256[]",
500
+ "name": "ids",
501
+ "type": "uint256[]"
502
+ },
503
+ {
504
+ "internalType": "uint256[]",
505
+ "name": "amounts",
506
+ "type": "uint256[]"
507
+ }
508
+ ],
509
+ "name": "batchTokenMint",
510
+ "outputs": [],
511
+ "stateMutability": "nonpayable",
512
+ "type": "function"
513
+ },
514
+ {
515
+ "inputs": [],
516
+ "name": "claimRound",
517
+ "outputs": [
518
+ {
519
+ "internalType": "uint256",
520
+ "name": "",
521
+ "type": "uint256"
522
+ }
523
+ ],
524
+ "stateMutability": "view",
525
+ "type": "function"
526
+ },
527
+ {
528
+ "inputs": [
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "",
532
+ "type": "uint256"
533
+ }
534
+ ],
535
+ "name": "claimRounds",
536
+ "outputs": [
537
+ {
538
+ "internalType": "uint128",
539
+ "name": "startTime",
540
+ "type": "uint128"
541
+ },
542
+ {
543
+ "internalType": "uint128",
544
+ "name": "endTime",
545
+ "type": "uint128"
546
+ },
547
+ {
548
+ "internalType": "uint256",
549
+ "name": "usdtAmountPerNft",
550
+ "type": "uint256"
551
+ },
552
+ {
553
+ "internalType": "uint16",
554
+ "name": "maxMintsPerToken",
555
+ "type": "uint16"
556
+ },
557
+ {
558
+ "internalType": "bool",
559
+ "name": "isEnabled",
560
+ "type": "bool"
561
+ }
562
+ ],
563
+ "stateMutability": "view",
564
+ "type": "function"
565
+ },
566
+ {
567
+ "inputs": [
568
+ {
569
+ "internalType": "uint256",
570
+ "name": "id",
571
+ "type": "uint256"
572
+ },
573
+ {
574
+ "internalType": "uint256",
575
+ "name": "amount",
576
+ "type": "uint256"
577
+ }
578
+ ],
579
+ "name": "claimTokens",
580
+ "outputs": [],
581
+ "stateMutability": "nonpayable",
582
+ "type": "function"
583
+ },
584
+ {
585
+ "inputs": [
586
+ {
587
+ "internalType": "uint256",
588
+ "name": "",
589
+ "type": "uint256"
590
+ },
591
+ {
592
+ "internalType": "uint256",
593
+ "name": "",
594
+ "type": "uint256"
595
+ },
596
+ {
597
+ "internalType": "address",
598
+ "name": "",
599
+ "type": "address"
600
+ }
601
+ ],
602
+ "name": "claimedPerRound",
603
+ "outputs": [
604
+ {
605
+ "internalType": "uint256",
606
+ "name": "",
607
+ "type": "uint256"
608
+ }
609
+ ],
610
+ "stateMutability": "view",
611
+ "type": "function"
612
+ },
613
+ {
614
+ "inputs": [],
615
+ "name": "deployer",
616
+ "outputs": [
617
+ {
618
+ "internalType": "address",
619
+ "name": "",
620
+ "type": "address"
621
+ }
622
+ ],
623
+ "stateMutability": "view",
624
+ "type": "function"
625
+ },
626
+ {
627
+ "inputs": [
628
+ {
629
+ "internalType": "address",
630
+ "name": "account",
631
+ "type": "address"
632
+ },
633
+ {
634
+ "internalType": "address",
635
+ "name": "operator",
636
+ "type": "address"
637
+ }
638
+ ],
639
+ "name": "isApprovedForAll",
640
+ "outputs": [
641
+ {
642
+ "internalType": "bool",
643
+ "name": "",
644
+ "type": "bool"
645
+ }
646
+ ],
647
+ "stateMutability": "view",
648
+ "type": "function"
649
+ },
650
+ {
651
+ "inputs": [
652
+ {
653
+ "internalType": "uint256",
654
+ "name": "",
655
+ "type": "uint256"
656
+ },
657
+ {
658
+ "internalType": "uint256",
659
+ "name": "",
660
+ "type": "uint256"
661
+ }
662
+ ],
663
+ "name": "mintedInRound",
664
+ "outputs": [
665
+ {
666
+ "internalType": "uint256",
667
+ "name": "",
668
+ "type": "uint256"
669
+ }
670
+ ],
671
+ "stateMutability": "view",
672
+ "type": "function"
673
+ },
674
+ {
675
+ "inputs": [
676
+ {
677
+ "internalType": "uint256",
678
+ "name": "roundId",
679
+ "type": "uint256"
680
+ },
681
+ {
682
+ "internalType": "uint256",
683
+ "name": "tokenId",
684
+ "type": "uint256"
685
+ }
686
+ ],
687
+ "name": "mintedInRoundFor",
688
+ "outputs": [
689
+ {
690
+ "internalType": "uint256",
691
+ "name": "",
692
+ "type": "uint256"
693
+ }
694
+ ],
695
+ "stateMutability": "view",
696
+ "type": "function"
697
+ },
698
+ {
699
+ "inputs": [],
700
+ "name": "orderBookAddress",
701
+ "outputs": [
702
+ {
703
+ "internalType": "address",
704
+ "name": "",
705
+ "type": "address"
706
+ }
707
+ ],
708
+ "stateMutability": "view",
709
+ "type": "function"
710
+ },
711
+ {
712
+ "inputs": [],
713
+ "name": "owner",
714
+ "outputs": [
715
+ {
716
+ "internalType": "address",
717
+ "name": "",
718
+ "type": "address"
719
+ }
720
+ ],
721
+ "stateMutability": "view",
722
+ "type": "function"
723
+ },
724
+ {
725
+ "inputs": [],
726
+ "name": "ownershipFlag",
727
+ "outputs": [
728
+ {
729
+ "internalType": "bool",
730
+ "name": "",
731
+ "type": "bool"
732
+ }
733
+ ],
734
+ "stateMutability": "view",
735
+ "type": "function"
736
+ },
737
+ {
738
+ "inputs": [],
739
+ "name": "renounceDeployer",
740
+ "outputs": [],
741
+ "stateMutability": "nonpayable",
742
+ "type": "function"
743
+ },
744
+ {
745
+ "inputs": [],
746
+ "name": "renounceOwnership",
747
+ "outputs": [],
748
+ "stateMutability": "pure",
749
+ "type": "function"
750
+ },
751
+ {
752
+ "inputs": [
753
+ {
754
+ "internalType": "address",
755
+ "name": "from",
756
+ "type": "address"
757
+ },
758
+ {
759
+ "internalType": "address",
760
+ "name": "to",
761
+ "type": "address"
762
+ },
763
+ {
764
+ "internalType": "uint256[]",
765
+ "name": "ids",
766
+ "type": "uint256[]"
767
+ },
768
+ {
769
+ "internalType": "uint256[]",
770
+ "name": "values",
771
+ "type": "uint256[]"
772
+ },
773
+ {
774
+ "internalType": "bytes",
775
+ "name": "data",
776
+ "type": "bytes"
777
+ }
778
+ ],
779
+ "name": "safeBatchTransferFrom",
780
+ "outputs": [],
781
+ "stateMutability": "nonpayable",
782
+ "type": "function"
783
+ },
784
+ {
785
+ "inputs": [
786
+ {
787
+ "internalType": "address",
788
+ "name": "from",
789
+ "type": "address"
790
+ },
791
+ {
792
+ "internalType": "address",
793
+ "name": "to",
794
+ "type": "address"
795
+ },
796
+ {
797
+ "internalType": "uint256",
798
+ "name": "id",
799
+ "type": "uint256"
800
+ },
801
+ {
802
+ "internalType": "uint256",
803
+ "name": "value",
804
+ "type": "uint256"
805
+ },
806
+ {
807
+ "internalType": "bytes",
808
+ "name": "data",
809
+ "type": "bytes"
810
+ }
811
+ ],
812
+ "name": "safeTransferFrom",
813
+ "outputs": [],
814
+ "stateMutability": "nonpayable",
815
+ "type": "function"
816
+ },
817
+ {
818
+ "inputs": [
819
+ {
820
+ "internalType": "address",
821
+ "name": "operator",
822
+ "type": "address"
823
+ },
824
+ {
825
+ "internalType": "bool",
826
+ "name": "approved",
827
+ "type": "bool"
828
+ }
829
+ ],
830
+ "name": "setApprovalForAll",
831
+ "outputs": [],
832
+ "stateMutability": "nonpayable",
833
+ "type": "function"
834
+ },
835
+ {
836
+ "inputs": [
837
+ {
838
+ "internalType": "uint256[]",
839
+ "name": "ids",
840
+ "type": "uint256[]"
841
+ },
842
+ {
843
+ "internalType": "string[]",
844
+ "name": "uris",
845
+ "type": "string[]"
846
+ }
847
+ ],
848
+ "name": "setURIs",
849
+ "outputs": [],
850
+ "stateMutability": "nonpayable",
851
+ "type": "function"
852
+ },
853
+ {
854
+ "inputs": [
855
+ {
856
+ "internalType": "bytes4",
857
+ "name": "interfaceId",
858
+ "type": "bytes4"
859
+ }
860
+ ],
861
+ "name": "supportsInterface",
862
+ "outputs": [
863
+ {
864
+ "internalType": "bool",
865
+ "name": "",
866
+ "type": "bool"
867
+ }
868
+ ],
869
+ "stateMutability": "view",
870
+ "type": "function"
871
+ },
872
+ {
873
+ "inputs": [
874
+ {
875
+ "internalType": "address",
876
+ "name": "newOwner",
877
+ "type": "address"
878
+ }
879
+ ],
880
+ "name": "transferOwnership",
881
+ "outputs": [],
882
+ "stateMutability": "nonpayable",
883
+ "type": "function"
884
+ },
885
+ {
886
+ "inputs": [
887
+ {
888
+ "internalType": "uint256",
889
+ "name": "id",
890
+ "type": "uint256"
891
+ }
892
+ ],
893
+ "name": "uri",
894
+ "outputs": [
895
+ {
896
+ "internalType": "string",
897
+ "name": "",
898
+ "type": "string"
899
+ }
900
+ ],
901
+ "stateMutability": "view",
902
+ "type": "function"
903
+ },
904
+ {
905
+ "inputs": [],
906
+ "name": "usdtToken",
907
+ "outputs": [
908
+ {
909
+ "internalType": "contract IERC20",
910
+ "name": "",
911
+ "type": "address"
912
+ }
913
+ ],
914
+ "stateMutability": "view",
915
+ "type": "function"
916
+ }
917
+ ] as const satisfies Abi;
918
+
919
+ /**
920
+ * Type-safe ABI for NftFundRaiseCollection_json
921
+ */
922
+ export type NftFundRaiseCollection_jsonAbi = typeof NftFundRaiseCollection_jsonAbi;
923
+
924
+ /**
925
+ * Contract instance type for NftFundRaiseCollection_json
926
+ */
927
+ // Use any for contract type to avoid complex viem type issues
928
+ // The runtime behavior is type-safe through viem's ABI typing
929
+ export type NftFundRaiseCollection_jsonContract = any;
930
+
931
+ /**
932
+ * NftFundRaiseCollection_json Contract Class
933
+ *
934
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
935
+ *
936
+ * @example
937
+ * ```typescript
938
+ * import { createPublicClient, createWalletClient, http } from 'viem';
939
+ * import { mainnet } from 'viem/chains';
940
+ * import { NftFundRaiseCollection_json } from 'NftFundRaiseCollection_json';
941
+ *
942
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
943
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
944
+ *
945
+ * const contract = new NftFundRaiseCollection_json('0x...', { publicClient, walletClient });
946
+ *
947
+ * // Read functions
948
+ * const result = await contract.balanceOf('0x...');
949
+ *
950
+ * // Write functions
951
+ * const hash = await contract.transfer('0x...', 1000n);
952
+ *
953
+ * // Simulate transactions (dry-run)
954
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
955
+ * console.log('Gas estimate:', simulation.request.gas);
956
+ *
957
+ * // Watch events
958
+ * const unwatch = contract.watch.Transfer((event) => {
959
+ * console.log('Transfer event:', event);
960
+ * });
961
+ * ```
962
+ */
963
+ export class NftFundRaiseCollection_json {
964
+ private contract: NftFundRaiseCollection_jsonContract;
965
+ private contractAddress: Address;
966
+ private publicClient: PublicClient;
967
+
968
+ constructor(
969
+ address: Address,
970
+ clients: {
971
+ publicClient: PublicClient;
972
+ walletClient?: WalletClient;
973
+ }
974
+ ) {
975
+ this.contractAddress = address;
976
+ this.publicClient = clients.publicClient;
977
+ this.contract = getContract({
978
+ address,
979
+ abi: NftFundRaiseCollection_jsonAbi,
980
+ client: {
981
+ public: clients.publicClient,
982
+ wallet: clients.walletClient,
983
+ },
984
+ });
985
+ }
986
+
987
+ /**
988
+ * Get the contract address
989
+ */
990
+ get address(): Address {
991
+ return this.contractAddress;
992
+ }
993
+
994
+ /**
995
+ * Get the underlying viem contract instance
996
+ */
997
+ getContract(): NftFundRaiseCollection_jsonContract {
998
+ return this.contract;
999
+ }
1000
+
1001
+ /**
1002
+ * alreadyClaimedInRound
1003
+ * view
1004
+ */
1005
+ async alreadyClaimedInRound(roundId: bigint, tokenId: bigint, acct: `0x${string}`): Promise<bigint> {
1006
+ return this.contract.read.alreadyClaimedInRound([roundId, tokenId, acct] as const) as Promise<bigint>;
1007
+ }
1008
+
1009
+ /**
1010
+ * balanceOf
1011
+ * view
1012
+ */
1013
+ async balanceOf(account: `0x${string}`, id: bigint): Promise<bigint> {
1014
+ return this.contract.read.balanceOf([account, id] as const) as Promise<bigint>;
1015
+ }
1016
+
1017
+ /**
1018
+ * balanceOfBatch
1019
+ * view
1020
+ */
1021
+ async balanceOfBatch(accounts: `0x${string}`[], ids: bigint[]): Promise<bigint[]> {
1022
+ return this.contract.read.balanceOfBatch([accounts, ids] as const) as Promise<bigint[]>;
1023
+ }
1024
+
1025
+ /**
1026
+ * claimRound
1027
+ * view
1028
+ */
1029
+ async claimRound(): Promise<bigint> {
1030
+ return this.contract.read.claimRound() as Promise<bigint>;
1031
+ }
1032
+
1033
+ /**
1034
+ * claimRounds
1035
+ * view
1036
+ */
1037
+ async claimRounds(arg0: bigint): Promise<[bigint, bigint, bigint, bigint, boolean]> {
1038
+ return this.contract.read.claimRounds([arg0] as const) as Promise<[bigint, bigint, bigint, bigint, boolean]>;
1039
+ }
1040
+
1041
+ /**
1042
+ * claimedPerRound
1043
+ * view
1044
+ */
1045
+ async claimedPerRound(arg0: bigint, arg1: bigint, arg2: `0x${string}`): Promise<bigint> {
1046
+ return this.contract.read.claimedPerRound([arg0, arg1, arg2] as const) as Promise<bigint>;
1047
+ }
1048
+
1049
+ /**
1050
+ * deployer
1051
+ * view
1052
+ */
1053
+ async deployer(): Promise<`0x${string}`> {
1054
+ return this.contract.read.deployer() as Promise<`0x${string}`>;
1055
+ }
1056
+
1057
+ /**
1058
+ * isApprovedForAll
1059
+ * view
1060
+ */
1061
+ async isApprovedForAll(account: `0x${string}`, operator: `0x${string}`): Promise<boolean> {
1062
+ return this.contract.read.isApprovedForAll([account, operator] as const) as Promise<boolean>;
1063
+ }
1064
+
1065
+ /**
1066
+ * mintedInRound
1067
+ * view
1068
+ */
1069
+ async mintedInRound(arg0: bigint, arg1: bigint): Promise<bigint> {
1070
+ return this.contract.read.mintedInRound([arg0, arg1] as const) as Promise<bigint>;
1071
+ }
1072
+
1073
+ /**
1074
+ * mintedInRoundFor
1075
+ * view
1076
+ */
1077
+ async mintedInRoundFor(roundId: bigint, tokenId: bigint): Promise<bigint> {
1078
+ return this.contract.read.mintedInRoundFor([roundId, tokenId] as const) as Promise<bigint>;
1079
+ }
1080
+
1081
+ /**
1082
+ * orderBookAddress
1083
+ * view
1084
+ */
1085
+ async orderBookAddress(): Promise<`0x${string}`> {
1086
+ return this.contract.read.orderBookAddress() as Promise<`0x${string}`>;
1087
+ }
1088
+
1089
+ /**
1090
+ * owner
1091
+ * view
1092
+ */
1093
+ async owner(): Promise<`0x${string}`> {
1094
+ return this.contract.read.owner() as Promise<`0x${string}`>;
1095
+ }
1096
+
1097
+ /**
1098
+ * ownershipFlag
1099
+ * view
1100
+ */
1101
+ async ownershipFlag(): Promise<boolean> {
1102
+ return this.contract.read.ownershipFlag() as Promise<boolean>;
1103
+ }
1104
+
1105
+ /**
1106
+ * renounceOwnership
1107
+ * pure
1108
+ */
1109
+ async renounceOwnership(): Promise<void> {
1110
+ return this.contract.read.renounceOwnership() as Promise<void>;
1111
+ }
1112
+
1113
+ /**
1114
+ * supportsInterface
1115
+ * view
1116
+ */
1117
+ async supportsInterface(interfaceId: `0x${string}`): Promise<boolean> {
1118
+ return this.contract.read.supportsInterface([interfaceId] as const) as Promise<boolean>;
1119
+ }
1120
+
1121
+ /**
1122
+ * uri
1123
+ * view
1124
+ */
1125
+ async uri(id: bigint): Promise<string> {
1126
+ return this.contract.read.uri([id] as const) as Promise<string>;
1127
+ }
1128
+
1129
+ /**
1130
+ * usdtToken
1131
+ * view
1132
+ */
1133
+ async usdtToken(): Promise<`0x${string}`> {
1134
+ return this.contract.read.usdtToken() as Promise<`0x${string}`>;
1135
+ }
1136
+
1137
+ /**
1138
+ * addClaimRound
1139
+ * nonpayable
1140
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1141
+ */
1142
+ async addClaimRound(startTime: bigint, usdtAmountPerNft: bigint, options?: {
1143
+ accessList?: import('viem').AccessList;
1144
+ authorizationList?: import('viem').AuthorizationList;
1145
+ chain?: import('viem').Chain | null;
1146
+ dataSuffix?: `0x${string}`;
1147
+ gas?: bigint;
1148
+ gasPrice?: bigint;
1149
+ maxFeePerGas?: bigint;
1150
+ maxPriorityFeePerGas?: bigint;
1151
+ nonce?: number;
1152
+ value?: bigint;
1153
+ }): Promise<`0x${string}`> {
1154
+ if (!this.contract.write) {
1155
+ throw new Error('Wallet client is required for write operations');
1156
+ }
1157
+ return this.contract.write.addClaimRound([startTime, usdtAmountPerNft] as const, options) as Promise<`0x${string}`>;
1158
+ }
1159
+
1160
+ /**
1161
+ * addTransferAllowedAddress
1162
+ * nonpayable
1163
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1164
+ */
1165
+ async addTransferAllowedAddress(newAddress: `0x${string}`, options?: {
1166
+ accessList?: import('viem').AccessList;
1167
+ authorizationList?: import('viem').AuthorizationList;
1168
+ chain?: import('viem').Chain | null;
1169
+ dataSuffix?: `0x${string}`;
1170
+ gas?: bigint;
1171
+ gasPrice?: bigint;
1172
+ maxFeePerGas?: bigint;
1173
+ maxPriorityFeePerGas?: bigint;
1174
+ nonce?: number;
1175
+ value?: bigint;
1176
+ }): Promise<`0x${string}`> {
1177
+ if (!this.contract.write) {
1178
+ throw new Error('Wallet client is required for write operations');
1179
+ }
1180
+ return this.contract.write.addTransferAllowedAddress([newAddress] as const, options) as Promise<`0x${string}`>;
1181
+ }
1182
+
1183
+ /**
1184
+ * batchOwnerClaim
1185
+ * nonpayable
1186
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1187
+ */
1188
+ async batchOwnerClaim(roundId: bigint, tokenIds: bigint[], options?: {
1189
+ accessList?: import('viem').AccessList;
1190
+ authorizationList?: import('viem').AuthorizationList;
1191
+ chain?: import('viem').Chain | null;
1192
+ dataSuffix?: `0x${string}`;
1193
+ gas?: bigint;
1194
+ gasPrice?: bigint;
1195
+ maxFeePerGas?: bigint;
1196
+ maxPriorityFeePerGas?: bigint;
1197
+ nonce?: number;
1198
+ value?: bigint;
1199
+ }): Promise<`0x${string}`> {
1200
+ if (!this.contract.write) {
1201
+ throw new Error('Wallet client is required for write operations');
1202
+ }
1203
+ return this.contract.write.batchOwnerClaim([roundId, tokenIds] as const, options) as Promise<`0x${string}`>;
1204
+ }
1205
+
1206
+ /**
1207
+ * batchTokenMint
1208
+ * nonpayable
1209
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1210
+ */
1211
+ async batchTokenMint(to: `0x${string}`, ids: bigint[], amounts: bigint[], options?: {
1212
+ accessList?: import('viem').AccessList;
1213
+ authorizationList?: import('viem').AuthorizationList;
1214
+ chain?: import('viem').Chain | null;
1215
+ dataSuffix?: `0x${string}`;
1216
+ gas?: bigint;
1217
+ gasPrice?: bigint;
1218
+ maxFeePerGas?: bigint;
1219
+ maxPriorityFeePerGas?: bigint;
1220
+ nonce?: number;
1221
+ value?: bigint;
1222
+ }): Promise<`0x${string}`> {
1223
+ if (!this.contract.write) {
1224
+ throw new Error('Wallet client is required for write operations');
1225
+ }
1226
+ return this.contract.write.batchTokenMint([to, ids, amounts] as const, options) as Promise<`0x${string}`>;
1227
+ }
1228
+
1229
+ /**
1230
+ * claimTokens
1231
+ * nonpayable
1232
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1233
+ */
1234
+ async claimTokens(id: bigint, amount: bigint, options?: {
1235
+ accessList?: import('viem').AccessList;
1236
+ authorizationList?: import('viem').AuthorizationList;
1237
+ chain?: import('viem').Chain | null;
1238
+ dataSuffix?: `0x${string}`;
1239
+ gas?: bigint;
1240
+ gasPrice?: bigint;
1241
+ maxFeePerGas?: bigint;
1242
+ maxPriorityFeePerGas?: bigint;
1243
+ nonce?: number;
1244
+ value?: bigint;
1245
+ }): Promise<`0x${string}`> {
1246
+ if (!this.contract.write) {
1247
+ throw new Error('Wallet client is required for write operations');
1248
+ }
1249
+ return this.contract.write.claimTokens([id, amount] as const, options) as Promise<`0x${string}`>;
1250
+ }
1251
+
1252
+ /**
1253
+ * renounceDeployer
1254
+ * nonpayable
1255
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1256
+ */
1257
+ async renounceDeployer(options?: {
1258
+ accessList?: import('viem').AccessList;
1259
+ authorizationList?: import('viem').AuthorizationList;
1260
+ chain?: import('viem').Chain | null;
1261
+ dataSuffix?: `0x${string}`;
1262
+ gas?: bigint;
1263
+ gasPrice?: bigint;
1264
+ maxFeePerGas?: bigint;
1265
+ maxPriorityFeePerGas?: bigint;
1266
+ nonce?: number;
1267
+ value?: bigint;
1268
+ }): Promise<`0x${string}`> {
1269
+ if (!this.contract.write) {
1270
+ throw new Error('Wallet client is required for write operations');
1271
+ }
1272
+ return this.contract.write.renounceDeployer(options) as Promise<`0x${string}`>;
1273
+ }
1274
+
1275
+ /**
1276
+ * safeBatchTransferFrom
1277
+ * nonpayable
1278
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1279
+ */
1280
+ async safeBatchTransferFrom(from: `0x${string}`, to: `0x${string}`, ids: bigint[], values: bigint[], data: `0x${string}`, options?: {
1281
+ accessList?: import('viem').AccessList;
1282
+ authorizationList?: import('viem').AuthorizationList;
1283
+ chain?: import('viem').Chain | null;
1284
+ dataSuffix?: `0x${string}`;
1285
+ gas?: bigint;
1286
+ gasPrice?: bigint;
1287
+ maxFeePerGas?: bigint;
1288
+ maxPriorityFeePerGas?: bigint;
1289
+ nonce?: number;
1290
+ value?: bigint;
1291
+ }): Promise<`0x${string}`> {
1292
+ if (!this.contract.write) {
1293
+ throw new Error('Wallet client is required for write operations');
1294
+ }
1295
+ return this.contract.write.safeBatchTransferFrom([from, to, ids, values, data] as const, options) as Promise<`0x${string}`>;
1296
+ }
1297
+
1298
+ /**
1299
+ * safeTransferFrom
1300
+ * nonpayable
1301
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1302
+ */
1303
+ async safeTransferFrom(from: `0x${string}`, to: `0x${string}`, id: bigint, value: bigint, data: `0x${string}`, options?: {
1304
+ accessList?: import('viem').AccessList;
1305
+ authorizationList?: import('viem').AuthorizationList;
1306
+ chain?: import('viem').Chain | null;
1307
+ dataSuffix?: `0x${string}`;
1308
+ gas?: bigint;
1309
+ gasPrice?: bigint;
1310
+ maxFeePerGas?: bigint;
1311
+ maxPriorityFeePerGas?: bigint;
1312
+ nonce?: number;
1313
+ value?: bigint;
1314
+ }): Promise<`0x${string}`> {
1315
+ if (!this.contract.write) {
1316
+ throw new Error('Wallet client is required for write operations');
1317
+ }
1318
+ return this.contract.write.safeTransferFrom([from, to, id, value, data] as const, options) as Promise<`0x${string}`>;
1319
+ }
1320
+
1321
+ /**
1322
+ * setApprovalForAll
1323
+ * nonpayable
1324
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1325
+ */
1326
+ async setApprovalForAll(operator: `0x${string}`, approved: boolean, options?: {
1327
+ accessList?: import('viem').AccessList;
1328
+ authorizationList?: import('viem').AuthorizationList;
1329
+ chain?: import('viem').Chain | null;
1330
+ dataSuffix?: `0x${string}`;
1331
+ gas?: bigint;
1332
+ gasPrice?: bigint;
1333
+ maxFeePerGas?: bigint;
1334
+ maxPriorityFeePerGas?: bigint;
1335
+ nonce?: number;
1336
+ value?: bigint;
1337
+ }): Promise<`0x${string}`> {
1338
+ if (!this.contract.write) {
1339
+ throw new Error('Wallet client is required for write operations');
1340
+ }
1341
+ return this.contract.write.setApprovalForAll([operator, approved] as const, options) as Promise<`0x${string}`>;
1342
+ }
1343
+
1344
+ /**
1345
+ * setURIs
1346
+ * nonpayable
1347
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1348
+ */
1349
+ async setURIs(ids: bigint[], uris: string[], options?: {
1350
+ accessList?: import('viem').AccessList;
1351
+ authorizationList?: import('viem').AuthorizationList;
1352
+ chain?: import('viem').Chain | null;
1353
+ dataSuffix?: `0x${string}`;
1354
+ gas?: bigint;
1355
+ gasPrice?: bigint;
1356
+ maxFeePerGas?: bigint;
1357
+ maxPriorityFeePerGas?: bigint;
1358
+ nonce?: number;
1359
+ value?: bigint;
1360
+ }): Promise<`0x${string}`> {
1361
+ if (!this.contract.write) {
1362
+ throw new Error('Wallet client is required for write operations');
1363
+ }
1364
+ return this.contract.write.setURIs([ids, uris] as const, options) as Promise<`0x${string}`>;
1365
+ }
1366
+
1367
+ /**
1368
+ * transferOwnership
1369
+ * nonpayable
1370
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1371
+ */
1372
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1373
+ accessList?: import('viem').AccessList;
1374
+ authorizationList?: import('viem').AuthorizationList;
1375
+ chain?: import('viem').Chain | null;
1376
+ dataSuffix?: `0x${string}`;
1377
+ gas?: bigint;
1378
+ gasPrice?: bigint;
1379
+ maxFeePerGas?: bigint;
1380
+ maxPriorityFeePerGas?: bigint;
1381
+ nonce?: number;
1382
+ value?: bigint;
1383
+ }): Promise<`0x${string}`> {
1384
+ if (!this.contract.write) {
1385
+ throw new Error('Wallet client is required for write operations');
1386
+ }
1387
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
1388
+ }
1389
+
1390
+
1391
+
1392
+ /**
1393
+ * Simulate contract write operations (dry-run without sending transaction)
1394
+ *
1395
+ * @example
1396
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1397
+ * console.log('Gas estimate:', result.request.gas);
1398
+ * console.log('Would succeed:', result.result);
1399
+ */
1400
+ get simulate() {
1401
+ const contract = this.contract;
1402
+ if (!contract.simulate) {
1403
+ throw new Error('Public client is required for simulation');
1404
+ }
1405
+ return {
1406
+ /**
1407
+ * Simulate addClaimRound
1408
+ * Returns gas estimate and result without sending transaction
1409
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1410
+ */
1411
+ async addClaimRound(startTime: bigint, usdtAmountPerNft: bigint, options?: {
1412
+ accessList?: import('viem').AccessList;
1413
+ authorizationList?: import('viem').AuthorizationList;
1414
+ chain?: import('viem').Chain | null;
1415
+ dataSuffix?: `0x${string}`;
1416
+ gas?: bigint;
1417
+ gasPrice?: bigint;
1418
+ maxFeePerGas?: bigint;
1419
+ maxPriorityFeePerGas?: bigint;
1420
+ nonce?: number;
1421
+ value?: bigint;
1422
+ }): Promise<void> {
1423
+ return contract.simulate.addClaimRound([startTime, usdtAmountPerNft] as const, options) as Promise<void>;
1424
+ },
1425
+ /**
1426
+ * Simulate addTransferAllowedAddress
1427
+ * Returns gas estimate and result without sending transaction
1428
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1429
+ */
1430
+ async addTransferAllowedAddress(newAddress: `0x${string}`, options?: {
1431
+ accessList?: import('viem').AccessList;
1432
+ authorizationList?: import('viem').AuthorizationList;
1433
+ chain?: import('viem').Chain | null;
1434
+ dataSuffix?: `0x${string}`;
1435
+ gas?: bigint;
1436
+ gasPrice?: bigint;
1437
+ maxFeePerGas?: bigint;
1438
+ maxPriorityFeePerGas?: bigint;
1439
+ nonce?: number;
1440
+ value?: bigint;
1441
+ }): Promise<void> {
1442
+ return contract.simulate.addTransferAllowedAddress([newAddress] as const, options) as Promise<void>;
1443
+ },
1444
+ /**
1445
+ * Simulate batchOwnerClaim
1446
+ * Returns gas estimate and result without sending transaction
1447
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1448
+ */
1449
+ async batchOwnerClaim(roundId: bigint, tokenIds: bigint[], options?: {
1450
+ accessList?: import('viem').AccessList;
1451
+ authorizationList?: import('viem').AuthorizationList;
1452
+ chain?: import('viem').Chain | null;
1453
+ dataSuffix?: `0x${string}`;
1454
+ gas?: bigint;
1455
+ gasPrice?: bigint;
1456
+ maxFeePerGas?: bigint;
1457
+ maxPriorityFeePerGas?: bigint;
1458
+ nonce?: number;
1459
+ value?: bigint;
1460
+ }): Promise<void> {
1461
+ return contract.simulate.batchOwnerClaim([roundId, tokenIds] as const, options) as Promise<void>;
1462
+ },
1463
+ /**
1464
+ * Simulate batchTokenMint
1465
+ * Returns gas estimate and result without sending transaction
1466
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1467
+ */
1468
+ async batchTokenMint(to: `0x${string}`, ids: bigint[], amounts: bigint[], options?: {
1469
+ accessList?: import('viem').AccessList;
1470
+ authorizationList?: import('viem').AuthorizationList;
1471
+ chain?: import('viem').Chain | null;
1472
+ dataSuffix?: `0x${string}`;
1473
+ gas?: bigint;
1474
+ gasPrice?: bigint;
1475
+ maxFeePerGas?: bigint;
1476
+ maxPriorityFeePerGas?: bigint;
1477
+ nonce?: number;
1478
+ value?: bigint;
1479
+ }): Promise<void> {
1480
+ return contract.simulate.batchTokenMint([to, ids, amounts] as const, options) as Promise<void>;
1481
+ },
1482
+ /**
1483
+ * Simulate claimTokens
1484
+ * Returns gas estimate and result without sending transaction
1485
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1486
+ */
1487
+ async claimTokens(id: bigint, amount: bigint, options?: {
1488
+ accessList?: import('viem').AccessList;
1489
+ authorizationList?: import('viem').AuthorizationList;
1490
+ chain?: import('viem').Chain | null;
1491
+ dataSuffix?: `0x${string}`;
1492
+ gas?: bigint;
1493
+ gasPrice?: bigint;
1494
+ maxFeePerGas?: bigint;
1495
+ maxPriorityFeePerGas?: bigint;
1496
+ nonce?: number;
1497
+ value?: bigint;
1498
+ }): Promise<void> {
1499
+ return contract.simulate.claimTokens([id, amount] as const, options) as Promise<void>;
1500
+ },
1501
+ /**
1502
+ * Simulate renounceDeployer
1503
+ * Returns gas estimate and result without sending transaction
1504
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1505
+ */
1506
+ async renounceDeployer(options?: {
1507
+ accessList?: import('viem').AccessList;
1508
+ authorizationList?: import('viem').AuthorizationList;
1509
+ chain?: import('viem').Chain | null;
1510
+ dataSuffix?: `0x${string}`;
1511
+ gas?: bigint;
1512
+ gasPrice?: bigint;
1513
+ maxFeePerGas?: bigint;
1514
+ maxPriorityFeePerGas?: bigint;
1515
+ nonce?: number;
1516
+ value?: bigint;
1517
+ }): Promise<void> {
1518
+ return contract.simulate.renounceDeployer(options) as Promise<void>;
1519
+ },
1520
+ /**
1521
+ * Simulate safeBatchTransferFrom
1522
+ * Returns gas estimate and result without sending transaction
1523
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1524
+ */
1525
+ async safeBatchTransferFrom(from: `0x${string}`, to: `0x${string}`, ids: bigint[], values: bigint[], data: `0x${string}`, options?: {
1526
+ accessList?: import('viem').AccessList;
1527
+ authorizationList?: import('viem').AuthorizationList;
1528
+ chain?: import('viem').Chain | null;
1529
+ dataSuffix?: `0x${string}`;
1530
+ gas?: bigint;
1531
+ gasPrice?: bigint;
1532
+ maxFeePerGas?: bigint;
1533
+ maxPriorityFeePerGas?: bigint;
1534
+ nonce?: number;
1535
+ value?: bigint;
1536
+ }): Promise<void> {
1537
+ return contract.simulate.safeBatchTransferFrom([from, to, ids, values, data] as const, options) as Promise<void>;
1538
+ },
1539
+ /**
1540
+ * Simulate safeTransferFrom
1541
+ * Returns gas estimate and result without sending transaction
1542
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1543
+ */
1544
+ async safeTransferFrom(from: `0x${string}`, to: `0x${string}`, id: bigint, value: bigint, data: `0x${string}`, options?: {
1545
+ accessList?: import('viem').AccessList;
1546
+ authorizationList?: import('viem').AuthorizationList;
1547
+ chain?: import('viem').Chain | null;
1548
+ dataSuffix?: `0x${string}`;
1549
+ gas?: bigint;
1550
+ gasPrice?: bigint;
1551
+ maxFeePerGas?: bigint;
1552
+ maxPriorityFeePerGas?: bigint;
1553
+ nonce?: number;
1554
+ value?: bigint;
1555
+ }): Promise<void> {
1556
+ return contract.simulate.safeTransferFrom([from, to, id, value, data] as const, options) as Promise<void>;
1557
+ },
1558
+ /**
1559
+ * Simulate setApprovalForAll
1560
+ * Returns gas estimate and result without sending transaction
1561
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1562
+ */
1563
+ async setApprovalForAll(operator: `0x${string}`, approved: boolean, options?: {
1564
+ accessList?: import('viem').AccessList;
1565
+ authorizationList?: import('viem').AuthorizationList;
1566
+ chain?: import('viem').Chain | null;
1567
+ dataSuffix?: `0x${string}`;
1568
+ gas?: bigint;
1569
+ gasPrice?: bigint;
1570
+ maxFeePerGas?: bigint;
1571
+ maxPriorityFeePerGas?: bigint;
1572
+ nonce?: number;
1573
+ value?: bigint;
1574
+ }): Promise<void> {
1575
+ return contract.simulate.setApprovalForAll([operator, approved] as const, options) as Promise<void>;
1576
+ },
1577
+ /**
1578
+ * Simulate setURIs
1579
+ * Returns gas estimate and result without sending transaction
1580
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1581
+ */
1582
+ async setURIs(ids: bigint[], uris: string[], options?: {
1583
+ accessList?: import('viem').AccessList;
1584
+ authorizationList?: import('viem').AuthorizationList;
1585
+ chain?: import('viem').Chain | null;
1586
+ dataSuffix?: `0x${string}`;
1587
+ gas?: bigint;
1588
+ gasPrice?: bigint;
1589
+ maxFeePerGas?: bigint;
1590
+ maxPriorityFeePerGas?: bigint;
1591
+ nonce?: number;
1592
+ value?: bigint;
1593
+ }): Promise<void> {
1594
+ return contract.simulate.setURIs([ids, uris] as const, options) as Promise<void>;
1595
+ },
1596
+ /**
1597
+ * Simulate transferOwnership
1598
+ * Returns gas estimate and result without sending transaction
1599
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1600
+ */
1601
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1602
+ accessList?: import('viem').AccessList;
1603
+ authorizationList?: import('viem').AuthorizationList;
1604
+ chain?: import('viem').Chain | null;
1605
+ dataSuffix?: `0x${string}`;
1606
+ gas?: bigint;
1607
+ gasPrice?: bigint;
1608
+ maxFeePerGas?: bigint;
1609
+ maxPriorityFeePerGas?: bigint;
1610
+ nonce?: number;
1611
+ value?: bigint;
1612
+ }): Promise<void> {
1613
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
1614
+ }
1615
+ };
1616
+ }
1617
+
1618
+ /**
1619
+ * Watch contract events
1620
+ *
1621
+ * @example
1622
+ * // Watch all Transfer events
1623
+ * const unwatch = contract.watch.Transfer((event) => {
1624
+ * console.log('Transfer:', event);
1625
+ * });
1626
+ *
1627
+ * // Stop watching
1628
+ * unwatch();
1629
+ */
1630
+ get watch() {
1631
+ return {
1632
+ /**
1633
+ * Watch ApprovalForAll events
1634
+ * @param callback Function to call when event is emitted
1635
+ * @param filter Optional filter for indexed parameters
1636
+ * @returns Unwatch function to stop listening
1637
+ */
1638
+ ApprovalForAll: (callback: (event: { account: `0x${string}`; operator: `0x${string}`; approved: boolean }) => void, filter?: { account: `0x${string}`; operator: `0x${string}` }) => {
1639
+ return this.publicClient.watchContractEvent({
1640
+ address: this.contractAddress,
1641
+ abi: NftFundRaiseCollection_jsonAbi,
1642
+ eventName: 'ApprovalForAll',
1643
+ args: filter,
1644
+ onLogs: (logs: any[]) => {
1645
+ logs.forEach((log: any) => {
1646
+ callback(log.args as any);
1647
+ });
1648
+ },
1649
+ }) as () => void;
1650
+ },
1651
+ /**
1652
+ * Watch ClaimRoundCreated events
1653
+ * @param callback Function to call when event is emitted
1654
+ * @param filter Optional filter for indexed parameters
1655
+ * @returns Unwatch function to stop listening
1656
+ */
1657
+ ClaimRoundCreated: (callback: (event: { roundId: bigint; startTime: bigint; endTime: bigint; usdtPerNft: bigint }) => void) => {
1658
+ return this.publicClient.watchContractEvent({
1659
+ address: this.contractAddress,
1660
+ abi: NftFundRaiseCollection_jsonAbi,
1661
+ eventName: 'ClaimRoundCreated',
1662
+
1663
+ onLogs: (logs: any[]) => {
1664
+ logs.forEach((log: any) => {
1665
+ callback(log.args as any);
1666
+ });
1667
+ },
1668
+ }) as () => void;
1669
+ },
1670
+ /**
1671
+ * Watch Claimed events
1672
+ * @param callback Function to call when event is emitted
1673
+ * @param filter Optional filter for indexed parameters
1674
+ * @returns Unwatch function to stop listening
1675
+ */
1676
+ Claimed: (callback: (event: { roundId: bigint; account: `0x${string}`; tokenId: bigint; amount: bigint }) => void) => {
1677
+ return this.publicClient.watchContractEvent({
1678
+ address: this.contractAddress,
1679
+ abi: NftFundRaiseCollection_jsonAbi,
1680
+ eventName: 'Claimed',
1681
+
1682
+ onLogs: (logs: any[]) => {
1683
+ logs.forEach((log: any) => {
1684
+ callback(log.args as any);
1685
+ });
1686
+ },
1687
+ }) as () => void;
1688
+ },
1689
+ /**
1690
+ * Watch OwnershipTransferred events
1691
+ * @param callback Function to call when event is emitted
1692
+ * @param filter Optional filter for indexed parameters
1693
+ * @returns Unwatch function to stop listening
1694
+ */
1695
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1696
+ return this.publicClient.watchContractEvent({
1697
+ address: this.contractAddress,
1698
+ abi: NftFundRaiseCollection_jsonAbi,
1699
+ eventName: 'OwnershipTransferred',
1700
+ args: filter,
1701
+ onLogs: (logs: any[]) => {
1702
+ logs.forEach((log: any) => {
1703
+ callback(log.args as any);
1704
+ });
1705
+ },
1706
+ }) as () => void;
1707
+ },
1708
+ /**
1709
+ * Watch TransferBatch events
1710
+ * @param callback Function to call when event is emitted
1711
+ * @param filter Optional filter for indexed parameters
1712
+ * @returns Unwatch function to stop listening
1713
+ */
1714
+ TransferBatch: (callback: (event: { operator: `0x${string}`; from: `0x${string}`; to: `0x${string}`; ids: bigint[]; values: bigint[] }) => void, filter?: { operator: `0x${string}`; from: `0x${string}`; to: `0x${string}` }) => {
1715
+ return this.publicClient.watchContractEvent({
1716
+ address: this.contractAddress,
1717
+ abi: NftFundRaiseCollection_jsonAbi,
1718
+ eventName: 'TransferBatch',
1719
+ args: filter,
1720
+ onLogs: (logs: any[]) => {
1721
+ logs.forEach((log: any) => {
1722
+ callback(log.args as any);
1723
+ });
1724
+ },
1725
+ }) as () => void;
1726
+ },
1727
+ /**
1728
+ * Watch TransferSingle events
1729
+ * @param callback Function to call when event is emitted
1730
+ * @param filter Optional filter for indexed parameters
1731
+ * @returns Unwatch function to stop listening
1732
+ */
1733
+ TransferSingle: (callback: (event: { operator: `0x${string}`; from: `0x${string}`; to: `0x${string}`; id: bigint; value: bigint }) => void, filter?: { operator: `0x${string}`; from: `0x${string}`; to: `0x${string}` }) => {
1734
+ return this.publicClient.watchContractEvent({
1735
+ address: this.contractAddress,
1736
+ abi: NftFundRaiseCollection_jsonAbi,
1737
+ eventName: 'TransferSingle',
1738
+ args: filter,
1739
+ onLogs: (logs: any[]) => {
1740
+ logs.forEach((log: any) => {
1741
+ callback(log.args as any);
1742
+ });
1743
+ },
1744
+ }) as () => void;
1745
+ },
1746
+ /**
1747
+ * Watch URI events
1748
+ * @param callback Function to call when event is emitted
1749
+ * @param filter Optional filter for indexed parameters
1750
+ * @returns Unwatch function to stop listening
1751
+ */
1752
+ URI: (callback: (event: { id: bigint; value: string }) => void, filter?: { id: bigint }) => {
1753
+ return this.publicClient.watchContractEvent({
1754
+ address: this.contractAddress,
1755
+ abi: NftFundRaiseCollection_jsonAbi,
1756
+ eventName: 'URI',
1757
+ args: filter,
1758
+ onLogs: (logs: any[]) => {
1759
+ logs.forEach((log: any) => {
1760
+ callback(log.args as any);
1761
+ });
1762
+ },
1763
+ }) as () => void;
1764
+ }
1765
+ };
1766
+ }
1767
+ }