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