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