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