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