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