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