@gitmyabi/oracle 1.0.0 → 1.0.1

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