@gitmyabi/ooki 0.0.0-stage → 1.0.0

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