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