@gitmyabi/znd 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,1124 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZNDToken_json = exports.ZNDToken_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * ZNDToken_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.ZNDToken_jsonAbi = [
11
+ {
12
+ "inputs": [],
13
+ "stateMutability": "nonpayable",
14
+ "type": "constructor"
15
+ },
16
+ {
17
+ "inputs": [],
18
+ "name": "ECDSAInvalidSignature",
19
+ "type": "error"
20
+ },
21
+ {
22
+ "inputs": [
23
+ {
24
+ "internalType": "uint256",
25
+ "name": "length",
26
+ "type": "uint256"
27
+ }
28
+ ],
29
+ "name": "ECDSAInvalidSignatureLength",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [
34
+ {
35
+ "internalType": "bytes32",
36
+ "name": "s",
37
+ "type": "bytes32"
38
+ }
39
+ ],
40
+ "name": "ECDSAInvalidSignatureS",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [
45
+ {
46
+ "internalType": "address",
47
+ "name": "spender",
48
+ "type": "address"
49
+ },
50
+ {
51
+ "internalType": "uint256",
52
+ "name": "allowance",
53
+ "type": "uint256"
54
+ },
55
+ {
56
+ "internalType": "uint256",
57
+ "name": "needed",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "ERC20InsufficientAllowance",
62
+ "type": "error"
63
+ },
64
+ {
65
+ "inputs": [
66
+ {
67
+ "internalType": "address",
68
+ "name": "sender",
69
+ "type": "address"
70
+ },
71
+ {
72
+ "internalType": "uint256",
73
+ "name": "balance",
74
+ "type": "uint256"
75
+ },
76
+ {
77
+ "internalType": "uint256",
78
+ "name": "needed",
79
+ "type": "uint256"
80
+ }
81
+ ],
82
+ "name": "ERC20InsufficientBalance",
83
+ "type": "error"
84
+ },
85
+ {
86
+ "inputs": [
87
+ {
88
+ "internalType": "address",
89
+ "name": "approver",
90
+ "type": "address"
91
+ }
92
+ ],
93
+ "name": "ERC20InvalidApprover",
94
+ "type": "error"
95
+ },
96
+ {
97
+ "inputs": [
98
+ {
99
+ "internalType": "address",
100
+ "name": "receiver",
101
+ "type": "address"
102
+ }
103
+ ],
104
+ "name": "ERC20InvalidReceiver",
105
+ "type": "error"
106
+ },
107
+ {
108
+ "inputs": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "sender",
112
+ "type": "address"
113
+ }
114
+ ],
115
+ "name": "ERC20InvalidSender",
116
+ "type": "error"
117
+ },
118
+ {
119
+ "inputs": [
120
+ {
121
+ "internalType": "address",
122
+ "name": "spender",
123
+ "type": "address"
124
+ }
125
+ ],
126
+ "name": "ERC20InvalidSpender",
127
+ "type": "error"
128
+ },
129
+ {
130
+ "inputs": [
131
+ {
132
+ "internalType": "uint256",
133
+ "name": "deadline",
134
+ "type": "uint256"
135
+ }
136
+ ],
137
+ "name": "ERC2612ExpiredSignature",
138
+ "type": "error"
139
+ },
140
+ {
141
+ "inputs": [
142
+ {
143
+ "internalType": "address",
144
+ "name": "signer",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "internalType": "address",
149
+ "name": "owner",
150
+ "type": "address"
151
+ }
152
+ ],
153
+ "name": "ERC2612InvalidSigner",
154
+ "type": "error"
155
+ },
156
+ {
157
+ "inputs": [
158
+ {
159
+ "internalType": "address",
160
+ "name": "account",
161
+ "type": "address"
162
+ },
163
+ {
164
+ "internalType": "uint256",
165
+ "name": "currentNonce",
166
+ "type": "uint256"
167
+ }
168
+ ],
169
+ "name": "InvalidAccountNonce",
170
+ "type": "error"
171
+ },
172
+ {
173
+ "inputs": [],
174
+ "name": "InvalidShortString",
175
+ "type": "error"
176
+ },
177
+ {
178
+ "inputs": [
179
+ {
180
+ "internalType": "address",
181
+ "name": "owner",
182
+ "type": "address"
183
+ }
184
+ ],
185
+ "name": "OwnableInvalidOwner",
186
+ "type": "error"
187
+ },
188
+ {
189
+ "inputs": [
190
+ {
191
+ "internalType": "address",
192
+ "name": "account",
193
+ "type": "address"
194
+ }
195
+ ],
196
+ "name": "OwnableUnauthorizedAccount",
197
+ "type": "error"
198
+ },
199
+ {
200
+ "inputs": [],
201
+ "name": "RenouncingOwnershipIsDisabled",
202
+ "type": "error"
203
+ },
204
+ {
205
+ "inputs": [
206
+ {
207
+ "internalType": "string",
208
+ "name": "str",
209
+ "type": "string"
210
+ }
211
+ ],
212
+ "name": "StringTooLong",
213
+ "type": "error"
214
+ },
215
+ {
216
+ "anonymous": false,
217
+ "inputs": [
218
+ {
219
+ "indexed": true,
220
+ "internalType": "address",
221
+ "name": "owner",
222
+ "type": "address"
223
+ },
224
+ {
225
+ "indexed": true,
226
+ "internalType": "address",
227
+ "name": "spender",
228
+ "type": "address"
229
+ },
230
+ {
231
+ "indexed": false,
232
+ "internalType": "uint256",
233
+ "name": "value",
234
+ "type": "uint256"
235
+ }
236
+ ],
237
+ "name": "Approval",
238
+ "type": "event"
239
+ },
240
+ {
241
+ "anonymous": false,
242
+ "inputs": [],
243
+ "name": "EIP712DomainChanged",
244
+ "type": "event"
245
+ },
246
+ {
247
+ "anonymous": false,
248
+ "inputs": [
249
+ {
250
+ "indexed": true,
251
+ "internalType": "address",
252
+ "name": "previousOwner",
253
+ "type": "address"
254
+ },
255
+ {
256
+ "indexed": true,
257
+ "internalType": "address",
258
+ "name": "newOwner",
259
+ "type": "address"
260
+ }
261
+ ],
262
+ "name": "OwnershipTransferStarted",
263
+ "type": "event"
264
+ },
265
+ {
266
+ "anonymous": false,
267
+ "inputs": [
268
+ {
269
+ "indexed": true,
270
+ "internalType": "address",
271
+ "name": "previousOwner",
272
+ "type": "address"
273
+ },
274
+ {
275
+ "indexed": true,
276
+ "internalType": "address",
277
+ "name": "newOwner",
278
+ "type": "address"
279
+ }
280
+ ],
281
+ "name": "OwnershipTransferred",
282
+ "type": "event"
283
+ },
284
+ {
285
+ "anonymous": false,
286
+ "inputs": [
287
+ {
288
+ "indexed": true,
289
+ "internalType": "address",
290
+ "name": "from",
291
+ "type": "address"
292
+ },
293
+ {
294
+ "indexed": true,
295
+ "internalType": "address",
296
+ "name": "to",
297
+ "type": "address"
298
+ },
299
+ {
300
+ "indexed": false,
301
+ "internalType": "uint256",
302
+ "name": "value",
303
+ "type": "uint256"
304
+ }
305
+ ],
306
+ "name": "Transfer",
307
+ "type": "event"
308
+ },
309
+ {
310
+ "inputs": [],
311
+ "name": "DOMAIN_SEPARATOR",
312
+ "outputs": [
313
+ {
314
+ "internalType": "bytes32",
315
+ "name": "",
316
+ "type": "bytes32"
317
+ }
318
+ ],
319
+ "stateMutability": "view",
320
+ "type": "function"
321
+ },
322
+ {
323
+ "inputs": [],
324
+ "name": "TOTAL_SUPPLY",
325
+ "outputs": [
326
+ {
327
+ "internalType": "uint256",
328
+ "name": "",
329
+ "type": "uint256"
330
+ }
331
+ ],
332
+ "stateMutability": "view",
333
+ "type": "function"
334
+ },
335
+ {
336
+ "inputs": [],
337
+ "name": "acceptOwnership",
338
+ "outputs": [],
339
+ "stateMutability": "nonpayable",
340
+ "type": "function"
341
+ },
342
+ {
343
+ "inputs": [
344
+ {
345
+ "internalType": "address",
346
+ "name": "owner",
347
+ "type": "address"
348
+ },
349
+ {
350
+ "internalType": "address",
351
+ "name": "spender",
352
+ "type": "address"
353
+ }
354
+ ],
355
+ "name": "allowance",
356
+ "outputs": [
357
+ {
358
+ "internalType": "uint256",
359
+ "name": "",
360
+ "type": "uint256"
361
+ }
362
+ ],
363
+ "stateMutability": "view",
364
+ "type": "function"
365
+ },
366
+ {
367
+ "inputs": [
368
+ {
369
+ "internalType": "address",
370
+ "name": "spender",
371
+ "type": "address"
372
+ },
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "value",
376
+ "type": "uint256"
377
+ }
378
+ ],
379
+ "name": "approve",
380
+ "outputs": [
381
+ {
382
+ "internalType": "bool",
383
+ "name": "",
384
+ "type": "bool"
385
+ }
386
+ ],
387
+ "stateMutability": "nonpayable",
388
+ "type": "function"
389
+ },
390
+ {
391
+ "inputs": [
392
+ {
393
+ "internalType": "address",
394
+ "name": "account",
395
+ "type": "address"
396
+ }
397
+ ],
398
+ "name": "balanceOf",
399
+ "outputs": [
400
+ {
401
+ "internalType": "uint256",
402
+ "name": "",
403
+ "type": "uint256"
404
+ }
405
+ ],
406
+ "stateMutability": "view",
407
+ "type": "function"
408
+ },
409
+ {
410
+ "inputs": [
411
+ {
412
+ "internalType": "uint256",
413
+ "name": "value",
414
+ "type": "uint256"
415
+ }
416
+ ],
417
+ "name": "burn",
418
+ "outputs": [],
419
+ "stateMutability": "nonpayable",
420
+ "type": "function"
421
+ },
422
+ {
423
+ "inputs": [
424
+ {
425
+ "internalType": "address",
426
+ "name": "account",
427
+ "type": "address"
428
+ },
429
+ {
430
+ "internalType": "uint256",
431
+ "name": "value",
432
+ "type": "uint256"
433
+ }
434
+ ],
435
+ "name": "burnFrom",
436
+ "outputs": [],
437
+ "stateMutability": "nonpayable",
438
+ "type": "function"
439
+ },
440
+ {
441
+ "inputs": [],
442
+ "name": "decimals",
443
+ "outputs": [
444
+ {
445
+ "internalType": "uint8",
446
+ "name": "",
447
+ "type": "uint8"
448
+ }
449
+ ],
450
+ "stateMutability": "view",
451
+ "type": "function"
452
+ },
453
+ {
454
+ "inputs": [],
455
+ "name": "eip712Domain",
456
+ "outputs": [
457
+ {
458
+ "internalType": "bytes1",
459
+ "name": "fields",
460
+ "type": "bytes1"
461
+ },
462
+ {
463
+ "internalType": "string",
464
+ "name": "name",
465
+ "type": "string"
466
+ },
467
+ {
468
+ "internalType": "string",
469
+ "name": "version",
470
+ "type": "string"
471
+ },
472
+ {
473
+ "internalType": "uint256",
474
+ "name": "chainId",
475
+ "type": "uint256"
476
+ },
477
+ {
478
+ "internalType": "address",
479
+ "name": "verifyingContract",
480
+ "type": "address"
481
+ },
482
+ {
483
+ "internalType": "bytes32",
484
+ "name": "salt",
485
+ "type": "bytes32"
486
+ },
487
+ {
488
+ "internalType": "uint256[]",
489
+ "name": "extensions",
490
+ "type": "uint256[]"
491
+ }
492
+ ],
493
+ "stateMutability": "view",
494
+ "type": "function"
495
+ },
496
+ {
497
+ "inputs": [],
498
+ "name": "name",
499
+ "outputs": [
500
+ {
501
+ "internalType": "string",
502
+ "name": "",
503
+ "type": "string"
504
+ }
505
+ ],
506
+ "stateMutability": "view",
507
+ "type": "function"
508
+ },
509
+ {
510
+ "inputs": [
511
+ {
512
+ "internalType": "address",
513
+ "name": "owner",
514
+ "type": "address"
515
+ }
516
+ ],
517
+ "name": "nonces",
518
+ "outputs": [
519
+ {
520
+ "internalType": "uint256",
521
+ "name": "",
522
+ "type": "uint256"
523
+ }
524
+ ],
525
+ "stateMutability": "view",
526
+ "type": "function"
527
+ },
528
+ {
529
+ "inputs": [],
530
+ "name": "owner",
531
+ "outputs": [
532
+ {
533
+ "internalType": "address",
534
+ "name": "",
535
+ "type": "address"
536
+ }
537
+ ],
538
+ "stateMutability": "view",
539
+ "type": "function"
540
+ },
541
+ {
542
+ "inputs": [],
543
+ "name": "pendingOwner",
544
+ "outputs": [
545
+ {
546
+ "internalType": "address",
547
+ "name": "",
548
+ "type": "address"
549
+ }
550
+ ],
551
+ "stateMutability": "view",
552
+ "type": "function"
553
+ },
554
+ {
555
+ "inputs": [
556
+ {
557
+ "internalType": "address",
558
+ "name": "owner",
559
+ "type": "address"
560
+ },
561
+ {
562
+ "internalType": "address",
563
+ "name": "spender",
564
+ "type": "address"
565
+ },
566
+ {
567
+ "internalType": "uint256",
568
+ "name": "value",
569
+ "type": "uint256"
570
+ },
571
+ {
572
+ "internalType": "uint256",
573
+ "name": "deadline",
574
+ "type": "uint256"
575
+ },
576
+ {
577
+ "internalType": "uint8",
578
+ "name": "v",
579
+ "type": "uint8"
580
+ },
581
+ {
582
+ "internalType": "bytes32",
583
+ "name": "r",
584
+ "type": "bytes32"
585
+ },
586
+ {
587
+ "internalType": "bytes32",
588
+ "name": "s",
589
+ "type": "bytes32"
590
+ }
591
+ ],
592
+ "name": "permit",
593
+ "outputs": [],
594
+ "stateMutability": "nonpayable",
595
+ "type": "function"
596
+ },
597
+ {
598
+ "inputs": [],
599
+ "name": "renounceOwnership",
600
+ "outputs": [],
601
+ "stateMutability": "view",
602
+ "type": "function"
603
+ },
604
+ {
605
+ "inputs": [],
606
+ "name": "symbol",
607
+ "outputs": [
608
+ {
609
+ "internalType": "string",
610
+ "name": "",
611
+ "type": "string"
612
+ }
613
+ ],
614
+ "stateMutability": "view",
615
+ "type": "function"
616
+ },
617
+ {
618
+ "inputs": [],
619
+ "name": "totalSupply",
620
+ "outputs": [
621
+ {
622
+ "internalType": "uint256",
623
+ "name": "",
624
+ "type": "uint256"
625
+ }
626
+ ],
627
+ "stateMutability": "view",
628
+ "type": "function"
629
+ },
630
+ {
631
+ "inputs": [
632
+ {
633
+ "internalType": "address",
634
+ "name": "to",
635
+ "type": "address"
636
+ },
637
+ {
638
+ "internalType": "uint256",
639
+ "name": "value",
640
+ "type": "uint256"
641
+ }
642
+ ],
643
+ "name": "transfer",
644
+ "outputs": [
645
+ {
646
+ "internalType": "bool",
647
+ "name": "",
648
+ "type": "bool"
649
+ }
650
+ ],
651
+ "stateMutability": "nonpayable",
652
+ "type": "function"
653
+ },
654
+ {
655
+ "inputs": [
656
+ {
657
+ "internalType": "address",
658
+ "name": "from",
659
+ "type": "address"
660
+ },
661
+ {
662
+ "internalType": "address",
663
+ "name": "to",
664
+ "type": "address"
665
+ },
666
+ {
667
+ "internalType": "uint256",
668
+ "name": "value",
669
+ "type": "uint256"
670
+ }
671
+ ],
672
+ "name": "transferFrom",
673
+ "outputs": [
674
+ {
675
+ "internalType": "bool",
676
+ "name": "",
677
+ "type": "bool"
678
+ }
679
+ ],
680
+ "stateMutability": "nonpayable",
681
+ "type": "function"
682
+ },
683
+ {
684
+ "inputs": [
685
+ {
686
+ "internalType": "address",
687
+ "name": "newOwner",
688
+ "type": "address"
689
+ }
690
+ ],
691
+ "name": "transferOwnership",
692
+ "outputs": [],
693
+ "stateMutability": "nonpayable",
694
+ "type": "function"
695
+ }
696
+ ];
697
+ /**
698
+ * ZNDToken_json Contract Class
699
+ *
700
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
701
+ *
702
+ * @example
703
+ * ```typescript
704
+ * import { createPublicClient, createWalletClient, http } from 'viem';
705
+ * import { mainnet } from 'viem/chains';
706
+ * import { ZNDToken_json } from 'ZNDToken_json';
707
+ *
708
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
709
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
710
+ *
711
+ * const contract = new ZNDToken_json('0x...', { publicClient, walletClient });
712
+ *
713
+ * // Read functions
714
+ * const result = await contract.balanceOf('0x...');
715
+ *
716
+ * // Write functions
717
+ * const hash = await contract.transfer('0x...', 1000n);
718
+ *
719
+ * // Simulate transactions (dry-run)
720
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
721
+ * console.log('Gas estimate:', simulation.request.gas);
722
+ *
723
+ * // Watch events
724
+ * const unwatch = contract.watch.Transfer((event) => {
725
+ * console.log('Transfer event:', event);
726
+ * });
727
+ * ```
728
+ */
729
+ class ZNDToken_json {
730
+ constructor(address, clients) {
731
+ this.contractAddress = address;
732
+ this.publicClient = clients.publicClient;
733
+ this.contract = (0, viem_1.getContract)({
734
+ address,
735
+ abi: exports.ZNDToken_jsonAbi,
736
+ client: {
737
+ public: clients.publicClient,
738
+ wallet: clients.walletClient,
739
+ },
740
+ });
741
+ }
742
+ /**
743
+ * Get the contract address
744
+ */
745
+ get address() {
746
+ return this.contractAddress;
747
+ }
748
+ /**
749
+ * Get the underlying viem contract instance
750
+ */
751
+ getContract() {
752
+ return this.contract;
753
+ }
754
+ /**
755
+ * DOMAIN_SEPARATOR
756
+ * view
757
+ */
758
+ async DOMAIN_SEPARATOR() {
759
+ return this.contract.read.DOMAIN_SEPARATOR();
760
+ }
761
+ /**
762
+ * TOTAL_SUPPLY
763
+ * view
764
+ */
765
+ async TOTAL_SUPPLY() {
766
+ return this.contract.read.TOTAL_SUPPLY();
767
+ }
768
+ /**
769
+ * allowance
770
+ * view
771
+ */
772
+ async allowance(owner, spender) {
773
+ return this.contract.read.allowance([owner, spender]);
774
+ }
775
+ /**
776
+ * balanceOf
777
+ * view
778
+ */
779
+ async balanceOf(account) {
780
+ return this.contract.read.balanceOf([account]);
781
+ }
782
+ /**
783
+ * decimals
784
+ * view
785
+ */
786
+ async decimals() {
787
+ return this.contract.read.decimals();
788
+ }
789
+ /**
790
+ * eip712Domain
791
+ * view
792
+ */
793
+ async eip712Domain() {
794
+ return this.contract.read.eip712Domain();
795
+ }
796
+ /**
797
+ * name
798
+ * view
799
+ */
800
+ async name() {
801
+ return this.contract.read.name();
802
+ }
803
+ /**
804
+ * nonces
805
+ * view
806
+ */
807
+ async nonces(owner) {
808
+ return this.contract.read.nonces([owner]);
809
+ }
810
+ /**
811
+ * owner
812
+ * view
813
+ */
814
+ async owner() {
815
+ return this.contract.read.owner();
816
+ }
817
+ /**
818
+ * pendingOwner
819
+ * view
820
+ */
821
+ async pendingOwner() {
822
+ return this.contract.read.pendingOwner();
823
+ }
824
+ /**
825
+ * renounceOwnership
826
+ * view
827
+ */
828
+ async renounceOwnership() {
829
+ return this.contract.read.renounceOwnership();
830
+ }
831
+ /**
832
+ * symbol
833
+ * view
834
+ */
835
+ async symbol() {
836
+ return this.contract.read.symbol();
837
+ }
838
+ /**
839
+ * totalSupply
840
+ * view
841
+ */
842
+ async totalSupply() {
843
+ return this.contract.read.totalSupply();
844
+ }
845
+ /**
846
+ * acceptOwnership
847
+ * nonpayable
848
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
849
+ */
850
+ async acceptOwnership(options) {
851
+ if (!this.contract.write) {
852
+ throw new Error('Wallet client is required for write operations');
853
+ }
854
+ return this.contract.write.acceptOwnership(options);
855
+ }
856
+ /**
857
+ * approve
858
+ * nonpayable
859
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
860
+ */
861
+ async approve(spender, value, options) {
862
+ if (!this.contract.write) {
863
+ throw new Error('Wallet client is required for write operations');
864
+ }
865
+ return this.contract.write.approve([spender, value], options);
866
+ }
867
+ /**
868
+ * burn
869
+ * nonpayable
870
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
871
+ */
872
+ async burn(value, options) {
873
+ if (!this.contract.write) {
874
+ throw new Error('Wallet client is required for write operations');
875
+ }
876
+ return this.contract.write.burn([value], options);
877
+ }
878
+ /**
879
+ * burnFrom
880
+ * nonpayable
881
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
882
+ */
883
+ async burnFrom(account, value, options) {
884
+ if (!this.contract.write) {
885
+ throw new Error('Wallet client is required for write operations');
886
+ }
887
+ return this.contract.write.burnFrom([account, value], options);
888
+ }
889
+ /**
890
+ * permit
891
+ * nonpayable
892
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
893
+ */
894
+ async permit(owner, spender, value, deadline, v, r, s, options) {
895
+ if (!this.contract.write) {
896
+ throw new Error('Wallet client is required for write operations');
897
+ }
898
+ return this.contract.write.permit([owner, spender, value, deadline, v, r, s], options);
899
+ }
900
+ /**
901
+ * transfer
902
+ * nonpayable
903
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
904
+ */
905
+ async transfer(to, value, options) {
906
+ if (!this.contract.write) {
907
+ throw new Error('Wallet client is required for write operations');
908
+ }
909
+ return this.contract.write.transfer([to, value], options);
910
+ }
911
+ /**
912
+ * transferFrom
913
+ * nonpayable
914
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
915
+ */
916
+ async transferFrom(from, to, value, options) {
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], options);
921
+ }
922
+ /**
923
+ * transferOwnership
924
+ * nonpayable
925
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
926
+ */
927
+ async transferOwnership(newOwner, options) {
928
+ if (!this.contract.write) {
929
+ throw new Error('Wallet client is required for write operations');
930
+ }
931
+ return this.contract.write.transferOwnership([newOwner], options);
932
+ }
933
+ /**
934
+ * Simulate contract write operations (dry-run without sending transaction)
935
+ *
936
+ * @example
937
+ * const result = await contract.simulate.transfer('0x...', 1000n);
938
+ * console.log('Gas estimate:', result.request.gas);
939
+ * console.log('Would succeed:', result.result);
940
+ */
941
+ get simulate() {
942
+ const contract = this.contract;
943
+ if (!contract.simulate) {
944
+ throw new Error('Public client is required for simulation');
945
+ }
946
+ return {
947
+ /**
948
+ * Simulate acceptOwnership
949
+ * Returns gas estimate and result without sending transaction
950
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
951
+ */
952
+ async acceptOwnership(options) {
953
+ return contract.simulate.acceptOwnership(options);
954
+ },
955
+ /**
956
+ * Simulate approve
957
+ * Returns gas estimate and result without sending transaction
958
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
959
+ */
960
+ async approve(spender, value, options) {
961
+ return contract.simulate.approve([spender, value], options);
962
+ },
963
+ /**
964
+ * Simulate burn
965
+ * Returns gas estimate and result without sending transaction
966
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
967
+ */
968
+ async burn(value, options) {
969
+ return contract.simulate.burn([value], options);
970
+ },
971
+ /**
972
+ * Simulate burnFrom
973
+ * Returns gas estimate and result without sending transaction
974
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
975
+ */
976
+ async burnFrom(account, value, options) {
977
+ return contract.simulate.burnFrom([account, value], options);
978
+ },
979
+ /**
980
+ * Simulate permit
981
+ * Returns gas estimate and result without sending transaction
982
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
983
+ */
984
+ async permit(owner, spender, value, deadline, v, r, s, options) {
985
+ return contract.simulate.permit([owner, spender, value, deadline, v, r, s], options);
986
+ },
987
+ /**
988
+ * Simulate transfer
989
+ * Returns gas estimate and result without sending transaction
990
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
991
+ */
992
+ async transfer(to, value, options) {
993
+ return contract.simulate.transfer([to, value], options);
994
+ },
995
+ /**
996
+ * Simulate transferFrom
997
+ * Returns gas estimate and result without sending transaction
998
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
999
+ */
1000
+ async transferFrom(from, to, value, options) {
1001
+ return contract.simulate.transferFrom([from, to, value], options);
1002
+ },
1003
+ /**
1004
+ * Simulate transferOwnership
1005
+ * Returns gas estimate and result without sending transaction
1006
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1007
+ */
1008
+ async transferOwnership(newOwner, options) {
1009
+ return contract.simulate.transferOwnership([newOwner], options);
1010
+ }
1011
+ };
1012
+ }
1013
+ /**
1014
+ * Watch contract events
1015
+ *
1016
+ * @example
1017
+ * // Watch all Transfer events
1018
+ * const unwatch = contract.watch.Transfer((event) => {
1019
+ * console.log('Transfer:', event);
1020
+ * });
1021
+ *
1022
+ * // Stop watching
1023
+ * unwatch();
1024
+ */
1025
+ get watch() {
1026
+ return {
1027
+ /**
1028
+ * Watch Approval events
1029
+ * @param callback Function to call when event is emitted
1030
+ * @param filter Optional filter for indexed parameters
1031
+ * @returns Unwatch function to stop listening
1032
+ */
1033
+ Approval: (callback, filter) => {
1034
+ return this.publicClient.watchContractEvent({
1035
+ address: this.contractAddress,
1036
+ abi: exports.ZNDToken_jsonAbi,
1037
+ eventName: 'Approval',
1038
+ args: filter,
1039
+ onLogs: (logs) => {
1040
+ logs.forEach((log) => {
1041
+ callback(log.args);
1042
+ });
1043
+ },
1044
+ });
1045
+ },
1046
+ /**
1047
+ * Watch EIP712DomainChanged events
1048
+ * @param callback Function to call when event is emitted
1049
+ * @param filter Optional filter for indexed parameters
1050
+ * @returns Unwatch function to stop listening
1051
+ */
1052
+ EIP712DomainChanged: (callback) => {
1053
+ return this.publicClient.watchContractEvent({
1054
+ address: this.contractAddress,
1055
+ abi: exports.ZNDToken_jsonAbi,
1056
+ eventName: 'EIP712DomainChanged',
1057
+ onLogs: (logs) => {
1058
+ logs.forEach((log) => {
1059
+ callback(log.args);
1060
+ });
1061
+ },
1062
+ });
1063
+ },
1064
+ /**
1065
+ * Watch OwnershipTransferStarted events
1066
+ * @param callback Function to call when event is emitted
1067
+ * @param filter Optional filter for indexed parameters
1068
+ * @returns Unwatch function to stop listening
1069
+ */
1070
+ OwnershipTransferStarted: (callback, filter) => {
1071
+ return this.publicClient.watchContractEvent({
1072
+ address: this.contractAddress,
1073
+ abi: exports.ZNDToken_jsonAbi,
1074
+ eventName: 'OwnershipTransferStarted',
1075
+ args: filter,
1076
+ onLogs: (logs) => {
1077
+ logs.forEach((log) => {
1078
+ callback(log.args);
1079
+ });
1080
+ },
1081
+ });
1082
+ },
1083
+ /**
1084
+ * Watch OwnershipTransferred events
1085
+ * @param callback Function to call when event is emitted
1086
+ * @param filter Optional filter for indexed parameters
1087
+ * @returns Unwatch function to stop listening
1088
+ */
1089
+ OwnershipTransferred: (callback, filter) => {
1090
+ return this.publicClient.watchContractEvent({
1091
+ address: this.contractAddress,
1092
+ abi: exports.ZNDToken_jsonAbi,
1093
+ eventName: 'OwnershipTransferred',
1094
+ args: filter,
1095
+ onLogs: (logs) => {
1096
+ logs.forEach((log) => {
1097
+ callback(log.args);
1098
+ });
1099
+ },
1100
+ });
1101
+ },
1102
+ /**
1103
+ * Watch Transfer events
1104
+ * @param callback Function to call when event is emitted
1105
+ * @param filter Optional filter for indexed parameters
1106
+ * @returns Unwatch function to stop listening
1107
+ */
1108
+ Transfer: (callback, filter) => {
1109
+ return this.publicClient.watchContractEvent({
1110
+ address: this.contractAddress,
1111
+ abi: exports.ZNDToken_jsonAbi,
1112
+ eventName: 'Transfer',
1113
+ args: filter,
1114
+ onLogs: (logs) => {
1115
+ logs.forEach((log) => {
1116
+ callback(log.args);
1117
+ });
1118
+ },
1119
+ });
1120
+ }
1121
+ };
1122
+ }
1123
+ }
1124
+ exports.ZNDToken_json = ZNDToken_json;