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