@gitmyabi-stg/usat 0.0.1

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