@gitmyabi/cawbrl 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,2793 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CErc20Delegate_json = exports.CErc20Delegate_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * CErc20Delegate_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.CErc20Delegate_jsonAbi = [
11
+ {
12
+ "inputs": [],
13
+ "stateMutability": "nonpayable",
14
+ "type": "constructor"
15
+ },
16
+ {
17
+ "inputs": [],
18
+ "name": "AcceptAdminPendingAdminCheck",
19
+ "type": "error"
20
+ },
21
+ {
22
+ "inputs": [
23
+ {
24
+ "internalType": "uint256",
25
+ "name": "actualAddAmount",
26
+ "type": "uint256"
27
+ }
28
+ ],
29
+ "name": "AddReservesFactorFreshCheck",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [],
34
+ "name": "BorrowCashNotAvailable",
35
+ "type": "error"
36
+ },
37
+ {
38
+ "inputs": [
39
+ {
40
+ "internalType": "uint256",
41
+ "name": "errorCode",
42
+ "type": "uint256"
43
+ }
44
+ ],
45
+ "name": "BorrowComptrollerRejection",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "BorrowFreshnessCheck",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [
55
+ {
56
+ "internalType": "uint256",
57
+ "name": "errorCode",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "LiquidateAccrueBorrowInterestFailed",
62
+ "type": "error"
63
+ },
64
+ {
65
+ "inputs": [
66
+ {
67
+ "internalType": "uint256",
68
+ "name": "errorCode",
69
+ "type": "uint256"
70
+ }
71
+ ],
72
+ "name": "LiquidateAccrueCollateralInterestFailed",
73
+ "type": "error"
74
+ },
75
+ {
76
+ "inputs": [],
77
+ "name": "LiquidateCloseAmountIsUintMax",
78
+ "type": "error"
79
+ },
80
+ {
81
+ "inputs": [],
82
+ "name": "LiquidateCloseAmountIsZero",
83
+ "type": "error"
84
+ },
85
+ {
86
+ "inputs": [],
87
+ "name": "LiquidateCollateralFreshnessCheck",
88
+ "type": "error"
89
+ },
90
+ {
91
+ "inputs": [
92
+ {
93
+ "internalType": "uint256",
94
+ "name": "errorCode",
95
+ "type": "uint256"
96
+ }
97
+ ],
98
+ "name": "LiquidateComptrollerRejection",
99
+ "type": "error"
100
+ },
101
+ {
102
+ "inputs": [],
103
+ "name": "LiquidateFreshnessCheck",
104
+ "type": "error"
105
+ },
106
+ {
107
+ "inputs": [],
108
+ "name": "LiquidateLiquidatorIsBorrower",
109
+ "type": "error"
110
+ },
111
+ {
112
+ "inputs": [
113
+ {
114
+ "internalType": "uint256",
115
+ "name": "errorCode",
116
+ "type": "uint256"
117
+ }
118
+ ],
119
+ "name": "LiquidateRepayBorrowFreshFailed",
120
+ "type": "error"
121
+ },
122
+ {
123
+ "inputs": [
124
+ {
125
+ "internalType": "uint256",
126
+ "name": "errorCode",
127
+ "type": "uint256"
128
+ }
129
+ ],
130
+ "name": "LiquidateSeizeComptrollerRejection",
131
+ "type": "error"
132
+ },
133
+ {
134
+ "inputs": [],
135
+ "name": "LiquidateSeizeLiquidatorIsBorrower",
136
+ "type": "error"
137
+ },
138
+ {
139
+ "inputs": [
140
+ {
141
+ "internalType": "uint256",
142
+ "name": "errorCode",
143
+ "type": "uint256"
144
+ }
145
+ ],
146
+ "name": "MintComptrollerRejection",
147
+ "type": "error"
148
+ },
149
+ {
150
+ "inputs": [],
151
+ "name": "MintFreshnessCheck",
152
+ "type": "error"
153
+ },
154
+ {
155
+ "inputs": [
156
+ {
157
+ "internalType": "uint256",
158
+ "name": "errorCode",
159
+ "type": "uint256"
160
+ }
161
+ ],
162
+ "name": "RedeemComptrollerRejection",
163
+ "type": "error"
164
+ },
165
+ {
166
+ "inputs": [],
167
+ "name": "RedeemFreshnessCheck",
168
+ "type": "error"
169
+ },
170
+ {
171
+ "inputs": [],
172
+ "name": "RedeemTransferOutNotPossible",
173
+ "type": "error"
174
+ },
175
+ {
176
+ "inputs": [],
177
+ "name": "ReduceReservesAdminCheck",
178
+ "type": "error"
179
+ },
180
+ {
181
+ "inputs": [],
182
+ "name": "ReduceReservesCashNotAvailable",
183
+ "type": "error"
184
+ },
185
+ {
186
+ "inputs": [],
187
+ "name": "ReduceReservesCashValidation",
188
+ "type": "error"
189
+ },
190
+ {
191
+ "inputs": [],
192
+ "name": "ReduceReservesFreshCheck",
193
+ "type": "error"
194
+ },
195
+ {
196
+ "inputs": [
197
+ {
198
+ "internalType": "uint256",
199
+ "name": "errorCode",
200
+ "type": "uint256"
201
+ }
202
+ ],
203
+ "name": "RepayBorrowComptrollerRejection",
204
+ "type": "error"
205
+ },
206
+ {
207
+ "inputs": [],
208
+ "name": "RepayBorrowFreshnessCheck",
209
+ "type": "error"
210
+ },
211
+ {
212
+ "inputs": [],
213
+ "name": "SetComptrollerOwnerCheck",
214
+ "type": "error"
215
+ },
216
+ {
217
+ "inputs": [],
218
+ "name": "SetInterestRateModelFreshCheck",
219
+ "type": "error"
220
+ },
221
+ {
222
+ "inputs": [],
223
+ "name": "SetInterestRateModelOwnerCheck",
224
+ "type": "error"
225
+ },
226
+ {
227
+ "inputs": [],
228
+ "name": "SetPendingAdminOwnerCheck",
229
+ "type": "error"
230
+ },
231
+ {
232
+ "inputs": [],
233
+ "name": "SetReserveFactorAdminCheck",
234
+ "type": "error"
235
+ },
236
+ {
237
+ "inputs": [],
238
+ "name": "SetReserveFactorBoundsCheck",
239
+ "type": "error"
240
+ },
241
+ {
242
+ "inputs": [],
243
+ "name": "SetReserveFactorFreshCheck",
244
+ "type": "error"
245
+ },
246
+ {
247
+ "inputs": [],
248
+ "name": "SetWhitelistAdminOwnerCheck",
249
+ "type": "error"
250
+ },
251
+ {
252
+ "inputs": [
253
+ {
254
+ "internalType": "uint256",
255
+ "name": "errorCode",
256
+ "type": "uint256"
257
+ }
258
+ ],
259
+ "name": "TransferComptrollerRejection",
260
+ "type": "error"
261
+ },
262
+ {
263
+ "inputs": [],
264
+ "name": "TransferNotAllowed",
265
+ "type": "error"
266
+ },
267
+ {
268
+ "inputs": [],
269
+ "name": "TransferNotEnough",
270
+ "type": "error"
271
+ },
272
+ {
273
+ "inputs": [],
274
+ "name": "TransferTooMuch",
275
+ "type": "error"
276
+ },
277
+ {
278
+ "anonymous": false,
279
+ "inputs": [
280
+ {
281
+ "indexed": false,
282
+ "internalType": "uint256",
283
+ "name": "cashPrior",
284
+ "type": "uint256"
285
+ },
286
+ {
287
+ "indexed": false,
288
+ "internalType": "uint256",
289
+ "name": "interestAccumulated",
290
+ "type": "uint256"
291
+ },
292
+ {
293
+ "indexed": false,
294
+ "internalType": "uint256",
295
+ "name": "borrowIndex",
296
+ "type": "uint256"
297
+ },
298
+ {
299
+ "indexed": false,
300
+ "internalType": "uint256",
301
+ "name": "totalBorrows",
302
+ "type": "uint256"
303
+ }
304
+ ],
305
+ "name": "AccrueInterest",
306
+ "type": "event"
307
+ },
308
+ {
309
+ "anonymous": false,
310
+ "inputs": [
311
+ {
312
+ "indexed": true,
313
+ "internalType": "address",
314
+ "name": "owner",
315
+ "type": "address"
316
+ },
317
+ {
318
+ "indexed": true,
319
+ "internalType": "address",
320
+ "name": "spender",
321
+ "type": "address"
322
+ },
323
+ {
324
+ "indexed": false,
325
+ "internalType": "uint256",
326
+ "name": "amount",
327
+ "type": "uint256"
328
+ }
329
+ ],
330
+ "name": "Approval",
331
+ "type": "event"
332
+ },
333
+ {
334
+ "anonymous": false,
335
+ "inputs": [
336
+ {
337
+ "indexed": false,
338
+ "internalType": "address",
339
+ "name": "borrower",
340
+ "type": "address"
341
+ },
342
+ {
343
+ "indexed": false,
344
+ "internalType": "uint256",
345
+ "name": "borrowAmount",
346
+ "type": "uint256"
347
+ },
348
+ {
349
+ "indexed": false,
350
+ "internalType": "uint256",
351
+ "name": "accountBorrows",
352
+ "type": "uint256"
353
+ },
354
+ {
355
+ "indexed": false,
356
+ "internalType": "uint256",
357
+ "name": "totalBorrows",
358
+ "type": "uint256"
359
+ }
360
+ ],
361
+ "name": "Borrow",
362
+ "type": "event"
363
+ },
364
+ {
365
+ "anonymous": false,
366
+ "inputs": [
367
+ {
368
+ "indexed": false,
369
+ "internalType": "address",
370
+ "name": "liquidator",
371
+ "type": "address"
372
+ },
373
+ {
374
+ "indexed": false,
375
+ "internalType": "address",
376
+ "name": "borrower",
377
+ "type": "address"
378
+ },
379
+ {
380
+ "indexed": false,
381
+ "internalType": "uint256",
382
+ "name": "repayAmount",
383
+ "type": "uint256"
384
+ },
385
+ {
386
+ "indexed": false,
387
+ "internalType": "address",
388
+ "name": "cTokenCollateral",
389
+ "type": "address"
390
+ },
391
+ {
392
+ "indexed": false,
393
+ "internalType": "uint256",
394
+ "name": "seizeTokens",
395
+ "type": "uint256"
396
+ }
397
+ ],
398
+ "name": "LiquidateBorrow",
399
+ "type": "event"
400
+ },
401
+ {
402
+ "anonymous": false,
403
+ "inputs": [
404
+ {
405
+ "indexed": false,
406
+ "internalType": "address",
407
+ "name": "minter",
408
+ "type": "address"
409
+ },
410
+ {
411
+ "indexed": false,
412
+ "internalType": "uint256",
413
+ "name": "mintAmount",
414
+ "type": "uint256"
415
+ },
416
+ {
417
+ "indexed": false,
418
+ "internalType": "uint256",
419
+ "name": "mintTokens",
420
+ "type": "uint256"
421
+ }
422
+ ],
423
+ "name": "Mint",
424
+ "type": "event"
425
+ },
426
+ {
427
+ "anonymous": false,
428
+ "inputs": [
429
+ {
430
+ "indexed": false,
431
+ "internalType": "address",
432
+ "name": "oldAdmin",
433
+ "type": "address"
434
+ },
435
+ {
436
+ "indexed": false,
437
+ "internalType": "address",
438
+ "name": "newAdmin",
439
+ "type": "address"
440
+ }
441
+ ],
442
+ "name": "NewAdmin",
443
+ "type": "event"
444
+ },
445
+ {
446
+ "anonymous": false,
447
+ "inputs": [
448
+ {
449
+ "indexed": false,
450
+ "internalType": "contract ComptrollerInterface",
451
+ "name": "oldComptroller",
452
+ "type": "address"
453
+ },
454
+ {
455
+ "indexed": false,
456
+ "internalType": "contract ComptrollerInterface",
457
+ "name": "newComptroller",
458
+ "type": "address"
459
+ }
460
+ ],
461
+ "name": "NewComptroller",
462
+ "type": "event"
463
+ },
464
+ {
465
+ "anonymous": false,
466
+ "inputs": [
467
+ {
468
+ "indexed": false,
469
+ "internalType": "contract InterestRateModel",
470
+ "name": "oldInterestRateModel",
471
+ "type": "address"
472
+ },
473
+ {
474
+ "indexed": false,
475
+ "internalType": "contract InterestRateModel",
476
+ "name": "newInterestRateModel",
477
+ "type": "address"
478
+ }
479
+ ],
480
+ "name": "NewMarketInterestRateModel",
481
+ "type": "event"
482
+ },
483
+ {
484
+ "anonymous": false,
485
+ "inputs": [
486
+ {
487
+ "indexed": false,
488
+ "internalType": "address",
489
+ "name": "oldPendingAdmin",
490
+ "type": "address"
491
+ },
492
+ {
493
+ "indexed": false,
494
+ "internalType": "address",
495
+ "name": "newPendingAdmin",
496
+ "type": "address"
497
+ }
498
+ ],
499
+ "name": "NewPendingAdmin",
500
+ "type": "event"
501
+ },
502
+ {
503
+ "anonymous": false,
504
+ "inputs": [
505
+ {
506
+ "indexed": false,
507
+ "internalType": "uint256",
508
+ "name": "oldReserveFactorMantissa",
509
+ "type": "uint256"
510
+ },
511
+ {
512
+ "indexed": false,
513
+ "internalType": "uint256",
514
+ "name": "newReserveFactorMantissa",
515
+ "type": "uint256"
516
+ }
517
+ ],
518
+ "name": "NewReserveFactor",
519
+ "type": "event"
520
+ },
521
+ {
522
+ "anonymous": false,
523
+ "inputs": [
524
+ {
525
+ "indexed": false,
526
+ "internalType": "contract WhitelistAccess",
527
+ "name": "oldWhitelist",
528
+ "type": "address"
529
+ },
530
+ {
531
+ "indexed": false,
532
+ "internalType": "contract WhitelistAccess",
533
+ "name": "newWhitelist",
534
+ "type": "address"
535
+ }
536
+ ],
537
+ "name": "NewWhitelist",
538
+ "type": "event"
539
+ },
540
+ {
541
+ "anonymous": false,
542
+ "inputs": [
543
+ {
544
+ "indexed": false,
545
+ "internalType": "address",
546
+ "name": "redeemer",
547
+ "type": "address"
548
+ },
549
+ {
550
+ "indexed": false,
551
+ "internalType": "uint256",
552
+ "name": "redeemAmount",
553
+ "type": "uint256"
554
+ },
555
+ {
556
+ "indexed": false,
557
+ "internalType": "uint256",
558
+ "name": "redeemTokens",
559
+ "type": "uint256"
560
+ }
561
+ ],
562
+ "name": "Redeem",
563
+ "type": "event"
564
+ },
565
+ {
566
+ "anonymous": false,
567
+ "inputs": [
568
+ {
569
+ "indexed": false,
570
+ "internalType": "address",
571
+ "name": "payer",
572
+ "type": "address"
573
+ },
574
+ {
575
+ "indexed": false,
576
+ "internalType": "address",
577
+ "name": "borrower",
578
+ "type": "address"
579
+ },
580
+ {
581
+ "indexed": false,
582
+ "internalType": "uint256",
583
+ "name": "repayAmount",
584
+ "type": "uint256"
585
+ },
586
+ {
587
+ "indexed": false,
588
+ "internalType": "uint256",
589
+ "name": "accountBorrows",
590
+ "type": "uint256"
591
+ },
592
+ {
593
+ "indexed": false,
594
+ "internalType": "uint256",
595
+ "name": "totalBorrows",
596
+ "type": "uint256"
597
+ }
598
+ ],
599
+ "name": "RepayBorrow",
600
+ "type": "event"
601
+ },
602
+ {
603
+ "anonymous": false,
604
+ "inputs": [
605
+ {
606
+ "indexed": false,
607
+ "internalType": "address",
608
+ "name": "benefactor",
609
+ "type": "address"
610
+ },
611
+ {
612
+ "indexed": false,
613
+ "internalType": "uint256",
614
+ "name": "addAmount",
615
+ "type": "uint256"
616
+ },
617
+ {
618
+ "indexed": false,
619
+ "internalType": "uint256",
620
+ "name": "newTotalReserves",
621
+ "type": "uint256"
622
+ }
623
+ ],
624
+ "name": "ReservesAdded",
625
+ "type": "event"
626
+ },
627
+ {
628
+ "anonymous": false,
629
+ "inputs": [
630
+ {
631
+ "indexed": false,
632
+ "internalType": "address",
633
+ "name": "admin",
634
+ "type": "address"
635
+ },
636
+ {
637
+ "indexed": false,
638
+ "internalType": "uint256",
639
+ "name": "reduceAmount",
640
+ "type": "uint256"
641
+ },
642
+ {
643
+ "indexed": false,
644
+ "internalType": "uint256",
645
+ "name": "newTotalReserves",
646
+ "type": "uint256"
647
+ }
648
+ ],
649
+ "name": "ReservesReduced",
650
+ "type": "event"
651
+ },
652
+ {
653
+ "anonymous": false,
654
+ "inputs": [
655
+ {
656
+ "indexed": true,
657
+ "internalType": "address",
658
+ "name": "from",
659
+ "type": "address"
660
+ },
661
+ {
662
+ "indexed": true,
663
+ "internalType": "address",
664
+ "name": "to",
665
+ "type": "address"
666
+ },
667
+ {
668
+ "indexed": false,
669
+ "internalType": "uint256",
670
+ "name": "amount",
671
+ "type": "uint256"
672
+ }
673
+ ],
674
+ "name": "Transfer",
675
+ "type": "event"
676
+ },
677
+ {
678
+ "inputs": [],
679
+ "name": "NO_ERROR",
680
+ "outputs": [
681
+ {
682
+ "internalType": "uint256",
683
+ "name": "",
684
+ "type": "uint256"
685
+ }
686
+ ],
687
+ "stateMutability": "view",
688
+ "type": "function"
689
+ },
690
+ {
691
+ "inputs": [],
692
+ "name": "_acceptAdmin",
693
+ "outputs": [
694
+ {
695
+ "internalType": "uint256",
696
+ "name": "",
697
+ "type": "uint256"
698
+ }
699
+ ],
700
+ "stateMutability": "nonpayable",
701
+ "type": "function"
702
+ },
703
+ {
704
+ "inputs": [
705
+ {
706
+ "internalType": "uint256",
707
+ "name": "addAmount",
708
+ "type": "uint256"
709
+ }
710
+ ],
711
+ "name": "_addReserves",
712
+ "outputs": [
713
+ {
714
+ "internalType": "uint256",
715
+ "name": "",
716
+ "type": "uint256"
717
+ }
718
+ ],
719
+ "stateMutability": "nonpayable",
720
+ "type": "function"
721
+ },
722
+ {
723
+ "inputs": [
724
+ {
725
+ "internalType": "bytes",
726
+ "name": "data",
727
+ "type": "bytes"
728
+ }
729
+ ],
730
+ "name": "_becomeImplementation",
731
+ "outputs": [],
732
+ "stateMutability": "nonpayable",
733
+ "type": "function"
734
+ },
735
+ {
736
+ "inputs": [
737
+ {
738
+ "internalType": "address",
739
+ "name": "compLikeDelegatee",
740
+ "type": "address"
741
+ }
742
+ ],
743
+ "name": "_delegateCompLikeTo",
744
+ "outputs": [],
745
+ "stateMutability": "nonpayable",
746
+ "type": "function"
747
+ },
748
+ {
749
+ "inputs": [
750
+ {
751
+ "internalType": "uint256",
752
+ "name": "reduceAmount",
753
+ "type": "uint256"
754
+ }
755
+ ],
756
+ "name": "_reduceReserves",
757
+ "outputs": [
758
+ {
759
+ "internalType": "uint256",
760
+ "name": "",
761
+ "type": "uint256"
762
+ }
763
+ ],
764
+ "stateMutability": "nonpayable",
765
+ "type": "function"
766
+ },
767
+ {
768
+ "inputs": [],
769
+ "name": "_resignImplementation",
770
+ "outputs": [],
771
+ "stateMutability": "nonpayable",
772
+ "type": "function"
773
+ },
774
+ {
775
+ "inputs": [
776
+ {
777
+ "internalType": "contract ComptrollerInterface",
778
+ "name": "newComptroller",
779
+ "type": "address"
780
+ }
781
+ ],
782
+ "name": "_setComptroller",
783
+ "outputs": [
784
+ {
785
+ "internalType": "uint256",
786
+ "name": "",
787
+ "type": "uint256"
788
+ }
789
+ ],
790
+ "stateMutability": "nonpayable",
791
+ "type": "function"
792
+ },
793
+ {
794
+ "inputs": [
795
+ {
796
+ "internalType": "contract InterestRateModel",
797
+ "name": "newInterestRateModel",
798
+ "type": "address"
799
+ }
800
+ ],
801
+ "name": "_setInterestRateModel",
802
+ "outputs": [
803
+ {
804
+ "internalType": "uint256",
805
+ "name": "",
806
+ "type": "uint256"
807
+ }
808
+ ],
809
+ "stateMutability": "nonpayable",
810
+ "type": "function"
811
+ },
812
+ {
813
+ "inputs": [
814
+ {
815
+ "internalType": "address payable",
816
+ "name": "newPendingAdmin",
817
+ "type": "address"
818
+ }
819
+ ],
820
+ "name": "_setPendingAdmin",
821
+ "outputs": [
822
+ {
823
+ "internalType": "uint256",
824
+ "name": "",
825
+ "type": "uint256"
826
+ }
827
+ ],
828
+ "stateMutability": "nonpayable",
829
+ "type": "function"
830
+ },
831
+ {
832
+ "inputs": [
833
+ {
834
+ "internalType": "uint256",
835
+ "name": "newReserveFactorMantissa",
836
+ "type": "uint256"
837
+ }
838
+ ],
839
+ "name": "_setReserveFactor",
840
+ "outputs": [
841
+ {
842
+ "internalType": "uint256",
843
+ "name": "",
844
+ "type": "uint256"
845
+ }
846
+ ],
847
+ "stateMutability": "nonpayable",
848
+ "type": "function"
849
+ },
850
+ {
851
+ "inputs": [
852
+ {
853
+ "internalType": "contract WhitelistAccess",
854
+ "name": "newWhitelist",
855
+ "type": "address"
856
+ }
857
+ ],
858
+ "name": "_setWhitelist",
859
+ "outputs": [
860
+ {
861
+ "internalType": "uint256",
862
+ "name": "",
863
+ "type": "uint256"
864
+ }
865
+ ],
866
+ "stateMutability": "nonpayable",
867
+ "type": "function"
868
+ },
869
+ {
870
+ "inputs": [],
871
+ "name": "accrualBlockNumber",
872
+ "outputs": [
873
+ {
874
+ "internalType": "uint256",
875
+ "name": "",
876
+ "type": "uint256"
877
+ }
878
+ ],
879
+ "stateMutability": "view",
880
+ "type": "function"
881
+ },
882
+ {
883
+ "inputs": [],
884
+ "name": "accrueInterest",
885
+ "outputs": [
886
+ {
887
+ "internalType": "uint256",
888
+ "name": "",
889
+ "type": "uint256"
890
+ }
891
+ ],
892
+ "stateMutability": "nonpayable",
893
+ "type": "function"
894
+ },
895
+ {
896
+ "inputs": [],
897
+ "name": "admin",
898
+ "outputs": [
899
+ {
900
+ "internalType": "address payable",
901
+ "name": "",
902
+ "type": "address"
903
+ }
904
+ ],
905
+ "stateMutability": "view",
906
+ "type": "function"
907
+ },
908
+ {
909
+ "inputs": [
910
+ {
911
+ "internalType": "address",
912
+ "name": "owner",
913
+ "type": "address"
914
+ },
915
+ {
916
+ "internalType": "address",
917
+ "name": "spender",
918
+ "type": "address"
919
+ }
920
+ ],
921
+ "name": "allowance",
922
+ "outputs": [
923
+ {
924
+ "internalType": "uint256",
925
+ "name": "",
926
+ "type": "uint256"
927
+ }
928
+ ],
929
+ "stateMutability": "view",
930
+ "type": "function"
931
+ },
932
+ {
933
+ "inputs": [
934
+ {
935
+ "internalType": "address",
936
+ "name": "spender",
937
+ "type": "address"
938
+ },
939
+ {
940
+ "internalType": "uint256",
941
+ "name": "amount",
942
+ "type": "uint256"
943
+ }
944
+ ],
945
+ "name": "approve",
946
+ "outputs": [
947
+ {
948
+ "internalType": "bool",
949
+ "name": "",
950
+ "type": "bool"
951
+ }
952
+ ],
953
+ "stateMutability": "nonpayable",
954
+ "type": "function"
955
+ },
956
+ {
957
+ "inputs": [
958
+ {
959
+ "internalType": "address",
960
+ "name": "owner",
961
+ "type": "address"
962
+ }
963
+ ],
964
+ "name": "balanceOf",
965
+ "outputs": [
966
+ {
967
+ "internalType": "uint256",
968
+ "name": "",
969
+ "type": "uint256"
970
+ }
971
+ ],
972
+ "stateMutability": "view",
973
+ "type": "function"
974
+ },
975
+ {
976
+ "inputs": [
977
+ {
978
+ "internalType": "address",
979
+ "name": "owner",
980
+ "type": "address"
981
+ }
982
+ ],
983
+ "name": "balanceOfUnderlying",
984
+ "outputs": [
985
+ {
986
+ "internalType": "uint256",
987
+ "name": "",
988
+ "type": "uint256"
989
+ }
990
+ ],
991
+ "stateMutability": "nonpayable",
992
+ "type": "function"
993
+ },
994
+ {
995
+ "inputs": [
996
+ {
997
+ "internalType": "uint256",
998
+ "name": "borrowAmount",
999
+ "type": "uint256"
1000
+ }
1001
+ ],
1002
+ "name": "borrow",
1003
+ "outputs": [
1004
+ {
1005
+ "internalType": "uint256",
1006
+ "name": "",
1007
+ "type": "uint256"
1008
+ }
1009
+ ],
1010
+ "stateMutability": "nonpayable",
1011
+ "type": "function"
1012
+ },
1013
+ {
1014
+ "inputs": [
1015
+ {
1016
+ "internalType": "address",
1017
+ "name": "account",
1018
+ "type": "address"
1019
+ }
1020
+ ],
1021
+ "name": "borrowBalanceCurrent",
1022
+ "outputs": [
1023
+ {
1024
+ "internalType": "uint256",
1025
+ "name": "",
1026
+ "type": "uint256"
1027
+ }
1028
+ ],
1029
+ "stateMutability": "nonpayable",
1030
+ "type": "function"
1031
+ },
1032
+ {
1033
+ "inputs": [
1034
+ {
1035
+ "internalType": "address",
1036
+ "name": "account",
1037
+ "type": "address"
1038
+ }
1039
+ ],
1040
+ "name": "borrowBalanceStored",
1041
+ "outputs": [
1042
+ {
1043
+ "internalType": "uint256",
1044
+ "name": "",
1045
+ "type": "uint256"
1046
+ }
1047
+ ],
1048
+ "stateMutability": "view",
1049
+ "type": "function"
1050
+ },
1051
+ {
1052
+ "inputs": [],
1053
+ "name": "borrowIndex",
1054
+ "outputs": [
1055
+ {
1056
+ "internalType": "uint256",
1057
+ "name": "",
1058
+ "type": "uint256"
1059
+ }
1060
+ ],
1061
+ "stateMutability": "view",
1062
+ "type": "function"
1063
+ },
1064
+ {
1065
+ "inputs": [],
1066
+ "name": "borrowRatePerBlock",
1067
+ "outputs": [
1068
+ {
1069
+ "internalType": "uint256",
1070
+ "name": "",
1071
+ "type": "uint256"
1072
+ }
1073
+ ],
1074
+ "stateMutability": "view",
1075
+ "type": "function"
1076
+ },
1077
+ {
1078
+ "inputs": [],
1079
+ "name": "comptroller",
1080
+ "outputs": [
1081
+ {
1082
+ "internalType": "contract ComptrollerInterface",
1083
+ "name": "",
1084
+ "type": "address"
1085
+ }
1086
+ ],
1087
+ "stateMutability": "view",
1088
+ "type": "function"
1089
+ },
1090
+ {
1091
+ "inputs": [],
1092
+ "name": "decimals",
1093
+ "outputs": [
1094
+ {
1095
+ "internalType": "uint8",
1096
+ "name": "",
1097
+ "type": "uint8"
1098
+ }
1099
+ ],
1100
+ "stateMutability": "view",
1101
+ "type": "function"
1102
+ },
1103
+ {
1104
+ "inputs": [],
1105
+ "name": "exchangeRateCurrent",
1106
+ "outputs": [
1107
+ {
1108
+ "internalType": "uint256",
1109
+ "name": "",
1110
+ "type": "uint256"
1111
+ }
1112
+ ],
1113
+ "stateMutability": "nonpayable",
1114
+ "type": "function"
1115
+ },
1116
+ {
1117
+ "inputs": [],
1118
+ "name": "exchangeRateStored",
1119
+ "outputs": [
1120
+ {
1121
+ "internalType": "uint256",
1122
+ "name": "",
1123
+ "type": "uint256"
1124
+ }
1125
+ ],
1126
+ "stateMutability": "view",
1127
+ "type": "function"
1128
+ },
1129
+ {
1130
+ "inputs": [
1131
+ {
1132
+ "internalType": "address",
1133
+ "name": "account",
1134
+ "type": "address"
1135
+ }
1136
+ ],
1137
+ "name": "getAccountSnapshot",
1138
+ "outputs": [
1139
+ {
1140
+ "internalType": "uint256",
1141
+ "name": "",
1142
+ "type": "uint256"
1143
+ },
1144
+ {
1145
+ "internalType": "uint256",
1146
+ "name": "",
1147
+ "type": "uint256"
1148
+ },
1149
+ {
1150
+ "internalType": "uint256",
1151
+ "name": "",
1152
+ "type": "uint256"
1153
+ },
1154
+ {
1155
+ "internalType": "uint256",
1156
+ "name": "",
1157
+ "type": "uint256"
1158
+ }
1159
+ ],
1160
+ "stateMutability": "view",
1161
+ "type": "function"
1162
+ },
1163
+ {
1164
+ "inputs": [],
1165
+ "name": "getCash",
1166
+ "outputs": [
1167
+ {
1168
+ "internalType": "uint256",
1169
+ "name": "",
1170
+ "type": "uint256"
1171
+ }
1172
+ ],
1173
+ "stateMutability": "view",
1174
+ "type": "function"
1175
+ },
1176
+ {
1177
+ "inputs": [],
1178
+ "name": "implementation",
1179
+ "outputs": [
1180
+ {
1181
+ "internalType": "address",
1182
+ "name": "",
1183
+ "type": "address"
1184
+ }
1185
+ ],
1186
+ "stateMutability": "view",
1187
+ "type": "function"
1188
+ },
1189
+ {
1190
+ "inputs": [
1191
+ {
1192
+ "internalType": "address",
1193
+ "name": "underlying_",
1194
+ "type": "address"
1195
+ },
1196
+ {
1197
+ "internalType": "contract ComptrollerInterface",
1198
+ "name": "comptroller_",
1199
+ "type": "address"
1200
+ },
1201
+ {
1202
+ "internalType": "contract InterestRateModel",
1203
+ "name": "interestRateModel_",
1204
+ "type": "address"
1205
+ },
1206
+ {
1207
+ "internalType": "uint256",
1208
+ "name": "initialExchangeRateMantissa_",
1209
+ "type": "uint256"
1210
+ },
1211
+ {
1212
+ "internalType": "string",
1213
+ "name": "name_",
1214
+ "type": "string"
1215
+ },
1216
+ {
1217
+ "internalType": "string",
1218
+ "name": "symbol_",
1219
+ "type": "string"
1220
+ },
1221
+ {
1222
+ "internalType": "uint8",
1223
+ "name": "decimals_",
1224
+ "type": "uint8"
1225
+ }
1226
+ ],
1227
+ "name": "initialize",
1228
+ "outputs": [],
1229
+ "stateMutability": "nonpayable",
1230
+ "type": "function"
1231
+ },
1232
+ {
1233
+ "inputs": [
1234
+ {
1235
+ "internalType": "contract ComptrollerInterface",
1236
+ "name": "comptroller_",
1237
+ "type": "address"
1238
+ },
1239
+ {
1240
+ "internalType": "contract InterestRateModel",
1241
+ "name": "interestRateModel_",
1242
+ "type": "address"
1243
+ },
1244
+ {
1245
+ "internalType": "uint256",
1246
+ "name": "initialExchangeRateMantissa_",
1247
+ "type": "uint256"
1248
+ },
1249
+ {
1250
+ "internalType": "string",
1251
+ "name": "name_",
1252
+ "type": "string"
1253
+ },
1254
+ {
1255
+ "internalType": "string",
1256
+ "name": "symbol_",
1257
+ "type": "string"
1258
+ },
1259
+ {
1260
+ "internalType": "uint8",
1261
+ "name": "decimals_",
1262
+ "type": "uint8"
1263
+ }
1264
+ ],
1265
+ "name": "initialize",
1266
+ "outputs": [],
1267
+ "stateMutability": "nonpayable",
1268
+ "type": "function"
1269
+ },
1270
+ {
1271
+ "inputs": [],
1272
+ "name": "interestRateModel",
1273
+ "outputs": [
1274
+ {
1275
+ "internalType": "contract InterestRateModel",
1276
+ "name": "",
1277
+ "type": "address"
1278
+ }
1279
+ ],
1280
+ "stateMutability": "view",
1281
+ "type": "function"
1282
+ },
1283
+ {
1284
+ "inputs": [],
1285
+ "name": "isCToken",
1286
+ "outputs": [
1287
+ {
1288
+ "internalType": "bool",
1289
+ "name": "",
1290
+ "type": "bool"
1291
+ }
1292
+ ],
1293
+ "stateMutability": "view",
1294
+ "type": "function"
1295
+ },
1296
+ {
1297
+ "inputs": [
1298
+ {
1299
+ "internalType": "address",
1300
+ "name": "borrower",
1301
+ "type": "address"
1302
+ },
1303
+ {
1304
+ "internalType": "uint256",
1305
+ "name": "repayAmount",
1306
+ "type": "uint256"
1307
+ },
1308
+ {
1309
+ "internalType": "contract CTokenInterface",
1310
+ "name": "cTokenCollateral",
1311
+ "type": "address"
1312
+ }
1313
+ ],
1314
+ "name": "liquidateBorrow",
1315
+ "outputs": [
1316
+ {
1317
+ "internalType": "uint256",
1318
+ "name": "",
1319
+ "type": "uint256"
1320
+ }
1321
+ ],
1322
+ "stateMutability": "nonpayable",
1323
+ "type": "function"
1324
+ },
1325
+ {
1326
+ "inputs": [
1327
+ {
1328
+ "internalType": "uint256",
1329
+ "name": "mintAmount",
1330
+ "type": "uint256"
1331
+ }
1332
+ ],
1333
+ "name": "mint",
1334
+ "outputs": [
1335
+ {
1336
+ "internalType": "uint256",
1337
+ "name": "",
1338
+ "type": "uint256"
1339
+ }
1340
+ ],
1341
+ "stateMutability": "nonpayable",
1342
+ "type": "function"
1343
+ },
1344
+ {
1345
+ "inputs": [],
1346
+ "name": "name",
1347
+ "outputs": [
1348
+ {
1349
+ "internalType": "string",
1350
+ "name": "",
1351
+ "type": "string"
1352
+ }
1353
+ ],
1354
+ "stateMutability": "view",
1355
+ "type": "function"
1356
+ },
1357
+ {
1358
+ "inputs": [],
1359
+ "name": "pendingAdmin",
1360
+ "outputs": [
1361
+ {
1362
+ "internalType": "address payable",
1363
+ "name": "",
1364
+ "type": "address"
1365
+ }
1366
+ ],
1367
+ "stateMutability": "view",
1368
+ "type": "function"
1369
+ },
1370
+ {
1371
+ "inputs": [],
1372
+ "name": "protocolSeizeShareMantissa",
1373
+ "outputs": [
1374
+ {
1375
+ "internalType": "uint256",
1376
+ "name": "",
1377
+ "type": "uint256"
1378
+ }
1379
+ ],
1380
+ "stateMutability": "view",
1381
+ "type": "function"
1382
+ },
1383
+ {
1384
+ "inputs": [
1385
+ {
1386
+ "internalType": "uint256",
1387
+ "name": "redeemTokens",
1388
+ "type": "uint256"
1389
+ }
1390
+ ],
1391
+ "name": "redeem",
1392
+ "outputs": [
1393
+ {
1394
+ "internalType": "uint256",
1395
+ "name": "",
1396
+ "type": "uint256"
1397
+ }
1398
+ ],
1399
+ "stateMutability": "nonpayable",
1400
+ "type": "function"
1401
+ },
1402
+ {
1403
+ "inputs": [
1404
+ {
1405
+ "internalType": "uint256",
1406
+ "name": "redeemAmount",
1407
+ "type": "uint256"
1408
+ }
1409
+ ],
1410
+ "name": "redeemUnderlying",
1411
+ "outputs": [
1412
+ {
1413
+ "internalType": "uint256",
1414
+ "name": "",
1415
+ "type": "uint256"
1416
+ }
1417
+ ],
1418
+ "stateMutability": "nonpayable",
1419
+ "type": "function"
1420
+ },
1421
+ {
1422
+ "inputs": [
1423
+ {
1424
+ "internalType": "uint256",
1425
+ "name": "repayAmount",
1426
+ "type": "uint256"
1427
+ }
1428
+ ],
1429
+ "name": "repayBorrow",
1430
+ "outputs": [
1431
+ {
1432
+ "internalType": "uint256",
1433
+ "name": "",
1434
+ "type": "uint256"
1435
+ }
1436
+ ],
1437
+ "stateMutability": "nonpayable",
1438
+ "type": "function"
1439
+ },
1440
+ {
1441
+ "inputs": [
1442
+ {
1443
+ "internalType": "address",
1444
+ "name": "borrower",
1445
+ "type": "address"
1446
+ },
1447
+ {
1448
+ "internalType": "uint256",
1449
+ "name": "repayAmount",
1450
+ "type": "uint256"
1451
+ }
1452
+ ],
1453
+ "name": "repayBorrowBehalf",
1454
+ "outputs": [
1455
+ {
1456
+ "internalType": "uint256",
1457
+ "name": "",
1458
+ "type": "uint256"
1459
+ }
1460
+ ],
1461
+ "stateMutability": "nonpayable",
1462
+ "type": "function"
1463
+ },
1464
+ {
1465
+ "inputs": [],
1466
+ "name": "reserveFactorMantissa",
1467
+ "outputs": [
1468
+ {
1469
+ "internalType": "uint256",
1470
+ "name": "",
1471
+ "type": "uint256"
1472
+ }
1473
+ ],
1474
+ "stateMutability": "view",
1475
+ "type": "function"
1476
+ },
1477
+ {
1478
+ "inputs": [
1479
+ {
1480
+ "internalType": "address",
1481
+ "name": "liquidator",
1482
+ "type": "address"
1483
+ },
1484
+ {
1485
+ "internalType": "address",
1486
+ "name": "borrower",
1487
+ "type": "address"
1488
+ },
1489
+ {
1490
+ "internalType": "uint256",
1491
+ "name": "seizeTokens",
1492
+ "type": "uint256"
1493
+ }
1494
+ ],
1495
+ "name": "seize",
1496
+ "outputs": [
1497
+ {
1498
+ "internalType": "uint256",
1499
+ "name": "",
1500
+ "type": "uint256"
1501
+ }
1502
+ ],
1503
+ "stateMutability": "nonpayable",
1504
+ "type": "function"
1505
+ },
1506
+ {
1507
+ "inputs": [],
1508
+ "name": "supplyRatePerBlock",
1509
+ "outputs": [
1510
+ {
1511
+ "internalType": "uint256",
1512
+ "name": "",
1513
+ "type": "uint256"
1514
+ }
1515
+ ],
1516
+ "stateMutability": "view",
1517
+ "type": "function"
1518
+ },
1519
+ {
1520
+ "inputs": [
1521
+ {
1522
+ "internalType": "contract EIP20NonStandardInterface",
1523
+ "name": "token",
1524
+ "type": "address"
1525
+ }
1526
+ ],
1527
+ "name": "sweepToken",
1528
+ "outputs": [],
1529
+ "stateMutability": "nonpayable",
1530
+ "type": "function"
1531
+ },
1532
+ {
1533
+ "inputs": [],
1534
+ "name": "symbol",
1535
+ "outputs": [
1536
+ {
1537
+ "internalType": "string",
1538
+ "name": "",
1539
+ "type": "string"
1540
+ }
1541
+ ],
1542
+ "stateMutability": "view",
1543
+ "type": "function"
1544
+ },
1545
+ {
1546
+ "inputs": [],
1547
+ "name": "totalBorrows",
1548
+ "outputs": [
1549
+ {
1550
+ "internalType": "uint256",
1551
+ "name": "",
1552
+ "type": "uint256"
1553
+ }
1554
+ ],
1555
+ "stateMutability": "view",
1556
+ "type": "function"
1557
+ },
1558
+ {
1559
+ "inputs": [],
1560
+ "name": "totalBorrowsCurrent",
1561
+ "outputs": [
1562
+ {
1563
+ "internalType": "uint256",
1564
+ "name": "",
1565
+ "type": "uint256"
1566
+ }
1567
+ ],
1568
+ "stateMutability": "nonpayable",
1569
+ "type": "function"
1570
+ },
1571
+ {
1572
+ "inputs": [],
1573
+ "name": "totalReserves",
1574
+ "outputs": [
1575
+ {
1576
+ "internalType": "uint256",
1577
+ "name": "",
1578
+ "type": "uint256"
1579
+ }
1580
+ ],
1581
+ "stateMutability": "view",
1582
+ "type": "function"
1583
+ },
1584
+ {
1585
+ "inputs": [],
1586
+ "name": "totalSupply",
1587
+ "outputs": [
1588
+ {
1589
+ "internalType": "uint256",
1590
+ "name": "",
1591
+ "type": "uint256"
1592
+ }
1593
+ ],
1594
+ "stateMutability": "view",
1595
+ "type": "function"
1596
+ },
1597
+ {
1598
+ "inputs": [
1599
+ {
1600
+ "internalType": "address",
1601
+ "name": "dst",
1602
+ "type": "address"
1603
+ },
1604
+ {
1605
+ "internalType": "uint256",
1606
+ "name": "amount",
1607
+ "type": "uint256"
1608
+ }
1609
+ ],
1610
+ "name": "transfer",
1611
+ "outputs": [
1612
+ {
1613
+ "internalType": "bool",
1614
+ "name": "",
1615
+ "type": "bool"
1616
+ }
1617
+ ],
1618
+ "stateMutability": "nonpayable",
1619
+ "type": "function"
1620
+ },
1621
+ {
1622
+ "inputs": [
1623
+ {
1624
+ "internalType": "address",
1625
+ "name": "src",
1626
+ "type": "address"
1627
+ },
1628
+ {
1629
+ "internalType": "address",
1630
+ "name": "dst",
1631
+ "type": "address"
1632
+ },
1633
+ {
1634
+ "internalType": "uint256",
1635
+ "name": "amount",
1636
+ "type": "uint256"
1637
+ }
1638
+ ],
1639
+ "name": "transferFrom",
1640
+ "outputs": [
1641
+ {
1642
+ "internalType": "bool",
1643
+ "name": "",
1644
+ "type": "bool"
1645
+ }
1646
+ ],
1647
+ "stateMutability": "nonpayable",
1648
+ "type": "function"
1649
+ },
1650
+ {
1651
+ "inputs": [],
1652
+ "name": "underlying",
1653
+ "outputs": [
1654
+ {
1655
+ "internalType": "address",
1656
+ "name": "",
1657
+ "type": "address"
1658
+ }
1659
+ ],
1660
+ "stateMutability": "view",
1661
+ "type": "function"
1662
+ },
1663
+ {
1664
+ "inputs": [],
1665
+ "name": "whitelist",
1666
+ "outputs": [
1667
+ {
1668
+ "internalType": "contract WhitelistAccess",
1669
+ "name": "",
1670
+ "type": "address"
1671
+ }
1672
+ ],
1673
+ "stateMutability": "view",
1674
+ "type": "function"
1675
+ }
1676
+ ];
1677
+ /**
1678
+ * CErc20Delegate_json Contract Class
1679
+ *
1680
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1681
+ *
1682
+ * @example
1683
+ * ```typescript
1684
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1685
+ * import { mainnet } from 'viem/chains';
1686
+ * import { CErc20Delegate_json } from 'CErc20Delegate_json';
1687
+ *
1688
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1689
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1690
+ *
1691
+ * const contract = new CErc20Delegate_json('0x...', { publicClient, walletClient });
1692
+ *
1693
+ * // Read functions
1694
+ * const result = await contract.balanceOf('0x...');
1695
+ *
1696
+ * // Write functions
1697
+ * const hash = await contract.transfer('0x...', 1000n);
1698
+ *
1699
+ * // Simulate transactions (dry-run)
1700
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1701
+ * console.log('Gas estimate:', simulation.request.gas);
1702
+ *
1703
+ * // Watch events
1704
+ * const unwatch = contract.watch.Transfer((event) => {
1705
+ * console.log('Transfer event:', event);
1706
+ * });
1707
+ * ```
1708
+ */
1709
+ class CErc20Delegate_json {
1710
+ constructor(address, clients) {
1711
+ this.contractAddress = address;
1712
+ this.publicClient = clients.publicClient;
1713
+ this.contract = (0, viem_1.getContract)({
1714
+ address,
1715
+ abi: exports.CErc20Delegate_jsonAbi,
1716
+ client: {
1717
+ public: clients.publicClient,
1718
+ wallet: clients.walletClient,
1719
+ },
1720
+ });
1721
+ }
1722
+ /**
1723
+ * Get the contract address
1724
+ */
1725
+ get address() {
1726
+ return this.contractAddress;
1727
+ }
1728
+ /**
1729
+ * Get the underlying viem contract instance
1730
+ */
1731
+ getContract() {
1732
+ return this.contract;
1733
+ }
1734
+ /**
1735
+ * NO_ERROR
1736
+ * view
1737
+ */
1738
+ async NO_ERROR() {
1739
+ return this.contract.read.NO_ERROR();
1740
+ }
1741
+ /**
1742
+ * accrualBlockNumber
1743
+ * view
1744
+ */
1745
+ async accrualBlockNumber() {
1746
+ return this.contract.read.accrualBlockNumber();
1747
+ }
1748
+ /**
1749
+ * admin
1750
+ * view
1751
+ */
1752
+ async admin() {
1753
+ return this.contract.read.admin();
1754
+ }
1755
+ /**
1756
+ * allowance
1757
+ * view
1758
+ */
1759
+ async allowance(owner, spender) {
1760
+ return this.contract.read.allowance([owner, spender]);
1761
+ }
1762
+ /**
1763
+ * balanceOf
1764
+ * view
1765
+ */
1766
+ async balanceOf(owner) {
1767
+ return this.contract.read.balanceOf([owner]);
1768
+ }
1769
+ /**
1770
+ * borrowBalanceStored
1771
+ * view
1772
+ */
1773
+ async borrowBalanceStored(account) {
1774
+ return this.contract.read.borrowBalanceStored([account]);
1775
+ }
1776
+ /**
1777
+ * borrowIndex
1778
+ * view
1779
+ */
1780
+ async borrowIndex() {
1781
+ return this.contract.read.borrowIndex();
1782
+ }
1783
+ /**
1784
+ * borrowRatePerBlock
1785
+ * view
1786
+ */
1787
+ async borrowRatePerBlock() {
1788
+ return this.contract.read.borrowRatePerBlock();
1789
+ }
1790
+ /**
1791
+ * comptroller
1792
+ * view
1793
+ */
1794
+ async comptroller() {
1795
+ return this.contract.read.comptroller();
1796
+ }
1797
+ /**
1798
+ * decimals
1799
+ * view
1800
+ */
1801
+ async decimals() {
1802
+ return this.contract.read.decimals();
1803
+ }
1804
+ /**
1805
+ * exchangeRateStored
1806
+ * view
1807
+ */
1808
+ async exchangeRateStored() {
1809
+ return this.contract.read.exchangeRateStored();
1810
+ }
1811
+ /**
1812
+ * getAccountSnapshot
1813
+ * view
1814
+ */
1815
+ async getAccountSnapshot(account) {
1816
+ return this.contract.read.getAccountSnapshot([account]);
1817
+ }
1818
+ /**
1819
+ * getCash
1820
+ * view
1821
+ */
1822
+ async getCash() {
1823
+ return this.contract.read.getCash();
1824
+ }
1825
+ /**
1826
+ * implementation
1827
+ * view
1828
+ */
1829
+ async implementation() {
1830
+ return this.contract.read.implementation();
1831
+ }
1832
+ /**
1833
+ * interestRateModel
1834
+ * view
1835
+ */
1836
+ async interestRateModel() {
1837
+ return this.contract.read.interestRateModel();
1838
+ }
1839
+ /**
1840
+ * isCToken
1841
+ * view
1842
+ */
1843
+ async isCToken() {
1844
+ return this.contract.read.isCToken();
1845
+ }
1846
+ /**
1847
+ * name
1848
+ * view
1849
+ */
1850
+ async name() {
1851
+ return this.contract.read.name();
1852
+ }
1853
+ /**
1854
+ * pendingAdmin
1855
+ * view
1856
+ */
1857
+ async pendingAdmin() {
1858
+ return this.contract.read.pendingAdmin();
1859
+ }
1860
+ /**
1861
+ * protocolSeizeShareMantissa
1862
+ * view
1863
+ */
1864
+ async protocolSeizeShareMantissa() {
1865
+ return this.contract.read.protocolSeizeShareMantissa();
1866
+ }
1867
+ /**
1868
+ * reserveFactorMantissa
1869
+ * view
1870
+ */
1871
+ async reserveFactorMantissa() {
1872
+ return this.contract.read.reserveFactorMantissa();
1873
+ }
1874
+ /**
1875
+ * supplyRatePerBlock
1876
+ * view
1877
+ */
1878
+ async supplyRatePerBlock() {
1879
+ return this.contract.read.supplyRatePerBlock();
1880
+ }
1881
+ /**
1882
+ * symbol
1883
+ * view
1884
+ */
1885
+ async symbol() {
1886
+ return this.contract.read.symbol();
1887
+ }
1888
+ /**
1889
+ * totalBorrows
1890
+ * view
1891
+ */
1892
+ async totalBorrows() {
1893
+ return this.contract.read.totalBorrows();
1894
+ }
1895
+ /**
1896
+ * totalReserves
1897
+ * view
1898
+ */
1899
+ async totalReserves() {
1900
+ return this.contract.read.totalReserves();
1901
+ }
1902
+ /**
1903
+ * totalSupply
1904
+ * view
1905
+ */
1906
+ async totalSupply() {
1907
+ return this.contract.read.totalSupply();
1908
+ }
1909
+ /**
1910
+ * underlying
1911
+ * view
1912
+ */
1913
+ async underlying() {
1914
+ return this.contract.read.underlying();
1915
+ }
1916
+ /**
1917
+ * whitelist
1918
+ * view
1919
+ */
1920
+ async whitelist() {
1921
+ return this.contract.read.whitelist();
1922
+ }
1923
+ /**
1924
+ * _acceptAdmin
1925
+ * nonpayable
1926
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1927
+ */
1928
+ async _acceptAdmin(options) {
1929
+ if (!this.contract.write) {
1930
+ throw new Error('Wallet client is required for write operations');
1931
+ }
1932
+ return this.contract.write._acceptAdmin(options);
1933
+ }
1934
+ /**
1935
+ * _addReserves
1936
+ * nonpayable
1937
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1938
+ */
1939
+ async _addReserves(addAmount, options) {
1940
+ if (!this.contract.write) {
1941
+ throw new Error('Wallet client is required for write operations');
1942
+ }
1943
+ return this.contract.write._addReserves([addAmount], options);
1944
+ }
1945
+ /**
1946
+ * _becomeImplementation
1947
+ * nonpayable
1948
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1949
+ */
1950
+ async _becomeImplementation(data, options) {
1951
+ if (!this.contract.write) {
1952
+ throw new Error('Wallet client is required for write operations');
1953
+ }
1954
+ return this.contract.write._becomeImplementation([data], options);
1955
+ }
1956
+ /**
1957
+ * _delegateCompLikeTo
1958
+ * nonpayable
1959
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1960
+ */
1961
+ async _delegateCompLikeTo(compLikeDelegatee, options) {
1962
+ if (!this.contract.write) {
1963
+ throw new Error('Wallet client is required for write operations');
1964
+ }
1965
+ return this.contract.write._delegateCompLikeTo([compLikeDelegatee], options);
1966
+ }
1967
+ /**
1968
+ * _reduceReserves
1969
+ * nonpayable
1970
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1971
+ */
1972
+ async _reduceReserves(reduceAmount, options) {
1973
+ if (!this.contract.write) {
1974
+ throw new Error('Wallet client is required for write operations');
1975
+ }
1976
+ return this.contract.write._reduceReserves([reduceAmount], options);
1977
+ }
1978
+ /**
1979
+ * _resignImplementation
1980
+ * nonpayable
1981
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1982
+ */
1983
+ async _resignImplementation(options) {
1984
+ if (!this.contract.write) {
1985
+ throw new Error('Wallet client is required for write operations');
1986
+ }
1987
+ return this.contract.write._resignImplementation(options);
1988
+ }
1989
+ /**
1990
+ * _setComptroller
1991
+ * nonpayable
1992
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1993
+ */
1994
+ async _setComptroller(newComptroller, options) {
1995
+ if (!this.contract.write) {
1996
+ throw new Error('Wallet client is required for write operations');
1997
+ }
1998
+ return this.contract.write._setComptroller([newComptroller], options);
1999
+ }
2000
+ /**
2001
+ * _setInterestRateModel
2002
+ * nonpayable
2003
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2004
+ */
2005
+ async _setInterestRateModel(newInterestRateModel, options) {
2006
+ if (!this.contract.write) {
2007
+ throw new Error('Wallet client is required for write operations');
2008
+ }
2009
+ return this.contract.write._setInterestRateModel([newInterestRateModel], options);
2010
+ }
2011
+ /**
2012
+ * _setPendingAdmin
2013
+ * nonpayable
2014
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2015
+ */
2016
+ async _setPendingAdmin(newPendingAdmin, options) {
2017
+ if (!this.contract.write) {
2018
+ throw new Error('Wallet client is required for write operations');
2019
+ }
2020
+ return this.contract.write._setPendingAdmin([newPendingAdmin], options);
2021
+ }
2022
+ /**
2023
+ * _setReserveFactor
2024
+ * nonpayable
2025
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2026
+ */
2027
+ async _setReserveFactor(newReserveFactorMantissa, options) {
2028
+ if (!this.contract.write) {
2029
+ throw new Error('Wallet client is required for write operations');
2030
+ }
2031
+ return this.contract.write._setReserveFactor([newReserveFactorMantissa], options);
2032
+ }
2033
+ /**
2034
+ * _setWhitelist
2035
+ * nonpayable
2036
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2037
+ */
2038
+ async _setWhitelist(newWhitelist, options) {
2039
+ if (!this.contract.write) {
2040
+ throw new Error('Wallet client is required for write operations');
2041
+ }
2042
+ return this.contract.write._setWhitelist([newWhitelist], options);
2043
+ }
2044
+ /**
2045
+ * accrueInterest
2046
+ * nonpayable
2047
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2048
+ */
2049
+ async accrueInterest(options) {
2050
+ if (!this.contract.write) {
2051
+ throw new Error('Wallet client is required for write operations');
2052
+ }
2053
+ return this.contract.write.accrueInterest(options);
2054
+ }
2055
+ /**
2056
+ * approve
2057
+ * nonpayable
2058
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2059
+ */
2060
+ async approve(spender, amount, options) {
2061
+ if (!this.contract.write) {
2062
+ throw new Error('Wallet client is required for write operations');
2063
+ }
2064
+ return this.contract.write.approve([spender, amount], options);
2065
+ }
2066
+ /**
2067
+ * balanceOfUnderlying
2068
+ * nonpayable
2069
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2070
+ */
2071
+ async balanceOfUnderlying(owner, options) {
2072
+ if (!this.contract.write) {
2073
+ throw new Error('Wallet client is required for write operations');
2074
+ }
2075
+ return this.contract.write.balanceOfUnderlying([owner], options);
2076
+ }
2077
+ /**
2078
+ * borrow
2079
+ * nonpayable
2080
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2081
+ */
2082
+ async borrow(borrowAmount, options) {
2083
+ if (!this.contract.write) {
2084
+ throw new Error('Wallet client is required for write operations');
2085
+ }
2086
+ return this.contract.write.borrow([borrowAmount], options);
2087
+ }
2088
+ /**
2089
+ * borrowBalanceCurrent
2090
+ * nonpayable
2091
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2092
+ */
2093
+ async borrowBalanceCurrent(account, options) {
2094
+ if (!this.contract.write) {
2095
+ throw new Error('Wallet client is required for write operations');
2096
+ }
2097
+ return this.contract.write.borrowBalanceCurrent([account], options);
2098
+ }
2099
+ /**
2100
+ * exchangeRateCurrent
2101
+ * nonpayable
2102
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2103
+ */
2104
+ async exchangeRateCurrent(options) {
2105
+ if (!this.contract.write) {
2106
+ throw new Error('Wallet client is required for write operations');
2107
+ }
2108
+ return this.contract.write.exchangeRateCurrent(options);
2109
+ }
2110
+ async initialize(...args) {
2111
+ if (!this.contract.write) {
2112
+ throw new Error('Wallet client is required for write operations');
2113
+ }
2114
+ return this.contract.write.initialize(args);
2115
+ }
2116
+ /**
2117
+ * liquidateBorrow
2118
+ * nonpayable
2119
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2120
+ */
2121
+ async liquidateBorrow(borrower, repayAmount, cTokenCollateral, options) {
2122
+ if (!this.contract.write) {
2123
+ throw new Error('Wallet client is required for write operations');
2124
+ }
2125
+ return this.contract.write.liquidateBorrow([borrower, repayAmount, cTokenCollateral], options);
2126
+ }
2127
+ /**
2128
+ * mint
2129
+ * nonpayable
2130
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2131
+ */
2132
+ async mint(mintAmount, options) {
2133
+ if (!this.contract.write) {
2134
+ throw new Error('Wallet client is required for write operations');
2135
+ }
2136
+ return this.contract.write.mint([mintAmount], options);
2137
+ }
2138
+ /**
2139
+ * redeem
2140
+ * nonpayable
2141
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2142
+ */
2143
+ async redeem(redeemTokens, options) {
2144
+ if (!this.contract.write) {
2145
+ throw new Error('Wallet client is required for write operations');
2146
+ }
2147
+ return this.contract.write.redeem([redeemTokens], options);
2148
+ }
2149
+ /**
2150
+ * redeemUnderlying
2151
+ * nonpayable
2152
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2153
+ */
2154
+ async redeemUnderlying(redeemAmount, options) {
2155
+ if (!this.contract.write) {
2156
+ throw new Error('Wallet client is required for write operations');
2157
+ }
2158
+ return this.contract.write.redeemUnderlying([redeemAmount], options);
2159
+ }
2160
+ /**
2161
+ * repayBorrow
2162
+ * nonpayable
2163
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2164
+ */
2165
+ async repayBorrow(repayAmount, options) {
2166
+ if (!this.contract.write) {
2167
+ throw new Error('Wallet client is required for write operations');
2168
+ }
2169
+ return this.contract.write.repayBorrow([repayAmount], options);
2170
+ }
2171
+ /**
2172
+ * repayBorrowBehalf
2173
+ * nonpayable
2174
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2175
+ */
2176
+ async repayBorrowBehalf(borrower, repayAmount, options) {
2177
+ if (!this.contract.write) {
2178
+ throw new Error('Wallet client is required for write operations');
2179
+ }
2180
+ return this.contract.write.repayBorrowBehalf([borrower, repayAmount], options);
2181
+ }
2182
+ /**
2183
+ * seize
2184
+ * nonpayable
2185
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2186
+ */
2187
+ async seize(liquidator, borrower, seizeTokens, options) {
2188
+ if (!this.contract.write) {
2189
+ throw new Error('Wallet client is required for write operations');
2190
+ }
2191
+ return this.contract.write.seize([liquidator, borrower, seizeTokens], options);
2192
+ }
2193
+ /**
2194
+ * sweepToken
2195
+ * nonpayable
2196
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2197
+ */
2198
+ async sweepToken(token, options) {
2199
+ if (!this.contract.write) {
2200
+ throw new Error('Wallet client is required for write operations');
2201
+ }
2202
+ return this.contract.write.sweepToken([token], options);
2203
+ }
2204
+ /**
2205
+ * totalBorrowsCurrent
2206
+ * nonpayable
2207
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2208
+ */
2209
+ async totalBorrowsCurrent(options) {
2210
+ if (!this.contract.write) {
2211
+ throw new Error('Wallet client is required for write operations');
2212
+ }
2213
+ return this.contract.write.totalBorrowsCurrent(options);
2214
+ }
2215
+ /**
2216
+ * transfer
2217
+ * nonpayable
2218
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2219
+ */
2220
+ async transfer(dst, amount, options) {
2221
+ if (!this.contract.write) {
2222
+ throw new Error('Wallet client is required for write operations');
2223
+ }
2224
+ return this.contract.write.transfer([dst, amount], options);
2225
+ }
2226
+ /**
2227
+ * transferFrom
2228
+ * nonpayable
2229
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2230
+ */
2231
+ async transferFrom(src, dst, amount, options) {
2232
+ if (!this.contract.write) {
2233
+ throw new Error('Wallet client is required for write operations');
2234
+ }
2235
+ return this.contract.write.transferFrom([src, dst, amount], options);
2236
+ }
2237
+ /**
2238
+ * Simulate contract write operations (dry-run without sending transaction)
2239
+ *
2240
+ * @example
2241
+ * const result = await contract.simulate.transfer('0x...', 1000n);
2242
+ * console.log('Gas estimate:', result.request.gas);
2243
+ * console.log('Would succeed:', result.result);
2244
+ */
2245
+ get simulate() {
2246
+ const contract = this.contract;
2247
+ if (!contract.simulate) {
2248
+ throw new Error('Public client is required for simulation');
2249
+ }
2250
+ return {
2251
+ /**
2252
+ * Simulate _acceptAdmin
2253
+ * Returns gas estimate and result without sending transaction
2254
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2255
+ */
2256
+ async _acceptAdmin(options) {
2257
+ return contract.simulate._acceptAdmin(options);
2258
+ },
2259
+ /**
2260
+ * Simulate _addReserves
2261
+ * Returns gas estimate and result without sending transaction
2262
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2263
+ */
2264
+ async _addReserves(addAmount, options) {
2265
+ return contract.simulate._addReserves([addAmount], options);
2266
+ },
2267
+ /**
2268
+ * Simulate _becomeImplementation
2269
+ * Returns gas estimate and result without sending transaction
2270
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2271
+ */
2272
+ async _becomeImplementation(data, options) {
2273
+ return contract.simulate._becomeImplementation([data], options);
2274
+ },
2275
+ /**
2276
+ * Simulate _delegateCompLikeTo
2277
+ * Returns gas estimate and result without sending transaction
2278
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2279
+ */
2280
+ async _delegateCompLikeTo(compLikeDelegatee, options) {
2281
+ return contract.simulate._delegateCompLikeTo([compLikeDelegatee], options);
2282
+ },
2283
+ /**
2284
+ * Simulate _reduceReserves
2285
+ * Returns gas estimate and result without sending transaction
2286
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2287
+ */
2288
+ async _reduceReserves(reduceAmount, options) {
2289
+ return contract.simulate._reduceReserves([reduceAmount], options);
2290
+ },
2291
+ /**
2292
+ * Simulate _resignImplementation
2293
+ * Returns gas estimate and result without sending transaction
2294
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2295
+ */
2296
+ async _resignImplementation(options) {
2297
+ return contract.simulate._resignImplementation(options);
2298
+ },
2299
+ /**
2300
+ * Simulate _setComptroller
2301
+ * Returns gas estimate and result without sending transaction
2302
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2303
+ */
2304
+ async _setComptroller(newComptroller, options) {
2305
+ return contract.simulate._setComptroller([newComptroller], options);
2306
+ },
2307
+ /**
2308
+ * Simulate _setInterestRateModel
2309
+ * Returns gas estimate and result without sending transaction
2310
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2311
+ */
2312
+ async _setInterestRateModel(newInterestRateModel, options) {
2313
+ return contract.simulate._setInterestRateModel([newInterestRateModel], options);
2314
+ },
2315
+ /**
2316
+ * Simulate _setPendingAdmin
2317
+ * Returns gas estimate and result without sending transaction
2318
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2319
+ */
2320
+ async _setPendingAdmin(newPendingAdmin, options) {
2321
+ return contract.simulate._setPendingAdmin([newPendingAdmin], options);
2322
+ },
2323
+ /**
2324
+ * Simulate _setReserveFactor
2325
+ * Returns gas estimate and result without sending transaction
2326
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2327
+ */
2328
+ async _setReserveFactor(newReserveFactorMantissa, options) {
2329
+ return contract.simulate._setReserveFactor([newReserveFactorMantissa], options);
2330
+ },
2331
+ /**
2332
+ * Simulate _setWhitelist
2333
+ * Returns gas estimate and result without sending transaction
2334
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2335
+ */
2336
+ async _setWhitelist(newWhitelist, options) {
2337
+ return contract.simulate._setWhitelist([newWhitelist], options);
2338
+ },
2339
+ /**
2340
+ * Simulate accrueInterest
2341
+ * Returns gas estimate and result without sending transaction
2342
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2343
+ */
2344
+ async accrueInterest(options) {
2345
+ return contract.simulate.accrueInterest(options);
2346
+ },
2347
+ /**
2348
+ * Simulate approve
2349
+ * Returns gas estimate and result without sending transaction
2350
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2351
+ */
2352
+ async approve(spender, amount, options) {
2353
+ return contract.simulate.approve([spender, amount], options);
2354
+ },
2355
+ /**
2356
+ * Simulate balanceOfUnderlying
2357
+ * Returns gas estimate and result without sending transaction
2358
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2359
+ */
2360
+ async balanceOfUnderlying(owner, options) {
2361
+ return contract.simulate.balanceOfUnderlying([owner], options);
2362
+ },
2363
+ /**
2364
+ * Simulate borrow
2365
+ * Returns gas estimate and result without sending transaction
2366
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2367
+ */
2368
+ async borrow(borrowAmount, options) {
2369
+ return contract.simulate.borrow([borrowAmount], options);
2370
+ },
2371
+ /**
2372
+ * Simulate borrowBalanceCurrent
2373
+ * Returns gas estimate and result without sending transaction
2374
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2375
+ */
2376
+ async borrowBalanceCurrent(account, options) {
2377
+ return contract.simulate.borrowBalanceCurrent([account], options);
2378
+ },
2379
+ /**
2380
+ * Simulate exchangeRateCurrent
2381
+ * Returns gas estimate and result without sending transaction
2382
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2383
+ */
2384
+ async exchangeRateCurrent(options) {
2385
+ return contract.simulate.exchangeRateCurrent(options);
2386
+ },
2387
+ /**
2388
+ * Simulate initialize
2389
+ * Returns gas estimate and result without sending transaction
2390
+ * Supports multiple overloads: (address, address, address, uint256, string, string, uint8), (address, address, uint256, string, string, uint8)
2391
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2392
+ */
2393
+ async initialize(...args) {
2394
+ return contract.simulate.initialize(args);
2395
+ },
2396
+ /**
2397
+ * Simulate liquidateBorrow
2398
+ * Returns gas estimate and result without sending transaction
2399
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2400
+ */
2401
+ async liquidateBorrow(borrower, repayAmount, cTokenCollateral, options) {
2402
+ return contract.simulate.liquidateBorrow([borrower, repayAmount, cTokenCollateral], options);
2403
+ },
2404
+ /**
2405
+ * Simulate mint
2406
+ * Returns gas estimate and result without sending transaction
2407
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2408
+ */
2409
+ async mint(mintAmount, options) {
2410
+ return contract.simulate.mint([mintAmount], options);
2411
+ },
2412
+ /**
2413
+ * Simulate redeem
2414
+ * Returns gas estimate and result without sending transaction
2415
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2416
+ */
2417
+ async redeem(redeemTokens, options) {
2418
+ return contract.simulate.redeem([redeemTokens], options);
2419
+ },
2420
+ /**
2421
+ * Simulate redeemUnderlying
2422
+ * Returns gas estimate and result without sending transaction
2423
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2424
+ */
2425
+ async redeemUnderlying(redeemAmount, options) {
2426
+ return contract.simulate.redeemUnderlying([redeemAmount], options);
2427
+ },
2428
+ /**
2429
+ * Simulate repayBorrow
2430
+ * Returns gas estimate and result without sending transaction
2431
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2432
+ */
2433
+ async repayBorrow(repayAmount, options) {
2434
+ return contract.simulate.repayBorrow([repayAmount], options);
2435
+ },
2436
+ /**
2437
+ * Simulate repayBorrowBehalf
2438
+ * Returns gas estimate and result without sending transaction
2439
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2440
+ */
2441
+ async repayBorrowBehalf(borrower, repayAmount, options) {
2442
+ return contract.simulate.repayBorrowBehalf([borrower, repayAmount], options);
2443
+ },
2444
+ /**
2445
+ * Simulate seize
2446
+ * Returns gas estimate and result without sending transaction
2447
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2448
+ */
2449
+ async seize(liquidator, borrower, seizeTokens, options) {
2450
+ return contract.simulate.seize([liquidator, borrower, seizeTokens], options);
2451
+ },
2452
+ /**
2453
+ * Simulate sweepToken
2454
+ * Returns gas estimate and result without sending transaction
2455
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2456
+ */
2457
+ async sweepToken(token, options) {
2458
+ return contract.simulate.sweepToken([token], options);
2459
+ },
2460
+ /**
2461
+ * Simulate totalBorrowsCurrent
2462
+ * Returns gas estimate and result without sending transaction
2463
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2464
+ */
2465
+ async totalBorrowsCurrent(options) {
2466
+ return contract.simulate.totalBorrowsCurrent(options);
2467
+ },
2468
+ /**
2469
+ * Simulate transfer
2470
+ * Returns gas estimate and result without sending transaction
2471
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2472
+ */
2473
+ async transfer(dst, amount, options) {
2474
+ return contract.simulate.transfer([dst, amount], options);
2475
+ },
2476
+ /**
2477
+ * Simulate transferFrom
2478
+ * Returns gas estimate and result without sending transaction
2479
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2480
+ */
2481
+ async transferFrom(src, dst, amount, options) {
2482
+ return contract.simulate.transferFrom([src, dst, amount], options);
2483
+ }
2484
+ };
2485
+ }
2486
+ /**
2487
+ * Watch contract events
2488
+ *
2489
+ * @example
2490
+ * // Watch all Transfer events
2491
+ * const unwatch = contract.watch.Transfer((event) => {
2492
+ * console.log('Transfer:', event);
2493
+ * });
2494
+ *
2495
+ * // Stop watching
2496
+ * unwatch();
2497
+ */
2498
+ get watch() {
2499
+ return {
2500
+ /**
2501
+ * Watch AccrueInterest events
2502
+ * @param callback Function to call when event is emitted
2503
+ * @param filter Optional filter for indexed parameters
2504
+ * @returns Unwatch function to stop listening
2505
+ */
2506
+ AccrueInterest: (callback) => {
2507
+ return this.publicClient.watchContractEvent({
2508
+ address: this.contractAddress,
2509
+ abi: exports.CErc20Delegate_jsonAbi,
2510
+ eventName: 'AccrueInterest',
2511
+ onLogs: (logs) => {
2512
+ logs.forEach((log) => {
2513
+ callback(log.args);
2514
+ });
2515
+ },
2516
+ });
2517
+ },
2518
+ /**
2519
+ * Watch Approval events
2520
+ * @param callback Function to call when event is emitted
2521
+ * @param filter Optional filter for indexed parameters
2522
+ * @returns Unwatch function to stop listening
2523
+ */
2524
+ Approval: (callback, filter) => {
2525
+ return this.publicClient.watchContractEvent({
2526
+ address: this.contractAddress,
2527
+ abi: exports.CErc20Delegate_jsonAbi,
2528
+ eventName: 'Approval',
2529
+ args: filter,
2530
+ onLogs: (logs) => {
2531
+ logs.forEach((log) => {
2532
+ callback(log.args);
2533
+ });
2534
+ },
2535
+ });
2536
+ },
2537
+ /**
2538
+ * Watch Borrow events
2539
+ * @param callback Function to call when event is emitted
2540
+ * @param filter Optional filter for indexed parameters
2541
+ * @returns Unwatch function to stop listening
2542
+ */
2543
+ Borrow: (callback) => {
2544
+ return this.publicClient.watchContractEvent({
2545
+ address: this.contractAddress,
2546
+ abi: exports.CErc20Delegate_jsonAbi,
2547
+ eventName: 'Borrow',
2548
+ onLogs: (logs) => {
2549
+ logs.forEach((log) => {
2550
+ callback(log.args);
2551
+ });
2552
+ },
2553
+ });
2554
+ },
2555
+ /**
2556
+ * Watch LiquidateBorrow events
2557
+ * @param callback Function to call when event is emitted
2558
+ * @param filter Optional filter for indexed parameters
2559
+ * @returns Unwatch function to stop listening
2560
+ */
2561
+ LiquidateBorrow: (callback) => {
2562
+ return this.publicClient.watchContractEvent({
2563
+ address: this.contractAddress,
2564
+ abi: exports.CErc20Delegate_jsonAbi,
2565
+ eventName: 'LiquidateBorrow',
2566
+ onLogs: (logs) => {
2567
+ logs.forEach((log) => {
2568
+ callback(log.args);
2569
+ });
2570
+ },
2571
+ });
2572
+ },
2573
+ /**
2574
+ * Watch Mint events
2575
+ * @param callback Function to call when event is emitted
2576
+ * @param filter Optional filter for indexed parameters
2577
+ * @returns Unwatch function to stop listening
2578
+ */
2579
+ Mint: (callback) => {
2580
+ return this.publicClient.watchContractEvent({
2581
+ address: this.contractAddress,
2582
+ abi: exports.CErc20Delegate_jsonAbi,
2583
+ eventName: 'Mint',
2584
+ onLogs: (logs) => {
2585
+ logs.forEach((log) => {
2586
+ callback(log.args);
2587
+ });
2588
+ },
2589
+ });
2590
+ },
2591
+ /**
2592
+ * Watch NewAdmin events
2593
+ * @param callback Function to call when event is emitted
2594
+ * @param filter Optional filter for indexed parameters
2595
+ * @returns Unwatch function to stop listening
2596
+ */
2597
+ NewAdmin: (callback) => {
2598
+ return this.publicClient.watchContractEvent({
2599
+ address: this.contractAddress,
2600
+ abi: exports.CErc20Delegate_jsonAbi,
2601
+ eventName: 'NewAdmin',
2602
+ onLogs: (logs) => {
2603
+ logs.forEach((log) => {
2604
+ callback(log.args);
2605
+ });
2606
+ },
2607
+ });
2608
+ },
2609
+ /**
2610
+ * Watch NewComptroller events
2611
+ * @param callback Function to call when event is emitted
2612
+ * @param filter Optional filter for indexed parameters
2613
+ * @returns Unwatch function to stop listening
2614
+ */
2615
+ NewComptroller: (callback) => {
2616
+ return this.publicClient.watchContractEvent({
2617
+ address: this.contractAddress,
2618
+ abi: exports.CErc20Delegate_jsonAbi,
2619
+ eventName: 'NewComptroller',
2620
+ onLogs: (logs) => {
2621
+ logs.forEach((log) => {
2622
+ callback(log.args);
2623
+ });
2624
+ },
2625
+ });
2626
+ },
2627
+ /**
2628
+ * Watch NewMarketInterestRateModel events
2629
+ * @param callback Function to call when event is emitted
2630
+ * @param filter Optional filter for indexed parameters
2631
+ * @returns Unwatch function to stop listening
2632
+ */
2633
+ NewMarketInterestRateModel: (callback) => {
2634
+ return this.publicClient.watchContractEvent({
2635
+ address: this.contractAddress,
2636
+ abi: exports.CErc20Delegate_jsonAbi,
2637
+ eventName: 'NewMarketInterestRateModel',
2638
+ onLogs: (logs) => {
2639
+ logs.forEach((log) => {
2640
+ callback(log.args);
2641
+ });
2642
+ },
2643
+ });
2644
+ },
2645
+ /**
2646
+ * Watch NewPendingAdmin events
2647
+ * @param callback Function to call when event is emitted
2648
+ * @param filter Optional filter for indexed parameters
2649
+ * @returns Unwatch function to stop listening
2650
+ */
2651
+ NewPendingAdmin: (callback) => {
2652
+ return this.publicClient.watchContractEvent({
2653
+ address: this.contractAddress,
2654
+ abi: exports.CErc20Delegate_jsonAbi,
2655
+ eventName: 'NewPendingAdmin',
2656
+ onLogs: (logs) => {
2657
+ logs.forEach((log) => {
2658
+ callback(log.args);
2659
+ });
2660
+ },
2661
+ });
2662
+ },
2663
+ /**
2664
+ * Watch NewReserveFactor events
2665
+ * @param callback Function to call when event is emitted
2666
+ * @param filter Optional filter for indexed parameters
2667
+ * @returns Unwatch function to stop listening
2668
+ */
2669
+ NewReserveFactor: (callback) => {
2670
+ return this.publicClient.watchContractEvent({
2671
+ address: this.contractAddress,
2672
+ abi: exports.CErc20Delegate_jsonAbi,
2673
+ eventName: 'NewReserveFactor',
2674
+ onLogs: (logs) => {
2675
+ logs.forEach((log) => {
2676
+ callback(log.args);
2677
+ });
2678
+ },
2679
+ });
2680
+ },
2681
+ /**
2682
+ * Watch NewWhitelist events
2683
+ * @param callback Function to call when event is emitted
2684
+ * @param filter Optional filter for indexed parameters
2685
+ * @returns Unwatch function to stop listening
2686
+ */
2687
+ NewWhitelist: (callback) => {
2688
+ return this.publicClient.watchContractEvent({
2689
+ address: this.contractAddress,
2690
+ abi: exports.CErc20Delegate_jsonAbi,
2691
+ eventName: 'NewWhitelist',
2692
+ onLogs: (logs) => {
2693
+ logs.forEach((log) => {
2694
+ callback(log.args);
2695
+ });
2696
+ },
2697
+ });
2698
+ },
2699
+ /**
2700
+ * Watch Redeem events
2701
+ * @param callback Function to call when event is emitted
2702
+ * @param filter Optional filter for indexed parameters
2703
+ * @returns Unwatch function to stop listening
2704
+ */
2705
+ Redeem: (callback) => {
2706
+ return this.publicClient.watchContractEvent({
2707
+ address: this.contractAddress,
2708
+ abi: exports.CErc20Delegate_jsonAbi,
2709
+ eventName: 'Redeem',
2710
+ onLogs: (logs) => {
2711
+ logs.forEach((log) => {
2712
+ callback(log.args);
2713
+ });
2714
+ },
2715
+ });
2716
+ },
2717
+ /**
2718
+ * Watch RepayBorrow events
2719
+ * @param callback Function to call when event is emitted
2720
+ * @param filter Optional filter for indexed parameters
2721
+ * @returns Unwatch function to stop listening
2722
+ */
2723
+ RepayBorrow: (callback) => {
2724
+ return this.publicClient.watchContractEvent({
2725
+ address: this.contractAddress,
2726
+ abi: exports.CErc20Delegate_jsonAbi,
2727
+ eventName: 'RepayBorrow',
2728
+ onLogs: (logs) => {
2729
+ logs.forEach((log) => {
2730
+ callback(log.args);
2731
+ });
2732
+ },
2733
+ });
2734
+ },
2735
+ /**
2736
+ * Watch ReservesAdded events
2737
+ * @param callback Function to call when event is emitted
2738
+ * @param filter Optional filter for indexed parameters
2739
+ * @returns Unwatch function to stop listening
2740
+ */
2741
+ ReservesAdded: (callback) => {
2742
+ return this.publicClient.watchContractEvent({
2743
+ address: this.contractAddress,
2744
+ abi: exports.CErc20Delegate_jsonAbi,
2745
+ eventName: 'ReservesAdded',
2746
+ onLogs: (logs) => {
2747
+ logs.forEach((log) => {
2748
+ callback(log.args);
2749
+ });
2750
+ },
2751
+ });
2752
+ },
2753
+ /**
2754
+ * Watch ReservesReduced events
2755
+ * @param callback Function to call when event is emitted
2756
+ * @param filter Optional filter for indexed parameters
2757
+ * @returns Unwatch function to stop listening
2758
+ */
2759
+ ReservesReduced: (callback) => {
2760
+ return this.publicClient.watchContractEvent({
2761
+ address: this.contractAddress,
2762
+ abi: exports.CErc20Delegate_jsonAbi,
2763
+ eventName: 'ReservesReduced',
2764
+ onLogs: (logs) => {
2765
+ logs.forEach((log) => {
2766
+ callback(log.args);
2767
+ });
2768
+ },
2769
+ });
2770
+ },
2771
+ /**
2772
+ * Watch Transfer events
2773
+ * @param callback Function to call when event is emitted
2774
+ * @param filter Optional filter for indexed parameters
2775
+ * @returns Unwatch function to stop listening
2776
+ */
2777
+ Transfer: (callback, filter) => {
2778
+ return this.publicClient.watchContractEvent({
2779
+ address: this.contractAddress,
2780
+ abi: exports.CErc20Delegate_jsonAbi,
2781
+ eventName: 'Transfer',
2782
+ args: filter,
2783
+ onLogs: (logs) => {
2784
+ logs.forEach((log) => {
2785
+ callback(log.args);
2786
+ });
2787
+ },
2788
+ });
2789
+ }
2790
+ };
2791
+ }
2792
+ }
2793
+ exports.CErc20Delegate_json = CErc20Delegate_json;