@venusprotocol/venus-protocol 9.8.0-dev.22 → 9.8.0-dev.23

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,2382 @@
1
+ {
2
+ "address": "0x6bCa74586218dB34cdB402295796b79663d816e9",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "address",
8
+ "name": "underlying_",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "contract ComptrollerInterface",
13
+ "name": "comptroller_",
14
+ "type": "address"
15
+ },
16
+ {
17
+ "internalType": "contract InterestRateModel",
18
+ "name": "interestRateModel_",
19
+ "type": "address"
20
+ },
21
+ {
22
+ "internalType": "uint256",
23
+ "name": "initialExchangeRateMantissa_",
24
+ "type": "uint256"
25
+ },
26
+ {
27
+ "internalType": "string",
28
+ "name": "name_",
29
+ "type": "string"
30
+ },
31
+ {
32
+ "internalType": "string",
33
+ "name": "symbol_",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "internalType": "uint8",
38
+ "name": "decimals_",
39
+ "type": "uint8"
40
+ },
41
+ {
42
+ "internalType": "address payable",
43
+ "name": "admin_",
44
+ "type": "address"
45
+ },
46
+ {
47
+ "internalType": "address",
48
+ "name": "implementation_",
49
+ "type": "address"
50
+ },
51
+ {
52
+ "internalType": "bytes",
53
+ "name": "becomeImplementationData",
54
+ "type": "bytes"
55
+ }
56
+ ],
57
+ "payable": false,
58
+ "stateMutability": "nonpayable",
59
+ "type": "constructor"
60
+ },
61
+ {
62
+ "anonymous": false,
63
+ "inputs": [
64
+ {
65
+ "indexed": false,
66
+ "internalType": "uint256",
67
+ "name": "cashPrior",
68
+ "type": "uint256"
69
+ },
70
+ {
71
+ "indexed": false,
72
+ "internalType": "uint256",
73
+ "name": "interestAccumulated",
74
+ "type": "uint256"
75
+ },
76
+ {
77
+ "indexed": false,
78
+ "internalType": "uint256",
79
+ "name": "borrowIndex",
80
+ "type": "uint256"
81
+ },
82
+ {
83
+ "indexed": false,
84
+ "internalType": "uint256",
85
+ "name": "totalBorrows",
86
+ "type": "uint256"
87
+ }
88
+ ],
89
+ "name": "AccrueInterest",
90
+ "type": "event"
91
+ },
92
+ {
93
+ "anonymous": false,
94
+ "inputs": [
95
+ {
96
+ "indexed": true,
97
+ "internalType": "address",
98
+ "name": "owner",
99
+ "type": "address"
100
+ },
101
+ {
102
+ "indexed": true,
103
+ "internalType": "address",
104
+ "name": "spender",
105
+ "type": "address"
106
+ },
107
+ {
108
+ "indexed": false,
109
+ "internalType": "uint256",
110
+ "name": "amount",
111
+ "type": "uint256"
112
+ }
113
+ ],
114
+ "name": "Approval",
115
+ "type": "event"
116
+ },
117
+ {
118
+ "anonymous": false,
119
+ "inputs": [
120
+ {
121
+ "indexed": false,
122
+ "internalType": "address",
123
+ "name": "borrower",
124
+ "type": "address"
125
+ },
126
+ {
127
+ "indexed": false,
128
+ "internalType": "uint256",
129
+ "name": "borrowAmount",
130
+ "type": "uint256"
131
+ },
132
+ {
133
+ "indexed": false,
134
+ "internalType": "uint256",
135
+ "name": "accountBorrows",
136
+ "type": "uint256"
137
+ },
138
+ {
139
+ "indexed": false,
140
+ "internalType": "uint256",
141
+ "name": "totalBorrows",
142
+ "type": "uint256"
143
+ }
144
+ ],
145
+ "name": "Borrow",
146
+ "type": "event"
147
+ },
148
+ {
149
+ "anonymous": false,
150
+ "inputs": [
151
+ {
152
+ "indexed": false,
153
+ "internalType": "uint256",
154
+ "name": "error",
155
+ "type": "uint256"
156
+ },
157
+ {
158
+ "indexed": false,
159
+ "internalType": "uint256",
160
+ "name": "info",
161
+ "type": "uint256"
162
+ },
163
+ {
164
+ "indexed": false,
165
+ "internalType": "uint256",
166
+ "name": "detail",
167
+ "type": "uint256"
168
+ }
169
+ ],
170
+ "name": "Failure",
171
+ "type": "event"
172
+ },
173
+ {
174
+ "anonymous": false,
175
+ "inputs": [
176
+ {
177
+ "indexed": false,
178
+ "internalType": "address",
179
+ "name": "liquidator",
180
+ "type": "address"
181
+ },
182
+ {
183
+ "indexed": false,
184
+ "internalType": "address",
185
+ "name": "borrower",
186
+ "type": "address"
187
+ },
188
+ {
189
+ "indexed": false,
190
+ "internalType": "uint256",
191
+ "name": "repayAmount",
192
+ "type": "uint256"
193
+ },
194
+ {
195
+ "indexed": false,
196
+ "internalType": "address",
197
+ "name": "vTokenCollateral",
198
+ "type": "address"
199
+ },
200
+ {
201
+ "indexed": false,
202
+ "internalType": "uint256",
203
+ "name": "seizeTokens",
204
+ "type": "uint256"
205
+ }
206
+ ],
207
+ "name": "LiquidateBorrow",
208
+ "type": "event"
209
+ },
210
+ {
211
+ "anonymous": false,
212
+ "inputs": [
213
+ {
214
+ "indexed": false,
215
+ "internalType": "address",
216
+ "name": "minter",
217
+ "type": "address"
218
+ },
219
+ {
220
+ "indexed": false,
221
+ "internalType": "uint256",
222
+ "name": "mintAmount",
223
+ "type": "uint256"
224
+ },
225
+ {
226
+ "indexed": false,
227
+ "internalType": "uint256",
228
+ "name": "mintTokens",
229
+ "type": "uint256"
230
+ },
231
+ {
232
+ "indexed": false,
233
+ "internalType": "uint256",
234
+ "name": "totalSupply",
235
+ "type": "uint256"
236
+ }
237
+ ],
238
+ "name": "Mint",
239
+ "type": "event"
240
+ },
241
+ {
242
+ "anonymous": false,
243
+ "inputs": [
244
+ {
245
+ "indexed": false,
246
+ "internalType": "address",
247
+ "name": "payer",
248
+ "type": "address"
249
+ },
250
+ {
251
+ "indexed": false,
252
+ "internalType": "address",
253
+ "name": "receiver",
254
+ "type": "address"
255
+ },
256
+ {
257
+ "indexed": false,
258
+ "internalType": "uint256",
259
+ "name": "mintAmount",
260
+ "type": "uint256"
261
+ },
262
+ {
263
+ "indexed": false,
264
+ "internalType": "uint256",
265
+ "name": "mintTokens",
266
+ "type": "uint256"
267
+ },
268
+ {
269
+ "indexed": false,
270
+ "internalType": "uint256",
271
+ "name": "totalSupply",
272
+ "type": "uint256"
273
+ }
274
+ ],
275
+ "name": "MintBehalf",
276
+ "type": "event"
277
+ },
278
+ {
279
+ "anonymous": false,
280
+ "inputs": [
281
+ {
282
+ "indexed": false,
283
+ "internalType": "address",
284
+ "name": "oldAccessControlAddress",
285
+ "type": "address"
286
+ },
287
+ {
288
+ "indexed": false,
289
+ "internalType": "address",
290
+ "name": "newAccessControlAddress",
291
+ "type": "address"
292
+ }
293
+ ],
294
+ "name": "NewAccessControlManager",
295
+ "type": "event"
296
+ },
297
+ {
298
+ "anonymous": false,
299
+ "inputs": [
300
+ {
301
+ "indexed": false,
302
+ "internalType": "address",
303
+ "name": "oldAdmin",
304
+ "type": "address"
305
+ },
306
+ {
307
+ "indexed": false,
308
+ "internalType": "address",
309
+ "name": "newAdmin",
310
+ "type": "address"
311
+ }
312
+ ],
313
+ "name": "NewAdmin",
314
+ "type": "event"
315
+ },
316
+ {
317
+ "anonymous": false,
318
+ "inputs": [
319
+ {
320
+ "indexed": false,
321
+ "internalType": "contract ComptrollerInterface",
322
+ "name": "oldComptroller",
323
+ "type": "address"
324
+ },
325
+ {
326
+ "indexed": false,
327
+ "internalType": "contract ComptrollerInterface",
328
+ "name": "newComptroller",
329
+ "type": "address"
330
+ }
331
+ ],
332
+ "name": "NewComptroller",
333
+ "type": "event"
334
+ },
335
+ {
336
+ "anonymous": false,
337
+ "inputs": [
338
+ {
339
+ "indexed": false,
340
+ "internalType": "address",
341
+ "name": "oldImplementation",
342
+ "type": "address"
343
+ },
344
+ {
345
+ "indexed": false,
346
+ "internalType": "address",
347
+ "name": "newImplementation",
348
+ "type": "address"
349
+ }
350
+ ],
351
+ "name": "NewImplementation",
352
+ "type": "event"
353
+ },
354
+ {
355
+ "anonymous": false,
356
+ "inputs": [
357
+ {
358
+ "indexed": false,
359
+ "internalType": "contract InterestRateModel",
360
+ "name": "oldInterestRateModel",
361
+ "type": "address"
362
+ },
363
+ {
364
+ "indexed": false,
365
+ "internalType": "contract InterestRateModel",
366
+ "name": "newInterestRateModel",
367
+ "type": "address"
368
+ }
369
+ ],
370
+ "name": "NewMarketInterestRateModel",
371
+ "type": "event"
372
+ },
373
+ {
374
+ "anonymous": false,
375
+ "inputs": [
376
+ {
377
+ "indexed": false,
378
+ "internalType": "address",
379
+ "name": "oldPendingAdmin",
380
+ "type": "address"
381
+ },
382
+ {
383
+ "indexed": false,
384
+ "internalType": "address",
385
+ "name": "newPendingAdmin",
386
+ "type": "address"
387
+ }
388
+ ],
389
+ "name": "NewPendingAdmin",
390
+ "type": "event"
391
+ },
392
+ {
393
+ "anonymous": false,
394
+ "inputs": [
395
+ {
396
+ "indexed": true,
397
+ "internalType": "address",
398
+ "name": "oldProtocolShareReserve",
399
+ "type": "address"
400
+ },
401
+ {
402
+ "indexed": true,
403
+ "internalType": "address",
404
+ "name": "newProtocolShareReserve",
405
+ "type": "address"
406
+ }
407
+ ],
408
+ "name": "NewProtocolShareReserve",
409
+ "type": "event"
410
+ },
411
+ {
412
+ "anonymous": false,
413
+ "inputs": [
414
+ {
415
+ "indexed": false,
416
+ "internalType": "uint256",
417
+ "name": "oldReduceReservesBlockDelta",
418
+ "type": "uint256"
419
+ },
420
+ {
421
+ "indexed": false,
422
+ "internalType": "uint256",
423
+ "name": "newReduceReservesBlockDelta",
424
+ "type": "uint256"
425
+ }
426
+ ],
427
+ "name": "NewReduceReservesBlockDelta",
428
+ "type": "event"
429
+ },
430
+ {
431
+ "anonymous": false,
432
+ "inputs": [
433
+ {
434
+ "indexed": false,
435
+ "internalType": "uint256",
436
+ "name": "oldReserveFactorMantissa",
437
+ "type": "uint256"
438
+ },
439
+ {
440
+ "indexed": false,
441
+ "internalType": "uint256",
442
+ "name": "newReserveFactorMantissa",
443
+ "type": "uint256"
444
+ }
445
+ ],
446
+ "name": "NewReserveFactor",
447
+ "type": "event"
448
+ },
449
+ {
450
+ "anonymous": false,
451
+ "inputs": [
452
+ {
453
+ "indexed": false,
454
+ "internalType": "address",
455
+ "name": "redeemer",
456
+ "type": "address"
457
+ },
458
+ {
459
+ "indexed": false,
460
+ "internalType": "uint256",
461
+ "name": "redeemAmount",
462
+ "type": "uint256"
463
+ },
464
+ {
465
+ "indexed": false,
466
+ "internalType": "uint256",
467
+ "name": "redeemTokens",
468
+ "type": "uint256"
469
+ },
470
+ {
471
+ "indexed": false,
472
+ "internalType": "uint256",
473
+ "name": "totalSupply",
474
+ "type": "uint256"
475
+ }
476
+ ],
477
+ "name": "Redeem",
478
+ "type": "event"
479
+ },
480
+ {
481
+ "anonymous": false,
482
+ "inputs": [
483
+ {
484
+ "indexed": false,
485
+ "internalType": "address",
486
+ "name": "redeemer",
487
+ "type": "address"
488
+ },
489
+ {
490
+ "indexed": false,
491
+ "internalType": "uint256",
492
+ "name": "feeAmount",
493
+ "type": "uint256"
494
+ },
495
+ {
496
+ "indexed": false,
497
+ "internalType": "uint256",
498
+ "name": "redeemTokens",
499
+ "type": "uint256"
500
+ }
501
+ ],
502
+ "name": "RedeemFee",
503
+ "type": "event"
504
+ },
505
+ {
506
+ "anonymous": false,
507
+ "inputs": [
508
+ {
509
+ "indexed": false,
510
+ "internalType": "address",
511
+ "name": "payer",
512
+ "type": "address"
513
+ },
514
+ {
515
+ "indexed": false,
516
+ "internalType": "address",
517
+ "name": "borrower",
518
+ "type": "address"
519
+ },
520
+ {
521
+ "indexed": false,
522
+ "internalType": "uint256",
523
+ "name": "repayAmount",
524
+ "type": "uint256"
525
+ },
526
+ {
527
+ "indexed": false,
528
+ "internalType": "uint256",
529
+ "name": "accountBorrows",
530
+ "type": "uint256"
531
+ },
532
+ {
533
+ "indexed": false,
534
+ "internalType": "uint256",
535
+ "name": "totalBorrows",
536
+ "type": "uint256"
537
+ }
538
+ ],
539
+ "name": "RepayBorrow",
540
+ "type": "event"
541
+ },
542
+ {
543
+ "anonymous": false,
544
+ "inputs": [
545
+ {
546
+ "indexed": false,
547
+ "internalType": "address",
548
+ "name": "benefactor",
549
+ "type": "address"
550
+ },
551
+ {
552
+ "indexed": false,
553
+ "internalType": "uint256",
554
+ "name": "addAmount",
555
+ "type": "uint256"
556
+ },
557
+ {
558
+ "indexed": false,
559
+ "internalType": "uint256",
560
+ "name": "newTotalReserves",
561
+ "type": "uint256"
562
+ }
563
+ ],
564
+ "name": "ReservesAdded",
565
+ "type": "event"
566
+ },
567
+ {
568
+ "anonymous": false,
569
+ "inputs": [
570
+ {
571
+ "indexed": false,
572
+ "internalType": "address",
573
+ "name": "protocolShareReserve",
574
+ "type": "address"
575
+ },
576
+ {
577
+ "indexed": false,
578
+ "internalType": "uint256",
579
+ "name": "reduceAmount",
580
+ "type": "uint256"
581
+ },
582
+ {
583
+ "indexed": false,
584
+ "internalType": "uint256",
585
+ "name": "newTotalReserves",
586
+ "type": "uint256"
587
+ }
588
+ ],
589
+ "name": "ReservesReduced",
590
+ "type": "event"
591
+ },
592
+ {
593
+ "anonymous": false,
594
+ "inputs": [
595
+ {
596
+ "indexed": true,
597
+ "internalType": "address",
598
+ "name": "from",
599
+ "type": "address"
600
+ },
601
+ {
602
+ "indexed": true,
603
+ "internalType": "address",
604
+ "name": "to",
605
+ "type": "address"
606
+ },
607
+ {
608
+ "indexed": false,
609
+ "internalType": "uint256",
610
+ "name": "amount",
611
+ "type": "uint256"
612
+ }
613
+ ],
614
+ "name": "Transfer",
615
+ "type": "event"
616
+ },
617
+ {
618
+ "payable": true,
619
+ "stateMutability": "payable",
620
+ "type": "fallback"
621
+ },
622
+ {
623
+ "constant": false,
624
+ "inputs": [],
625
+ "name": "_acceptAdmin",
626
+ "outputs": [
627
+ {
628
+ "internalType": "uint256",
629
+ "name": "",
630
+ "type": "uint256"
631
+ }
632
+ ],
633
+ "payable": false,
634
+ "stateMutability": "nonpayable",
635
+ "type": "function"
636
+ },
637
+ {
638
+ "constant": false,
639
+ "inputs": [
640
+ {
641
+ "internalType": "uint256",
642
+ "name": "addAmount",
643
+ "type": "uint256"
644
+ }
645
+ ],
646
+ "name": "_addReserves",
647
+ "outputs": [
648
+ {
649
+ "internalType": "uint256",
650
+ "name": "",
651
+ "type": "uint256"
652
+ }
653
+ ],
654
+ "payable": false,
655
+ "stateMutability": "nonpayable",
656
+ "type": "function"
657
+ },
658
+ {
659
+ "constant": false,
660
+ "inputs": [
661
+ {
662
+ "internalType": "uint256",
663
+ "name": "reduceAmount",
664
+ "type": "uint256"
665
+ }
666
+ ],
667
+ "name": "_reduceReserves",
668
+ "outputs": [
669
+ {
670
+ "internalType": "uint256",
671
+ "name": "",
672
+ "type": "uint256"
673
+ }
674
+ ],
675
+ "payable": false,
676
+ "stateMutability": "nonpayable",
677
+ "type": "function"
678
+ },
679
+ {
680
+ "constant": false,
681
+ "inputs": [
682
+ {
683
+ "internalType": "contract ComptrollerInterface",
684
+ "name": "newComptroller",
685
+ "type": "address"
686
+ }
687
+ ],
688
+ "name": "_setComptroller",
689
+ "outputs": [
690
+ {
691
+ "internalType": "uint256",
692
+ "name": "",
693
+ "type": "uint256"
694
+ }
695
+ ],
696
+ "payable": false,
697
+ "stateMutability": "nonpayable",
698
+ "type": "function"
699
+ },
700
+ {
701
+ "constant": false,
702
+ "inputs": [
703
+ {
704
+ "internalType": "address",
705
+ "name": "implementation_",
706
+ "type": "address"
707
+ },
708
+ {
709
+ "internalType": "bool",
710
+ "name": "allowResign",
711
+ "type": "bool"
712
+ },
713
+ {
714
+ "internalType": "bytes",
715
+ "name": "becomeImplementationData",
716
+ "type": "bytes"
717
+ }
718
+ ],
719
+ "name": "_setImplementation",
720
+ "outputs": [],
721
+ "payable": false,
722
+ "stateMutability": "nonpayable",
723
+ "type": "function"
724
+ },
725
+ {
726
+ "constant": false,
727
+ "inputs": [
728
+ {
729
+ "internalType": "contract InterestRateModel",
730
+ "name": "newInterestRateModel",
731
+ "type": "address"
732
+ }
733
+ ],
734
+ "name": "_setInterestRateModel",
735
+ "outputs": [
736
+ {
737
+ "internalType": "uint256",
738
+ "name": "",
739
+ "type": "uint256"
740
+ }
741
+ ],
742
+ "payable": false,
743
+ "stateMutability": "nonpayable",
744
+ "type": "function"
745
+ },
746
+ {
747
+ "constant": false,
748
+ "inputs": [
749
+ {
750
+ "internalType": "address payable",
751
+ "name": "newPendingAdmin",
752
+ "type": "address"
753
+ }
754
+ ],
755
+ "name": "_setPendingAdmin",
756
+ "outputs": [
757
+ {
758
+ "internalType": "uint256",
759
+ "name": "",
760
+ "type": "uint256"
761
+ }
762
+ ],
763
+ "payable": false,
764
+ "stateMutability": "nonpayable",
765
+ "type": "function"
766
+ },
767
+ {
768
+ "constant": false,
769
+ "inputs": [
770
+ {
771
+ "internalType": "uint256",
772
+ "name": "newReserveFactorMantissa",
773
+ "type": "uint256"
774
+ }
775
+ ],
776
+ "name": "_setReserveFactor",
777
+ "outputs": [
778
+ {
779
+ "internalType": "uint256",
780
+ "name": "",
781
+ "type": "uint256"
782
+ }
783
+ ],
784
+ "payable": false,
785
+ "stateMutability": "nonpayable",
786
+ "type": "function"
787
+ },
788
+ {
789
+ "constant": true,
790
+ "inputs": [],
791
+ "name": "accessControlManager",
792
+ "outputs": [
793
+ {
794
+ "internalType": "address",
795
+ "name": "",
796
+ "type": "address"
797
+ }
798
+ ],
799
+ "payable": false,
800
+ "stateMutability": "view",
801
+ "type": "function"
802
+ },
803
+ {
804
+ "constant": true,
805
+ "inputs": [],
806
+ "name": "accrualBlockNumber",
807
+ "outputs": [
808
+ {
809
+ "internalType": "uint256",
810
+ "name": "",
811
+ "type": "uint256"
812
+ }
813
+ ],
814
+ "payable": false,
815
+ "stateMutability": "view",
816
+ "type": "function"
817
+ },
818
+ {
819
+ "constant": false,
820
+ "inputs": [],
821
+ "name": "accrueInterest",
822
+ "outputs": [
823
+ {
824
+ "internalType": "uint256",
825
+ "name": "",
826
+ "type": "uint256"
827
+ }
828
+ ],
829
+ "payable": false,
830
+ "stateMutability": "nonpayable",
831
+ "type": "function"
832
+ },
833
+ {
834
+ "constant": true,
835
+ "inputs": [],
836
+ "name": "admin",
837
+ "outputs": [
838
+ {
839
+ "internalType": "address payable",
840
+ "name": "",
841
+ "type": "address"
842
+ }
843
+ ],
844
+ "payable": false,
845
+ "stateMutability": "view",
846
+ "type": "function"
847
+ },
848
+ {
849
+ "constant": true,
850
+ "inputs": [
851
+ {
852
+ "internalType": "address",
853
+ "name": "owner",
854
+ "type": "address"
855
+ },
856
+ {
857
+ "internalType": "address",
858
+ "name": "spender",
859
+ "type": "address"
860
+ }
861
+ ],
862
+ "name": "allowance",
863
+ "outputs": [
864
+ {
865
+ "internalType": "uint256",
866
+ "name": "",
867
+ "type": "uint256"
868
+ }
869
+ ],
870
+ "payable": false,
871
+ "stateMutability": "view",
872
+ "type": "function"
873
+ },
874
+ {
875
+ "constant": false,
876
+ "inputs": [
877
+ {
878
+ "internalType": "address",
879
+ "name": "spender",
880
+ "type": "address"
881
+ },
882
+ {
883
+ "internalType": "uint256",
884
+ "name": "amount",
885
+ "type": "uint256"
886
+ }
887
+ ],
888
+ "name": "approve",
889
+ "outputs": [
890
+ {
891
+ "internalType": "bool",
892
+ "name": "",
893
+ "type": "bool"
894
+ }
895
+ ],
896
+ "payable": false,
897
+ "stateMutability": "nonpayable",
898
+ "type": "function"
899
+ },
900
+ {
901
+ "constant": true,
902
+ "inputs": [
903
+ {
904
+ "internalType": "address",
905
+ "name": "owner",
906
+ "type": "address"
907
+ }
908
+ ],
909
+ "name": "balanceOf",
910
+ "outputs": [
911
+ {
912
+ "internalType": "uint256",
913
+ "name": "",
914
+ "type": "uint256"
915
+ }
916
+ ],
917
+ "payable": false,
918
+ "stateMutability": "view",
919
+ "type": "function"
920
+ },
921
+ {
922
+ "constant": false,
923
+ "inputs": [
924
+ {
925
+ "internalType": "address",
926
+ "name": "owner",
927
+ "type": "address"
928
+ }
929
+ ],
930
+ "name": "balanceOfUnderlying",
931
+ "outputs": [
932
+ {
933
+ "internalType": "uint256",
934
+ "name": "",
935
+ "type": "uint256"
936
+ }
937
+ ],
938
+ "payable": false,
939
+ "stateMutability": "nonpayable",
940
+ "type": "function"
941
+ },
942
+ {
943
+ "constant": false,
944
+ "inputs": [
945
+ {
946
+ "internalType": "uint256",
947
+ "name": "borrowAmount",
948
+ "type": "uint256"
949
+ }
950
+ ],
951
+ "name": "borrow",
952
+ "outputs": [
953
+ {
954
+ "internalType": "uint256",
955
+ "name": "",
956
+ "type": "uint256"
957
+ }
958
+ ],
959
+ "payable": false,
960
+ "stateMutability": "nonpayable",
961
+ "type": "function"
962
+ },
963
+ {
964
+ "constant": false,
965
+ "inputs": [
966
+ {
967
+ "internalType": "address",
968
+ "name": "account",
969
+ "type": "address"
970
+ }
971
+ ],
972
+ "name": "borrowBalanceCurrent",
973
+ "outputs": [
974
+ {
975
+ "internalType": "uint256",
976
+ "name": "",
977
+ "type": "uint256"
978
+ }
979
+ ],
980
+ "payable": false,
981
+ "stateMutability": "nonpayable",
982
+ "type": "function"
983
+ },
984
+ {
985
+ "constant": true,
986
+ "inputs": [
987
+ {
988
+ "internalType": "address",
989
+ "name": "account",
990
+ "type": "address"
991
+ }
992
+ ],
993
+ "name": "borrowBalanceStored",
994
+ "outputs": [
995
+ {
996
+ "internalType": "uint256",
997
+ "name": "",
998
+ "type": "uint256"
999
+ }
1000
+ ],
1001
+ "payable": false,
1002
+ "stateMutability": "view",
1003
+ "type": "function"
1004
+ },
1005
+ {
1006
+ "constant": true,
1007
+ "inputs": [],
1008
+ "name": "borrowIndex",
1009
+ "outputs": [
1010
+ {
1011
+ "internalType": "uint256",
1012
+ "name": "",
1013
+ "type": "uint256"
1014
+ }
1015
+ ],
1016
+ "payable": false,
1017
+ "stateMutability": "view",
1018
+ "type": "function"
1019
+ },
1020
+ {
1021
+ "constant": true,
1022
+ "inputs": [],
1023
+ "name": "borrowRatePerBlock",
1024
+ "outputs": [
1025
+ {
1026
+ "internalType": "uint256",
1027
+ "name": "",
1028
+ "type": "uint256"
1029
+ }
1030
+ ],
1031
+ "payable": false,
1032
+ "stateMutability": "view",
1033
+ "type": "function"
1034
+ },
1035
+ {
1036
+ "constant": true,
1037
+ "inputs": [],
1038
+ "name": "comptroller",
1039
+ "outputs": [
1040
+ {
1041
+ "internalType": "contract ComptrollerInterface",
1042
+ "name": "",
1043
+ "type": "address"
1044
+ }
1045
+ ],
1046
+ "payable": false,
1047
+ "stateMutability": "view",
1048
+ "type": "function"
1049
+ },
1050
+ {
1051
+ "constant": true,
1052
+ "inputs": [],
1053
+ "name": "decimals",
1054
+ "outputs": [
1055
+ {
1056
+ "internalType": "uint8",
1057
+ "name": "",
1058
+ "type": "uint8"
1059
+ }
1060
+ ],
1061
+ "payable": false,
1062
+ "stateMutability": "view",
1063
+ "type": "function"
1064
+ },
1065
+ {
1066
+ "constant": false,
1067
+ "inputs": [
1068
+ {
1069
+ "internalType": "bytes",
1070
+ "name": "data",
1071
+ "type": "bytes"
1072
+ }
1073
+ ],
1074
+ "name": "delegateToImplementation",
1075
+ "outputs": [
1076
+ {
1077
+ "internalType": "bytes",
1078
+ "name": "",
1079
+ "type": "bytes"
1080
+ }
1081
+ ],
1082
+ "payable": false,
1083
+ "stateMutability": "nonpayable",
1084
+ "type": "function"
1085
+ },
1086
+ {
1087
+ "constant": true,
1088
+ "inputs": [
1089
+ {
1090
+ "internalType": "bytes",
1091
+ "name": "data",
1092
+ "type": "bytes"
1093
+ }
1094
+ ],
1095
+ "name": "delegateToViewImplementation",
1096
+ "outputs": [
1097
+ {
1098
+ "internalType": "bytes",
1099
+ "name": "",
1100
+ "type": "bytes"
1101
+ }
1102
+ ],
1103
+ "payable": false,
1104
+ "stateMutability": "view",
1105
+ "type": "function"
1106
+ },
1107
+ {
1108
+ "constant": false,
1109
+ "inputs": [],
1110
+ "name": "exchangeRateCurrent",
1111
+ "outputs": [
1112
+ {
1113
+ "internalType": "uint256",
1114
+ "name": "",
1115
+ "type": "uint256"
1116
+ }
1117
+ ],
1118
+ "payable": false,
1119
+ "stateMutability": "nonpayable",
1120
+ "type": "function"
1121
+ },
1122
+ {
1123
+ "constant": true,
1124
+ "inputs": [],
1125
+ "name": "exchangeRateStored",
1126
+ "outputs": [
1127
+ {
1128
+ "internalType": "uint256",
1129
+ "name": "",
1130
+ "type": "uint256"
1131
+ }
1132
+ ],
1133
+ "payable": false,
1134
+ "stateMutability": "view",
1135
+ "type": "function"
1136
+ },
1137
+ {
1138
+ "constant": true,
1139
+ "inputs": [
1140
+ {
1141
+ "internalType": "address",
1142
+ "name": "account",
1143
+ "type": "address"
1144
+ }
1145
+ ],
1146
+ "name": "getAccountSnapshot",
1147
+ "outputs": [
1148
+ {
1149
+ "internalType": "uint256",
1150
+ "name": "",
1151
+ "type": "uint256"
1152
+ },
1153
+ {
1154
+ "internalType": "uint256",
1155
+ "name": "",
1156
+ "type": "uint256"
1157
+ },
1158
+ {
1159
+ "internalType": "uint256",
1160
+ "name": "",
1161
+ "type": "uint256"
1162
+ },
1163
+ {
1164
+ "internalType": "uint256",
1165
+ "name": "",
1166
+ "type": "uint256"
1167
+ }
1168
+ ],
1169
+ "payable": false,
1170
+ "stateMutability": "view",
1171
+ "type": "function"
1172
+ },
1173
+ {
1174
+ "constant": true,
1175
+ "inputs": [],
1176
+ "name": "getCash",
1177
+ "outputs": [
1178
+ {
1179
+ "internalType": "uint256",
1180
+ "name": "",
1181
+ "type": "uint256"
1182
+ }
1183
+ ],
1184
+ "payable": false,
1185
+ "stateMutability": "view",
1186
+ "type": "function"
1187
+ },
1188
+ {
1189
+ "constant": true,
1190
+ "inputs": [],
1191
+ "name": "implementation",
1192
+ "outputs": [
1193
+ {
1194
+ "internalType": "address",
1195
+ "name": "",
1196
+ "type": "address"
1197
+ }
1198
+ ],
1199
+ "payable": false,
1200
+ "stateMutability": "view",
1201
+ "type": "function"
1202
+ },
1203
+ {
1204
+ "constant": true,
1205
+ "inputs": [],
1206
+ "name": "interestRateModel",
1207
+ "outputs": [
1208
+ {
1209
+ "internalType": "contract InterestRateModel",
1210
+ "name": "",
1211
+ "type": "address"
1212
+ }
1213
+ ],
1214
+ "payable": false,
1215
+ "stateMutability": "view",
1216
+ "type": "function"
1217
+ },
1218
+ {
1219
+ "constant": true,
1220
+ "inputs": [],
1221
+ "name": "isVToken",
1222
+ "outputs": [
1223
+ {
1224
+ "internalType": "bool",
1225
+ "name": "",
1226
+ "type": "bool"
1227
+ }
1228
+ ],
1229
+ "payable": false,
1230
+ "stateMutability": "view",
1231
+ "type": "function"
1232
+ },
1233
+ {
1234
+ "constant": false,
1235
+ "inputs": [
1236
+ {
1237
+ "internalType": "address",
1238
+ "name": "borrower",
1239
+ "type": "address"
1240
+ },
1241
+ {
1242
+ "internalType": "uint256",
1243
+ "name": "repayAmount",
1244
+ "type": "uint256"
1245
+ },
1246
+ {
1247
+ "internalType": "contract VTokenInterface",
1248
+ "name": "vTokenCollateral",
1249
+ "type": "address"
1250
+ }
1251
+ ],
1252
+ "name": "liquidateBorrow",
1253
+ "outputs": [
1254
+ {
1255
+ "internalType": "uint256",
1256
+ "name": "",
1257
+ "type": "uint256"
1258
+ }
1259
+ ],
1260
+ "payable": false,
1261
+ "stateMutability": "nonpayable",
1262
+ "type": "function"
1263
+ },
1264
+ {
1265
+ "constant": false,
1266
+ "inputs": [
1267
+ {
1268
+ "internalType": "uint256",
1269
+ "name": "mintAmount",
1270
+ "type": "uint256"
1271
+ }
1272
+ ],
1273
+ "name": "mint",
1274
+ "outputs": [
1275
+ {
1276
+ "internalType": "uint256",
1277
+ "name": "",
1278
+ "type": "uint256"
1279
+ }
1280
+ ],
1281
+ "payable": false,
1282
+ "stateMutability": "nonpayable",
1283
+ "type": "function"
1284
+ },
1285
+ {
1286
+ "constant": false,
1287
+ "inputs": [
1288
+ {
1289
+ "internalType": "address",
1290
+ "name": "receiver",
1291
+ "type": "address"
1292
+ },
1293
+ {
1294
+ "internalType": "uint256",
1295
+ "name": "mintAmount",
1296
+ "type": "uint256"
1297
+ }
1298
+ ],
1299
+ "name": "mintBehalf",
1300
+ "outputs": [
1301
+ {
1302
+ "internalType": "uint256",
1303
+ "name": "",
1304
+ "type": "uint256"
1305
+ }
1306
+ ],
1307
+ "payable": false,
1308
+ "stateMutability": "nonpayable",
1309
+ "type": "function"
1310
+ },
1311
+ {
1312
+ "constant": true,
1313
+ "inputs": [],
1314
+ "name": "name",
1315
+ "outputs": [
1316
+ {
1317
+ "internalType": "string",
1318
+ "name": "",
1319
+ "type": "string"
1320
+ }
1321
+ ],
1322
+ "payable": false,
1323
+ "stateMutability": "view",
1324
+ "type": "function"
1325
+ },
1326
+ {
1327
+ "constant": true,
1328
+ "inputs": [],
1329
+ "name": "pendingAdmin",
1330
+ "outputs": [
1331
+ {
1332
+ "internalType": "address payable",
1333
+ "name": "",
1334
+ "type": "address"
1335
+ }
1336
+ ],
1337
+ "payable": false,
1338
+ "stateMutability": "view",
1339
+ "type": "function"
1340
+ },
1341
+ {
1342
+ "constant": true,
1343
+ "inputs": [],
1344
+ "name": "protocolShareReserve",
1345
+ "outputs": [
1346
+ {
1347
+ "internalType": "address payable",
1348
+ "name": "",
1349
+ "type": "address"
1350
+ }
1351
+ ],
1352
+ "payable": false,
1353
+ "stateMutability": "view",
1354
+ "type": "function"
1355
+ },
1356
+ {
1357
+ "constant": false,
1358
+ "inputs": [
1359
+ {
1360
+ "internalType": "uint256",
1361
+ "name": "redeemTokens",
1362
+ "type": "uint256"
1363
+ }
1364
+ ],
1365
+ "name": "redeem",
1366
+ "outputs": [
1367
+ {
1368
+ "internalType": "uint256",
1369
+ "name": "",
1370
+ "type": "uint256"
1371
+ }
1372
+ ],
1373
+ "payable": false,
1374
+ "stateMutability": "nonpayable",
1375
+ "type": "function"
1376
+ },
1377
+ {
1378
+ "constant": false,
1379
+ "inputs": [
1380
+ {
1381
+ "internalType": "uint256",
1382
+ "name": "redeemAmount",
1383
+ "type": "uint256"
1384
+ }
1385
+ ],
1386
+ "name": "redeemUnderlying",
1387
+ "outputs": [
1388
+ {
1389
+ "internalType": "uint256",
1390
+ "name": "",
1391
+ "type": "uint256"
1392
+ }
1393
+ ],
1394
+ "payable": false,
1395
+ "stateMutability": "nonpayable",
1396
+ "type": "function"
1397
+ },
1398
+ {
1399
+ "constant": true,
1400
+ "inputs": [],
1401
+ "name": "reduceReservesBlockDelta",
1402
+ "outputs": [
1403
+ {
1404
+ "internalType": "uint256",
1405
+ "name": "",
1406
+ "type": "uint256"
1407
+ }
1408
+ ],
1409
+ "payable": false,
1410
+ "stateMutability": "view",
1411
+ "type": "function"
1412
+ },
1413
+ {
1414
+ "constant": true,
1415
+ "inputs": [],
1416
+ "name": "reduceReservesBlockNumber",
1417
+ "outputs": [
1418
+ {
1419
+ "internalType": "uint256",
1420
+ "name": "",
1421
+ "type": "uint256"
1422
+ }
1423
+ ],
1424
+ "payable": false,
1425
+ "stateMutability": "view",
1426
+ "type": "function"
1427
+ },
1428
+ {
1429
+ "constant": false,
1430
+ "inputs": [
1431
+ {
1432
+ "internalType": "uint256",
1433
+ "name": "repayAmount",
1434
+ "type": "uint256"
1435
+ }
1436
+ ],
1437
+ "name": "repayBorrow",
1438
+ "outputs": [
1439
+ {
1440
+ "internalType": "uint256",
1441
+ "name": "",
1442
+ "type": "uint256"
1443
+ }
1444
+ ],
1445
+ "payable": false,
1446
+ "stateMutability": "nonpayable",
1447
+ "type": "function"
1448
+ },
1449
+ {
1450
+ "constant": false,
1451
+ "inputs": [
1452
+ {
1453
+ "internalType": "address",
1454
+ "name": "borrower",
1455
+ "type": "address"
1456
+ },
1457
+ {
1458
+ "internalType": "uint256",
1459
+ "name": "repayAmount",
1460
+ "type": "uint256"
1461
+ }
1462
+ ],
1463
+ "name": "repayBorrowBehalf",
1464
+ "outputs": [
1465
+ {
1466
+ "internalType": "uint256",
1467
+ "name": "",
1468
+ "type": "uint256"
1469
+ }
1470
+ ],
1471
+ "payable": false,
1472
+ "stateMutability": "nonpayable",
1473
+ "type": "function"
1474
+ },
1475
+ {
1476
+ "constant": true,
1477
+ "inputs": [],
1478
+ "name": "reserveFactorMantissa",
1479
+ "outputs": [
1480
+ {
1481
+ "internalType": "uint256",
1482
+ "name": "",
1483
+ "type": "uint256"
1484
+ }
1485
+ ],
1486
+ "payable": false,
1487
+ "stateMutability": "view",
1488
+ "type": "function"
1489
+ },
1490
+ {
1491
+ "constant": false,
1492
+ "inputs": [
1493
+ {
1494
+ "internalType": "address",
1495
+ "name": "liquidator",
1496
+ "type": "address"
1497
+ },
1498
+ {
1499
+ "internalType": "address",
1500
+ "name": "borrower",
1501
+ "type": "address"
1502
+ },
1503
+ {
1504
+ "internalType": "uint256",
1505
+ "name": "seizeTokens",
1506
+ "type": "uint256"
1507
+ }
1508
+ ],
1509
+ "name": "seize",
1510
+ "outputs": [
1511
+ {
1512
+ "internalType": "uint256",
1513
+ "name": "",
1514
+ "type": "uint256"
1515
+ }
1516
+ ],
1517
+ "payable": false,
1518
+ "stateMutability": "nonpayable",
1519
+ "type": "function"
1520
+ },
1521
+ {
1522
+ "constant": true,
1523
+ "inputs": [],
1524
+ "name": "supplyRatePerBlock",
1525
+ "outputs": [
1526
+ {
1527
+ "internalType": "uint256",
1528
+ "name": "",
1529
+ "type": "uint256"
1530
+ }
1531
+ ],
1532
+ "payable": false,
1533
+ "stateMutability": "view",
1534
+ "type": "function"
1535
+ },
1536
+ {
1537
+ "constant": true,
1538
+ "inputs": [],
1539
+ "name": "symbol",
1540
+ "outputs": [
1541
+ {
1542
+ "internalType": "string",
1543
+ "name": "",
1544
+ "type": "string"
1545
+ }
1546
+ ],
1547
+ "payable": false,
1548
+ "stateMutability": "view",
1549
+ "type": "function"
1550
+ },
1551
+ {
1552
+ "constant": true,
1553
+ "inputs": [],
1554
+ "name": "totalBorrows",
1555
+ "outputs": [
1556
+ {
1557
+ "internalType": "uint256",
1558
+ "name": "",
1559
+ "type": "uint256"
1560
+ }
1561
+ ],
1562
+ "payable": false,
1563
+ "stateMutability": "view",
1564
+ "type": "function"
1565
+ },
1566
+ {
1567
+ "constant": false,
1568
+ "inputs": [],
1569
+ "name": "totalBorrowsCurrent",
1570
+ "outputs": [
1571
+ {
1572
+ "internalType": "uint256",
1573
+ "name": "",
1574
+ "type": "uint256"
1575
+ }
1576
+ ],
1577
+ "payable": false,
1578
+ "stateMutability": "nonpayable",
1579
+ "type": "function"
1580
+ },
1581
+ {
1582
+ "constant": true,
1583
+ "inputs": [],
1584
+ "name": "totalReserves",
1585
+ "outputs": [
1586
+ {
1587
+ "internalType": "uint256",
1588
+ "name": "",
1589
+ "type": "uint256"
1590
+ }
1591
+ ],
1592
+ "payable": false,
1593
+ "stateMutability": "view",
1594
+ "type": "function"
1595
+ },
1596
+ {
1597
+ "constant": true,
1598
+ "inputs": [],
1599
+ "name": "totalSupply",
1600
+ "outputs": [
1601
+ {
1602
+ "internalType": "uint256",
1603
+ "name": "",
1604
+ "type": "uint256"
1605
+ }
1606
+ ],
1607
+ "payable": false,
1608
+ "stateMutability": "view",
1609
+ "type": "function"
1610
+ },
1611
+ {
1612
+ "constant": false,
1613
+ "inputs": [
1614
+ {
1615
+ "internalType": "address",
1616
+ "name": "dst",
1617
+ "type": "address"
1618
+ },
1619
+ {
1620
+ "internalType": "uint256",
1621
+ "name": "amount",
1622
+ "type": "uint256"
1623
+ }
1624
+ ],
1625
+ "name": "transfer",
1626
+ "outputs": [
1627
+ {
1628
+ "internalType": "bool",
1629
+ "name": "",
1630
+ "type": "bool"
1631
+ }
1632
+ ],
1633
+ "payable": false,
1634
+ "stateMutability": "nonpayable",
1635
+ "type": "function"
1636
+ },
1637
+ {
1638
+ "constant": false,
1639
+ "inputs": [
1640
+ {
1641
+ "internalType": "address",
1642
+ "name": "src",
1643
+ "type": "address"
1644
+ },
1645
+ {
1646
+ "internalType": "address",
1647
+ "name": "dst",
1648
+ "type": "address"
1649
+ },
1650
+ {
1651
+ "internalType": "uint256",
1652
+ "name": "amount",
1653
+ "type": "uint256"
1654
+ }
1655
+ ],
1656
+ "name": "transferFrom",
1657
+ "outputs": [
1658
+ {
1659
+ "internalType": "bool",
1660
+ "name": "",
1661
+ "type": "bool"
1662
+ }
1663
+ ],
1664
+ "payable": false,
1665
+ "stateMutability": "nonpayable",
1666
+ "type": "function"
1667
+ },
1668
+ {
1669
+ "constant": true,
1670
+ "inputs": [],
1671
+ "name": "underlying",
1672
+ "outputs": [
1673
+ {
1674
+ "internalType": "address",
1675
+ "name": "",
1676
+ "type": "address"
1677
+ }
1678
+ ],
1679
+ "payable": false,
1680
+ "stateMutability": "view",
1681
+ "type": "function"
1682
+ }
1683
+ ],
1684
+ "transactionHash": "0xbbd6bdffe469d08962e20b640494d453842b58ff67d9cd89421f711f436957be",
1685
+ "receipt": {
1686
+ "to": null,
1687
+ "from": "0x14A1c22EF6d2eF6cE33c0b018d8A34D02021e5c8",
1688
+ "contractAddress": "0x6bCa74586218dB34cdB402295796b79663d816e9",
1689
+ "transactionIndex": 107,
1690
+ "gasUsed": "2095659",
1691
+ "logsBloom": "0x00000000000000000000000000000000000040000000000000000000000000000000000000000040000000000000000000000000000000000000000800000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004100000000000000000000000000080000100000000000000000000000000000000000002000000000000000004000000000002000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
1692
+ "blockHash": "0x5a0e1b1059a677c918cad1ecca0fcbb7e45d691da19e67ce4ee1f73c0371e2fe",
1693
+ "transactionHash": "0xbbd6bdffe469d08962e20b640494d453842b58ff67d9cd89421f711f436957be",
1694
+ "logs": [
1695
+ {
1696
+ "transactionIndex": 107,
1697
+ "blockNumber": 60894639,
1698
+ "transactionHash": "0xbbd6bdffe469d08962e20b640494d453842b58ff67d9cd89421f711f436957be",
1699
+ "address": "0x6bCa74586218dB34cdB402295796b79663d816e9",
1700
+ "topics": ["0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d"],
1701
+ "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fd36e2c2a6789db23113685031d7f16329158384",
1702
+ "logIndex": 518,
1703
+ "blockHash": "0x5a0e1b1059a677c918cad1ecca0fcbb7e45d691da19e67ce4ee1f73c0371e2fe"
1704
+ },
1705
+ {
1706
+ "transactionIndex": 107,
1707
+ "blockNumber": 60894639,
1708
+ "transactionHash": "0xbbd6bdffe469d08962e20b640494d453842b58ff67d9cd89421f711f436957be",
1709
+ "address": "0x6bCa74586218dB34cdB402295796b79663d816e9",
1710
+ "topics": ["0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926"],
1711
+ "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e82b36f4ce8a9b769036b74354588d427a724763",
1712
+ "logIndex": 519,
1713
+ "blockHash": "0x5a0e1b1059a677c918cad1ecca0fcbb7e45d691da19e67ce4ee1f73c0371e2fe"
1714
+ },
1715
+ {
1716
+ "transactionIndex": 107,
1717
+ "blockNumber": 60894639,
1718
+ "transactionHash": "0xbbd6bdffe469d08962e20b640494d453842b58ff67d9cd89421f711f436957be",
1719
+ "address": "0x6bCa74586218dB34cdB402295796b79663d816e9",
1720
+ "topics": ["0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a"],
1721
+ "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000006e5cff66c7b671fa1d5782866d80bd15955d79f6",
1722
+ "logIndex": 520,
1723
+ "blockHash": "0x5a0e1b1059a677c918cad1ecca0fcbb7e45d691da19e67ce4ee1f73c0371e2fe"
1724
+ }
1725
+ ],
1726
+ "blockNumber": 60894639,
1727
+ "cumulativeGasUsed": "19105383",
1728
+ "status": 1,
1729
+ "byzantium": true
1730
+ },
1731
+ "args": [
1732
+ "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
1733
+ "0xfD36E2c2a6789Db23113685031d7F16329158384",
1734
+ "0xE82B36f4CE8A9B769036B74354588D427a724763",
1735
+ "10000000000000000000000000000",
1736
+ "Venus WBNB",
1737
+ "vWBNB",
1738
+ 8,
1739
+ "0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396",
1740
+ "0x6E5cFf66C7b671fA1D5782866D80BD15955d79F6",
1741
+ "0x"
1742
+ ],
1743
+ "numDeployments": 1,
1744
+ "solcInputHash": "501a636c0cfe94ed0788c4114ed4912e",
1745
+ "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlying_\",\"type\":\"address\"},{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address payable\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"becomeImplementationData\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"cashPrior\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"interestAccumulated\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"AccrueInterest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"error\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"info\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"detail\",\"type\":\"uint256\"}],\"name\":\"Failure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vTokenCollateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"LiquidateBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"MintBehalf\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlAddress\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"oldComptroller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"NewComptroller\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"NewImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"oldInterestRateModel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"NewMarketInterestRateModel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"NewProtocolShareReserve\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReduceReservesBlockDelta\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta\",\"type\":\"uint256\"}],\"name\":\"NewReduceReservesBlockDelta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReserveFactorMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"NewReserveFactor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"RedeemFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"RepayBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"benefactor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"protocolShareReserve\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"}],\"name\":\"_addReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"_reduceReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"_setComptroller\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowResign\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"becomeImplementationData\",\"type\":\"bytes\"}],\"name\":\"_setImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"_setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"_setPendingAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"_setReserveFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accrualBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"accrueInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"comptroller\",\"outputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"delegateToImplementation\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"delegateToViewImplementation\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exchangeRateCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"exchangeRateStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isVToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"internalType\":\"contract VTokenInterface\",\"name\":\"vTokenCollateral\",\"type\":\"address\"}],\"name\":\"liquidateBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mintBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockDelta\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveFactorMantissa\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"supplyRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalBorrows\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"totalBorrowsCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"underlying\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"_acceptAdmin()\":{\"details\":\"Admin function for pending admin to accept role and update admin\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_addReserves(uint256)\":{\"params\":{\"addAmount\":\"Amount of reserves to add\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_reduceReserves(uint256)\":{\"params\":{\"reduceAmount\":\"Amount of reduction to reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setComptroller(address)\":{\"details\":\"Admin function to set a new comptroller\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setImplementation(address,bool,bytes)\":{\"params\":{\"allowResign\":\"Flag to indicate whether to call _resignImplementation on the old implementation\",\"becomeImplementationData\":\"The encoded bytes data to be passed to _becomeImplementation\",\"implementation_\":\"The address of the new implementation for delegation\"}},\"_setInterestRateModel(address)\":{\"details\":\"Admin function to accrue interest and update the interest rate model\",\"params\":{\"newInterestRateModel\":\"The new interest rate model to use\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setPendingAdmin(address)\":{\"details\":\"Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\",\"params\":{\"newPendingAdmin\":\"New pending admin.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setReserveFactor(uint256)\":{\"details\":\"Admin function to accrue interest and set a new reserve factor\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"accrueInterest()\":{\"details\":\"This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage.\"},\"allowance(address,address)\":{\"params\":{\"owner\":\"The address of the account which owns the tokens to be spent\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"The number of tokens allowed to be spent (-1 means infinite)\"},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"amount\":\"The number of tokens that are approved (-1 means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"Whether or not the approval succeeded\"},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The number of tokens owned by `owner`\"},\"balanceOfUnderlying(address)\":{\"details\":\"This also accrues interest in a transaction\",\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The amount of underlying owned by `owner`\"},\"borrow(uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowBalanceCurrent(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated after updating borrowIndex\"},\"return\":\"The calculated balance\"},\"borrowBalanceStored(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated\"},\"return\":\"The calculated balance\"},\"borrowRatePerBlock()\":{\"return\":\"The borrow interest rate per block, scaled by 1e18\"},\"constructor\":{\"params\":{\"admin_\":\"Address of the administrator of this token\",\"becomeImplementationData\":\"The encoded args for becomeImplementation\",\"comptroller_\":\"The address of the comptroller\",\"decimals_\":\"BEP-20 decimal precision of this token\",\"implementation_\":\"The address of the implementation the contract delegates to\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"BEP-20 name of this token\",\"symbol_\":\"BEP-20 symbol of this token\",\"underlying_\":\"The address of the underlying asset\"}},\"delegateToImplementation(bytes)\":{\"details\":\"It returns to the external caller whatever the implementation returns or forwards reverts\",\"params\":{\"data\":\"The raw data to delegatecall\"},\"return\":\"The returned bytes from the delegatecall\"},\"delegateToViewImplementation(bytes)\":{\"details\":\"It returns to the external caller whatever the implementation returns or forwards reverts There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\",\"params\":{\"data\":\"The raw data to delegatecall\"},\"return\":\"The returned bytes from the delegatecall\"},\"exchangeRateCurrent()\":{\"return\":\"Calculated exchange rate scaled by 1e18\"},\"exchangeRateStored()\":{\"details\":\"This function does not accrue interest before calculating the exchange rate\",\"return\":\"Calculated exchange rate scaled by 1e18\"},\"getAccountSnapshot(address)\":{\"details\":\"This is used by comptroller to more efficiently perform liquidity checks.\",\"params\":{\"account\":\"Address of the account to snapshot\"},\"return\":\"(possible error, token balance, borrow balance, exchange rate mantissa)\"},\"getCash()\":{\"return\":\"The quantity of underlying asset owned by this contract\"},\"liquidateBorrow(address,uint256,address)\":{\"params\":{\"borrower\":\"The borrower of this vToken to be liquidated\",\"repayAmount\":\"The amount of the underlying borrowed asset to repay\",\"vTokenCollateral\":\"The market in which to seize collateral from the borrower\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mint(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mintBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeem(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying asset\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlying(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrow(uint256)\":{\"params\":{\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrowBehalf(address,uint256)\":{\"params\":{\"borrower\":\"The account with the debt being payed off\",\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"seize(address,address,uint256)\":{\"details\":\"Will fail unless called by another vToken during the process of liquidation. It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\",\"params\":{\"borrower\":\"The account having collateral seized\",\"liquidator\":\"The account receiving seized collateral\",\"seizeTokens\":\"The number of vTokens to seize\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"supplyRatePerBlock()\":{\"return\":\"The supply interest rate per block, scaled by 1e18\"},\"totalBorrowsCurrent()\":{\"return\":\"The total borrows with interest\"},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\"},\"return\":\"Whether or not the transfer succeeded\"},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\",\"src\":\"The address of the source account\"},\"return\":\"Whether or not the transfer succeeded\"}},\"title\":\"Venus's VBep20Delegator Contract\"},\"userdoc\":{\"methods\":{\"_acceptAdmin()\":{\"notice\":\"Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\"},\"_addReserves(uint256)\":{\"notice\":\"Accrues interest and adds reserves by transferring from admin\"},\"_reduceReserves(uint256)\":{\"notice\":\"Accrues interest and reduces reserves by transferring to admin\"},\"_setComptroller(address)\":{\"notice\":\"Sets a new comptroller for the market\"},\"_setImplementation(address,bool,bytes)\":{\"notice\":\"Called by the admin to update the implementation of the delegator\"},\"_setInterestRateModel(address)\":{\"notice\":\"Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\"},\"_setPendingAdmin(address)\":{\"notice\":\"Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\"},\"_setReserveFactor(uint256)\":{\"notice\":\"Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\"},\"accrueInterest()\":{\"notice\":\"Applies accrued interest to total borrows and reserves.\"},\"allowance(address,address)\":{\"notice\":\"Get the current allowance from `owner` for `spender`\"},\"approve(address,uint256)\":{\"notice\":\"Approve `spender` to transfer up to `amount` from `src`\"},\"balanceOf(address)\":{\"notice\":\"Get the token balance of the `owner`\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Get the underlying balance of the `owner`\"},\"borrow(uint256)\":{\"notice\":\"Sender borrows assets from the protocol to their own address\"},\"borrowBalanceCurrent(address)\":{\"notice\":\"Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\"},\"borrowBalanceStored(address)\":{\"notice\":\"Return the borrow balance of account based on stored data\"},\"borrowRatePerBlock()\":{\"notice\":\"Returns the current per-block borrow interest rate for this vToken\"},\"constructor\":\"Construct a new money market\",\"delegateToImplementation(bytes)\":{\"notice\":\"Delegates execution to the implementation contract\"},\"delegateToViewImplementation(bytes)\":{\"notice\":\"Delegates execution to an implementation contract\"},\"exchangeRateCurrent()\":{\"notice\":\"Accrue interest then return the up-to-date exchange rate\"},\"exchangeRateStored()\":{\"notice\":\"Calculates the exchange rate from the underlying to the VToken\"},\"getAccountSnapshot(address)\":{\"notice\":\"Get a snapshot of the account's balances and the cached exchange rate\"},\"getCash()\":{\"notice\":\"Get cash balance of this vToken in the underlying asset\"},\"liquidateBorrow(address,uint256,address)\":{\"notice\":\"The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator.\"},\"mint(uint256)\":{\"notice\":\"Sender supplies assets into the market and receives vTokens in exchange\"},\"mintBehalf(address,uint256)\":{\"notice\":\"Sender supplies assets into the market and receiver receives vTokens in exchange\"},\"redeem(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for the underlying asset\"},\"redeemUnderlying(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for a specified amount of underlying asset\"},\"repayBorrow(uint256)\":{\"notice\":\"Sender repays their own borrow\"},\"repayBorrowBehalf(address,uint256)\":{\"notice\":\"Sender repays a borrow belonging to another borrower\"},\"seize(address,address,uint256)\":{\"notice\":\"Transfers collateral tokens (this market) to the liquidator.\"},\"supplyRatePerBlock()\":{\"notice\":\"Returns the current per-block supply interest rate for this vToken\"},\"totalBorrowsCurrent()\":{\"notice\":\"Returns the current total borrows plus accrued interest\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `msg.sender` to `dst`\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `src` to `dst`\"}},\"notice\":\"vTokens which wrap an EIP-20 underlying and delegate to an implementation\"}},\"settings\":{\"compilationTarget\":{\"contracts/Tokens/VTokens/VBep20Delegator.sol\":\"VBep20Delegator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.5.16;\\n\\n/**\\n * @title IAccessControlManagerV5\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\\n */\\ninterface IAccessControlManagerV5 {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n\\n /**\\n * @notice Gives a function call permission to one single account\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleGranted} event.\\n * @param contractAddress address of contract for which call permissions will be granted\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n /**\\n * @notice Revokes an account's permission to a particular function call\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleRevoked} event.\\n * @param contractAddress address of contract for which call permissions will be revoked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n /**\\n * @notice Verifies if the given account can call a praticular contract's function\\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\\n * @param account address (eoa or contract) for which call permissions will be checked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n *\\n */\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x3563db4c75f7aa0b8a982bab591907dda192438a2368511b62a9c587a3e54226\"},\"contracts/Comptroller/ComptrollerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport \\\"../Oracle/PriceOracle.sol\\\";\\nimport \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerTypes } from \\\"./ComptrollerStorage.sol\\\";\\n\\ncontract ComptrollerInterface {\\n /// @notice Indicator that this is a Comptroller contract (for inspection)\\n bool public constant isComptroller = true;\\n\\n /*** Assets You Are In ***/\\n\\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\\n\\n function exitMarket(address vToken) external returns (uint);\\n\\n /*** Policy Hooks ***/\\n\\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\\n\\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\\n\\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\\n\\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\\n\\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\\n\\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\\n\\n function repayBorrowAllowed(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function repayBorrowVerify(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount,\\n uint borrowerIndex\\n ) external;\\n\\n function liquidateBorrowAllowed(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function liquidateBorrowVerify(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n uint seizeTokens\\n ) external;\\n\\n function seizeAllowed(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external returns (uint);\\n\\n function seizeVerify(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external;\\n\\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\\n\\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\\n\\n /*** Liquidity/Liquidation Calculations ***/\\n\\n function liquidateCalculateSeizeTokens(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function getXVSAddress() public view returns (address);\\n\\n function markets(address) external view returns (bool, uint);\\n\\n function oracle() external view returns (PriceOracle);\\n\\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\\n\\n function getAssetsIn(address) external view returns (VToken[] memory);\\n\\n function claimVenus(address) external;\\n\\n function venusAccrued(address) external view returns (uint);\\n\\n function venusSupplySpeeds(address) external view returns (uint);\\n\\n function venusBorrowSpeeds(address) external view returns (uint);\\n\\n function getAllMarkets() external view returns (VToken[] memory);\\n\\n function venusSupplierIndex(address, address) external view returns (uint);\\n\\n function venusInitialIndex() external view returns (uint224);\\n\\n function venusBorrowerIndex(address, address) external view returns (uint);\\n\\n function venusBorrowState(address) external view returns (uint224, uint32);\\n\\n function venusSupplyState(address) external view returns (uint224, uint32);\\n\\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\\n\\n function vaiController() external view returns (VAIControllerInterface);\\n\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n function protocolPaused() external view returns (bool);\\n\\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\\n\\n function mintedVAIs(address user) external view returns (uint);\\n\\n function vaiMintRate() external view returns (uint);\\n}\\n\\ninterface IVAIVault {\\n function updatePendingRewards() external;\\n}\\n\\ninterface IComptroller {\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n /*** Treasury Data ***/\\n function treasuryAddress() external view returns (address);\\n\\n function treasuryPercent() external view returns (uint);\\n}\\n\",\"keccak256\":\"0x4f4965dd8614b455952a2ef186fd8a509affbc56078a4aa8702f46d4c8209793\"},\"contracts/Comptroller/ComptrollerLensInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ninterface ComptrollerLensInterface {\\n function liquidateCalculateSeizeTokens(\\n address comptroller,\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address comptroller,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function getHypotheticalAccountLiquidity(\\n address comptroller,\\n address account,\\n VToken vTokenModify,\\n uint redeemTokens,\\n uint borrowAmount\\n ) external view returns (uint, uint, uint);\\n}\\n\",\"keccak256\":\"0xc824e034221740c1957891547c78a123b595017cf102629454a04d36637e9c4a\"},\"contracts/Comptroller/ComptrollerStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity ^0.5.16;\\n\\nimport { VToken } from \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport { PriceOracle } from \\\"../Oracle/PriceOracle.sol\\\";\\nimport { VAIControllerInterface } from \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerLensInterface } from \\\"./ComptrollerLensInterface.sol\\\";\\nimport { IPrime } from \\\"../Tokens/Prime/IPrime.sol\\\";\\n\\ninterface ComptrollerTypes {\\n enum Action {\\n MINT,\\n REDEEM,\\n BORROW,\\n REPAY,\\n SEIZE,\\n LIQUIDATE,\\n TRANSFER,\\n ENTER_MARKET,\\n EXIT_MARKET\\n }\\n}\\n\\ncontract UnitrollerAdminStorage {\\n /**\\n * @notice Administrator for this contract\\n */\\n address public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address public pendingAdmin;\\n\\n /**\\n * @notice Active brains of Unitroller\\n */\\n address public comptrollerImplementation;\\n\\n /**\\n * @notice Pending brains of Unitroller\\n */\\n address public pendingComptrollerImplementation;\\n}\\n\\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\\n /**\\n * @notice Oracle which gives the price of any given asset\\n */\\n PriceOracle public oracle;\\n\\n /**\\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\\n */\\n uint256 public closeFactorMantissa;\\n\\n /**\\n * @notice Multiplier representing the discount on collateral that a liquidator receives\\n */\\n uint256 public liquidationIncentiveMantissa;\\n\\n /**\\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\\n */\\n uint256 public maxAssets;\\n\\n /**\\n * @notice Per-account mapping of \\\"assets you are in\\\", capped by maxAssets\\n */\\n mapping(address => VToken[]) public accountAssets;\\n\\n struct Market {\\n /// @notice Whether or not this market is listed\\n bool isListed;\\n /**\\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\\n * For instance, 0.9 to allow borrowing 90% of collateral value.\\n * Must be between 0 and 1, and stored as a mantissa.\\n */\\n uint256 collateralFactorMantissa;\\n /// @notice Per-market mapping of \\\"accounts in this asset\\\"\\n mapping(address => bool) accountMembership;\\n /// @notice Whether or not this market receives XVS\\n bool isVenus;\\n }\\n\\n /**\\n * @notice Official mapping of vTokens -> Market metadata\\n * @dev Used e.g. to determine if a market is supported\\n */\\n mapping(address => Market) public markets;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n address public pauseGuardian;\\n\\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\\n bool private _mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool private _borrowGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal transferGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal seizeGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal borrowGuardianPaused;\\n\\n struct VenusMarketState {\\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\\n uint224 index;\\n /// @notice The block number the index was last updated at\\n uint32 block;\\n }\\n\\n /// @notice A list of all markets\\n VToken[] public allMarkets;\\n\\n /// @notice The rate at which the flywheel distributes XVS, per block\\n uint256 internal venusRate;\\n\\n /// @notice The portion of venusRate that each market currently receives\\n mapping(address => uint256) internal venusSpeeds;\\n\\n /// @notice The Venus market supply state for each market\\n mapping(address => VenusMarketState) public venusSupplyState;\\n\\n /// @notice The Venus market borrow state for each market\\n mapping(address => VenusMarketState) public venusBorrowState;\\n\\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\\n\\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\\n\\n /// @notice The XVS accrued but not yet transferred to each user\\n mapping(address => uint256) public venusAccrued;\\n\\n /// @notice The Address of VAIController\\n VAIControllerInterface public vaiController;\\n\\n /// @notice The minted VAI amount to each user\\n mapping(address => uint256) public mintedVAIs;\\n\\n /// @notice VAI Mint Rate as a percentage\\n uint256 public vaiMintRate;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n bool public mintVAIGuardianPaused;\\n bool public repayVAIGuardianPaused;\\n\\n /**\\n * @notice Pause/Unpause whole protocol actions\\n */\\n bool public protocolPaused;\\n\\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\\n uint256 private venusVAIRate;\\n}\\n\\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\\n uint256 public venusVAIVaultRate;\\n\\n // address of VAI Vault\\n address public vaiVaultAddress;\\n\\n // start block of release to VAI Vault\\n uint256 public releaseStartBlock;\\n\\n // minimum release amount to VAI Vault\\n uint256 public minReleaseAmount;\\n}\\n\\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\\n address public borrowCapGuardian;\\n\\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\\n mapping(address => uint256) public borrowCaps;\\n}\\n\\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\\n /// @notice Treasury Guardian address\\n address public treasuryGuardian;\\n\\n /// @notice Treasury address\\n address public treasuryAddress;\\n\\n /// @notice Fee percent of accrued interest with decimal 18\\n uint256 public treasuryPercent;\\n}\\n\\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\\n mapping(address => uint256) private venusContributorSpeeds;\\n\\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\\n mapping(address => uint256) private lastContributorBlock;\\n}\\n\\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\\n address public liquidatorContract;\\n}\\n\\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\\n ComptrollerLensInterface public comptrollerLens;\\n}\\n\\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\\n mapping(address => uint256) public supplyCaps;\\n}\\n\\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\\n /// @notice AccessControlManager address\\n address internal accessControl;\\n\\n /// @notice True if a certain action is paused on a certain market\\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\\n}\\n\\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\\n mapping(address => uint256) public venusBorrowSpeeds;\\n\\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\\n mapping(address => uint256) public venusSupplySpeeds;\\n}\\n\\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\\n mapping(address => mapping(address => bool)) public approvedDelegates;\\n}\\n\\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\\n mapping(address => bool) public isForcedLiquidationEnabled;\\n}\\n\\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\\n }\\n\\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\\n // facet addresses\\n address[] internal _facetAddresses;\\n}\\n\\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\\n /// @notice Prime token address\\n IPrime public prime;\\n}\\n\\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\\n}\\n\\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\\n /// @notice The XVS token contract address\\n address internal xvs;\\n\\n /// @notice The XVS vToken contract address\\n address internal xvsVToken;\\n}\\n\",\"keccak256\":\"0x06608bb502e91c33fda8c0dd88cc79a49a078fab521bc27d10fc3a69c1da55f4\"},\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x786416e63346afec50151e44b993dbbdb12f94cd3f2c9dba631afe237353605f\"},\"contracts/Oracle/PriceOracle.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ncontract PriceOracle {\\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\\n bool public constant isPriceOracle = true;\\n\\n /**\\n * @notice Get the underlying price of a vToken asset\\n * @param vToken The vToken to get the underlying price of\\n * @return The underlying asset price mantissa (scaled by 1e18).\\n * Zero means the price is unavailable.\\n */\\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x0f68d0e07decba8fb9a77df1659170f310b487cc0b650f53ca6aa55ed62b28de\"},\"contracts/Tokens/EIP20Interface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title BEP 20 Token Standard Interface\\n * https://eips.ethereum.org/EIPS/eip-20\\n */\\ninterface EIP20Interface {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transfer(address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return success whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x7e89ffa9c0d432c4db8bd5388ff68e33934dcdb1d038d74bbed3b2fdae3eb532\"},\"contracts/Tokens/EIP20NonStandardInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title EIP20NonStandardInterface\\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\ninterface EIP20NonStandardInterface {\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance of the owner\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transfer(address dst, uint256 amount) external;\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transferFrom(address src, address dst, uint256 amount) external;\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved\\n * @return success Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x05a3a7d5ab47de3964c95d706dcc18fe7583b1d064dbb74808c0f2774f347afa\"},\"contracts/Tokens/Prime/IPrime.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title IPrime\\n * @author Venus\\n * @notice Interface for Prime Token\\n */\\ninterface IPrime {\\n /**\\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\\n * @param user the account address whose balance was updated\\n */\\n function xvsUpdated(address user) external;\\n\\n /**\\n * @notice accrues interest and updates score for an user for a specific market\\n * @param user the account address for which to accrue interest and update score\\n * @param market the market for which to accrue interest and update score\\n */\\n function accrueInterestAndUpdateScore(address user, address market) external;\\n\\n /**\\n * @notice Distributes income from market since last distribution\\n * @param vToken the market for which to distribute the income\\n */\\n function accrueInterest(address vToken) external;\\n\\n /**\\n * @notice Returns if user is a prime holder\\n * @param isPrimeHolder returns if the user is a prime holder\\n */\\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\\n}\\n\",\"keccak256\":\"0x58861c0c05b8757f1a5d50b107eff479c8680878e6aa51bc93af420caf73f500\"},\"contracts/Tokens/VAI/VAIControllerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport { VTokenInterface } from \\\"../VTokens/VTokenInterfaces.sol\\\";\\n\\ncontract VAIControllerInterface {\\n function mintVAI(uint256 mintVAIAmount) external returns (uint256);\\n\\n function repayVAI(uint256 amount) external returns (uint256, uint256);\\n\\n function repayVAIBehalf(address borrower, uint256 amount) external returns (uint256, uint256);\\n\\n function liquidateVAI(\\n address borrower,\\n uint256 repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint256, uint256);\\n\\n function getMintableVAI(address minter) external view returns (uint256, uint256);\\n\\n function getVAIAddress() external view returns (address);\\n\\n function getVAIRepayAmount(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1f020ff46cb0efa0ebf563f449fd4d8aa1c8b8ed53c46860d71a08548d7fdfaa\"},\"contracts/Tokens/VTokens/VBep20Delegator.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"./VTokenInterfaces.sol\\\";\\n\\n/**\\n * @title Venus's VBep20Delegator Contract\\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\\n * @author Venus\\n */\\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\\n /**\\n * @notice Construct a new money market\\n * @param underlying_ The address of the underlying asset\\n * @param comptroller_ The address of the comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ BEP-20 name of this token\\n * @param symbol_ BEP-20 symbol of this token\\n * @param decimals_ BEP-20 decimal precision of this token\\n * @param admin_ Address of the administrator of this token\\n * @param implementation_ The address of the implementation the contract delegates to\\n * @param becomeImplementationData The encoded args for becomeImplementation\\n */\\n constructor(\\n address underlying_,\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_,\\n address payable admin_,\\n address implementation_,\\n bytes memory becomeImplementationData\\n ) public {\\n // Creator of the contract is admin during initialization\\n admin = msg.sender;\\n\\n // First delegate gets to initialize the delegator (i.e. storage contract)\\n delegateTo(\\n implementation_,\\n abi.encodeWithSignature(\\n \\\"initialize(address,address,address,uint256,string,string,uint8)\\\",\\n underlying_,\\n comptroller_,\\n interestRateModel_,\\n initialExchangeRateMantissa_,\\n name_,\\n symbol_,\\n decimals_\\n )\\n );\\n\\n // New implementations always get set via the settor (post-initialize)\\n _setImplementation(implementation_, false, becomeImplementationData);\\n\\n // Set the proper admin now that initialization is done\\n admin = admin_;\\n }\\n\\n /**\\n * @notice Delegates execution to an implementation contract\\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\\n */\\n function() external payable {\\n require(msg.value == 0, \\\"VBep20Delegator:fallback: cannot send value to fallback\\\");\\n\\n // delegate all other functions to current implementation\\n (bool success, ) = implementation.delegatecall(msg.data);\\n\\n assembly {\\n let free_mem_ptr := mload(0x40)\\n returndatacopy(free_mem_ptr, 0, returndatasize)\\n\\n switch success\\n case 0 {\\n revert(free_mem_ptr, returndatasize)\\n }\\n default {\\n return(free_mem_ptr, returndatasize)\\n }\\n }\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function mint(uint mintAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"mint(uint256)\\\", mintAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"mintBehalf(address,uint256)\\\", receiver, mintAmount)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for the underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemTokens The number of vTokens to redeem into underlying asset\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeem(uint redeemTokens) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"redeem(uint256)\\\", redeemTokens));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemAmount The amount of underlying to redeem\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"redeemUnderlying(uint256)\\\", redeemAmount)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender borrows assets from the protocol to their own address\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function borrow(uint borrowAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"borrow(uint256)\\\", borrowAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function repayBorrow(uint repayAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"repayBorrow(uint256)\\\", repayAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrower\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"repayBorrowBehalf(address,uint256)\\\", borrower, repayAmount)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"liquidateBorrow(address,uint256,address)\\\", borrower, repayAmount, vTokenCollateral)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transfer(address dst, uint amount) external returns (bool) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"transfer(address,uint256)\\\", dst, amount));\\n return abi.decode(data, (bool));\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"transferFrom(address,address,uint256)\\\", src, dst, amount)\\n );\\n return abi.decode(data, (bool));\\n }\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"approve(address,uint256)\\\", spender, amount)\\n );\\n return abi.decode(data, (bool));\\n }\\n\\n /**\\n * @notice Get the underlying balance of the `owner`\\n * @dev This also accrues interest in a transaction\\n * @param owner The address of the account to query\\n * @return The amount of underlying owned by `owner`\\n */\\n function balanceOfUnderlying(address owner) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"balanceOfUnderlying(address)\\\", owner));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Returns the current total borrows plus accrued interest\\n * @return The total borrows with interest\\n */\\n function totalBorrowsCurrent() external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"totalBorrowsCurrent()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\\n * @param account The address whose balance should be calculated after updating borrowIndex\\n * @return The calculated balance\\n */\\n function borrowBalanceCurrent(address account) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"borrowBalanceCurrent(address)\\\", account));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Will fail unless called by another vToken during the process of liquidation.\\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"seize(address,address,uint256)\\\", liquidator, borrower, seizeTokens)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /*** Admin Functions ***/\\n\\n /**\\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @param newPendingAdmin New pending admin.\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"_setPendingAdmin(address)\\\", newPendingAdmin)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\\n * @dev Admin function to accrue interest and set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"_setReserveFactor(uint256)\\\", newReserveFactorMantissa)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\\n * @dev Admin function for pending admin to accept role and update admin\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _acceptAdmin() external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"_acceptAdmin()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrues interest and adds reserves by transferring from admin\\n * @param addAmount Amount of reserves to add\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _addReserves(uint addAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"_addReserves(uint256)\\\", addAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrues interest and reduces reserves by transferring to admin\\n * @param reduceAmount Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _reduceReserves(uint reduceAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"_reduceReserves(uint256)\\\", reduceAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Get cash balance of this vToken in the underlying asset\\n * @return The quantity of underlying asset owned by this contract\\n */\\n function getCash() external view returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"getCash()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return The number of tokens allowed to be spent (-1 means infinite)\\n */\\n function allowance(address owner, address spender) external view returns (uint) {\\n bytes memory data = delegateToViewImplementation(\\n abi.encodeWithSignature(\\\"allowance(address,address)\\\", owner, spender)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Get the token balance of the `owner`\\n * @param owner The address of the account to query\\n * @return The number of tokens owned by `owner`\\n */\\n function balanceOf(address owner) external view returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"balanceOf(address)\\\", owner));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Get a snapshot of the account's balances and the cached exchange rate\\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\\n * @param account Address of the account to snapshot\\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\\n */\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\\n bytes memory data = delegateToViewImplementation(\\n abi.encodeWithSignature(\\\"getAccountSnapshot(address)\\\", account)\\n );\\n return abi.decode(data, (uint, uint, uint, uint));\\n }\\n\\n /**\\n * @notice Returns the current per-block borrow interest rate for this vToken\\n * @return The borrow interest rate per block, scaled by 1e18\\n */\\n function borrowRatePerBlock() external view returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"borrowRatePerBlock()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Returns the current per-block supply interest rate for this vToken\\n * @return The supply interest rate per block, scaled by 1e18\\n */\\n function supplyRatePerBlock() external view returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"supplyRatePerBlock()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Called by the admin to update the implementation of the delegator\\n * @param implementation_ The address of the new implementation for delegation\\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\\n */\\n // @custom:access Only callable by admin\\n function _setImplementation(\\n address implementation_,\\n bool allowResign,\\n bytes memory becomeImplementationData\\n ) public {\\n require(msg.sender == admin, \\\"VBep20Delegator::_setImplementation: Caller must be admin\\\");\\n\\n if (allowResign) {\\n delegateToImplementation(abi.encodeWithSignature(\\\"_resignImplementation()\\\"));\\n }\\n\\n address oldImplementation = implementation;\\n implementation = implementation_;\\n\\n delegateToImplementation(abi.encodeWithSignature(\\\"_becomeImplementation(bytes)\\\", becomeImplementationData));\\n\\n emit NewImplementation(oldImplementation, implementation);\\n }\\n\\n /**\\n * @notice Accrue interest then return the up-to-date exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateCurrent() public returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"exchangeRateCurrent()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Applies accrued interest to total borrows and reserves.\\n * @dev This calculates interest accrued from the last checkpointed block\\n * up to the current block and writes new checkpoint to storage.\\n */\\n function accrueInterest() public returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"accrueInterest()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sets a new comptroller for the market\\n * @dev Admin function to set a new comptroller\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"_setComptroller(address)\\\", newComptroller)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\\n * @dev Admin function to accrue interest and update the interest rate model\\n * @param newInterestRateModel The new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"_setInterestRateModel(address)\\\", newInterestRateModel)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Delegates execution to the implementation contract\\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\\n * @param data The raw data to delegatecall\\n * @return The returned bytes from the delegatecall\\n */\\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\\n return delegateTo(implementation, data);\\n }\\n\\n /**\\n * @notice Delegates execution to an implementation contract\\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\\n * @param data The raw data to delegatecall\\n * @return The returned bytes from the delegatecall\\n */\\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\\n (bool success, bytes memory returnData) = address(this).staticcall(\\n abi.encodeWithSignature(\\\"delegateToImplementation(bytes)\\\", data)\\n );\\n assembly {\\n if eq(success, 0) {\\n revert(add(returnData, 0x20), returndatasize)\\n }\\n }\\n return abi.decode(returnData, (bytes));\\n }\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return The calculated balance\\n */\\n function borrowBalanceStored(address account) public view returns (uint) {\\n bytes memory data = delegateToViewImplementation(\\n abi.encodeWithSignature(\\\"borrowBalanceStored(address)\\\", account)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the VToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStored() public view returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"exchangeRateStored()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Internal method to delegate execution to another contract\\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\\n * @param callee The contract to delegatecall\\n * @param data The raw data to delegatecall\\n * @return The returned bytes from the delegatecall\\n */\\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\\n (bool success, bytes memory returnData) = callee.delegatecall(data);\\n assembly {\\n if eq(success, 0) {\\n revert(add(returnData, 0x20), returndatasize)\\n }\\n }\\n return returnData;\\n }\\n}\\n\",\"keccak256\":\"0xfb7ad07b6ca2171914cef37d02fb97e6e55f4f0935c5c5cba33ab31f3613bce9\"},\"contracts/Tokens/VTokens/VToken.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../Utils/ErrorReporter.sol\\\";\\nimport \\\"../../Utils/Exponential.sol\\\";\\nimport \\\"../../Tokens/EIP20Interface.sol\\\";\\nimport \\\"../../Tokens/EIP20NonStandardInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\nimport \\\"./VTokenInterfaces.sol\\\";\\nimport { IAccessControlManagerV5 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\\\";\\n\\n/**\\n * @title Venus's vToken Contract\\n * @notice Abstract base for vTokens\\n * @author Venus\\n */\\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\\n struct MintLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint mintTokens;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n uint actualMintAmount;\\n }\\n\\n struct RedeemLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint redeemTokens;\\n uint redeemAmount;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n }\\n\\n struct BorrowLocalVars {\\n MathError mathErr;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n }\\n\\n struct RepayBorrowLocalVars {\\n Error err;\\n MathError mathErr;\\n uint repayAmount;\\n uint borrowerIndex;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n uint actualRepayAmount;\\n }\\n\\n /*** Reentrancy Guard ***/\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n */\\n modifier nonReentrant() {\\n require(_notEntered, \\\"re-entered\\\");\\n _notEntered = false;\\n _;\\n _notEntered = true; // get a gas-refund post-Istanbul\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n // @custom:event Emits Approval event on successful approve\\n function approve(address spender, uint256 amount) external returns (bool) {\\n transferAllowances[msg.sender][spender] = amount;\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice Get the underlying balance of the `owner`\\n * @dev This also accrues interest in a transaction\\n * @param owner The address of the account to query\\n * @return The amount of underlying owned by `owner`\\n */\\n function balanceOfUnderlying(address owner) external returns (uint) {\\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\\n ensureNoMathError(mErr);\\n return balance;\\n }\\n\\n /**\\n * @notice Returns the current total borrows plus accrued interest\\n * @return The total borrows with interest\\n */\\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return totalBorrows;\\n }\\n\\n /**\\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\\n * @param account The address whose balance should be calculated after updating borrowIndex\\n * @return The calculated balance\\n */\\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return borrowBalanceStored(account);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Will fail unless called by another vToken during the process of liquidation.\\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\\n }\\n\\n /**\\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @param newPendingAdmin New pending admin.\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\\n // Check caller = admin\\n ensureAdmin(msg.sender);\\n\\n // Save current value, if any, for inclusion in log\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store pendingAdmin with value newPendingAdmin\\n pendingAdmin = newPendingAdmin;\\n\\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\\n * @dev Admin function for pending admin to accept role and update admin\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewAdmin event on successful acceptance\\n // @custom:event Emits NewPendingAdmin event with null new pending admin\\n function _acceptAdmin() external returns (uint) {\\n // Check caller is pendingAdmin\\n if (msg.sender != pendingAdmin) {\\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\\n }\\n\\n // Save current values for inclusion in log\\n address oldAdmin = admin;\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store admin with value pendingAdmin\\n admin = pendingAdmin;\\n\\n // Clear the pending value\\n pendingAdmin = address(0);\\n\\n emit NewAdmin(oldAdmin, admin);\\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\\n * @dev Governor function to accrue interest and set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewReserveFactor event\\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_setReserveFactor(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\\n }\\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\\n return _setReserveFactorFresh(newReserveFactorMantissa_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract\\n * @dev Admin function to set the access control address\\n * @param newAccessControlManagerAddress New address for the access control\\n * @return uint 0=success, otherwise will revert\\n */\\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ensureNonZeroAddress(newAccessControlManagerAddress);\\n\\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\\n accessControlManager = newAccessControlManagerAddress;\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\\n * @param reduceAmount_ Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesReduced event\\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_reduceReserves(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // If reserves were reduced in accrueInterest\\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\\n return _reduceReservesFresh(reduceAmount_);\\n }\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return The number of tokens allowed to be spent (-1 means infinite)\\n */\\n function allowance(address owner, address spender) external view returns (uint256) {\\n return transferAllowances[owner][spender];\\n }\\n\\n /**\\n * @notice Get the token balance of the `owner`\\n * @param owner The address of the account to query\\n * @return The number of tokens owned by `owner`\\n */\\n function balanceOf(address owner) external view returns (uint256) {\\n return accountTokens[owner];\\n }\\n\\n /**\\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\\n * @param account Address of the account to snapshot\\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\\n */\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\\n uint vTokenBalance = accountTokens[account];\\n uint borrowBalance;\\n uint exchangeRateMantissa;\\n\\n MathError mErr;\\n\\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block supply interest rate for this vToken\\n * @return The supply interest rate per block, scaled by 1e18\\n */\\n function supplyRatePerBlock() external view returns (uint) {\\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block borrow interest rate for this vToken\\n * @return The borrow interest rate per block, scaled by 1e18\\n */\\n function borrowRatePerBlock() external view returns (uint) {\\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\\n }\\n\\n /**\\n * @notice Get cash balance of this vToken in the underlying asset\\n * @return The quantity of underlying asset owned by this contract\\n */\\n function getCash() external view returns (uint) {\\n return getCashPrior();\\n }\\n\\n /**\\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\\n * @param newReduceReservesBlockDelta_ block difference value\\n */\\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\\n require(newReduceReservesBlockDelta_ > 0, \\\"Invalid Input\\\");\\n ensureAllowed(\\\"setReduceReservesBlockDelta(uint256)\\\");\\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\\n }\\n\\n /**\\n * @notice Sets protocol share reserve contract address\\n * @param protcolShareReserve_ The address of protocol share reserve contract\\n */\\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n ensureNonZeroAddress(protcolShareReserve_);\\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\\n protocolShareReserve = protcolShareReserve_;\\n }\\n\\n /**\\n * @notice Initialize the money market\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ EIP-20 name of this token\\n * @param symbol_ EIP-20 symbol of this token\\n * @param decimals_ EIP-20 decimal precision of this token\\n */\\n function initialize(\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n ensureAdmin(msg.sender);\\n require(accrualBlockNumber == 0 && borrowIndex == 0, \\\"market may only be initialized once\\\");\\n\\n // Set initial exchange rate\\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\\n require(initialExchangeRateMantissa > 0, \\\"initial exchange rate must be greater than zero.\\\");\\n\\n // Set the comptroller\\n uint err = _setComptroller(comptroller_);\\n require(err == uint(Error.NO_ERROR), \\\"setting comptroller failed\\\");\\n\\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\\n accrualBlockNumber = block.number;\\n borrowIndex = mantissaOne;\\n\\n // Set the interest rate model (depends on block number / borrow index)\\n err = _setInterestRateModelFresh(interestRateModel_);\\n require(err == uint(Error.NO_ERROR), \\\"setting interest rate model failed\\\");\\n\\n name = name_;\\n symbol = symbol_;\\n decimals = decimals_;\\n\\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\\n _notEntered = true;\\n }\\n\\n /**\\n * @notice Accrue interest then return the up-to-date exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateCurrent() public nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return exchangeRateStored();\\n }\\n\\n /**\\n * @notice Applies accrued interest to total borrows and reserves\\n * @dev This calculates interest accrued from the last checkpointed block\\n * up to the current block and writes new checkpoint to storage and\\n * reduce spread reserves to protocol share reserve\\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\\n */\\n // @custom:event Emits AccrueInterest event\\n function accrueInterest() public returns (uint) {\\n /* Remember the initial block number */\\n uint currentBlockNumber = block.number;\\n uint accrualBlockNumberPrior = accrualBlockNumber;\\n\\n /* Short-circuit accumulating 0 interest */\\n if (accrualBlockNumberPrior == currentBlockNumber) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n /* Read the previous values out of storage */\\n uint cashPrior = getCashPrior();\\n uint borrowsPrior = totalBorrows;\\n uint reservesPrior = totalReserves;\\n uint borrowIndexPrior = borrowIndex;\\n\\n /* Calculate the current borrow interest rate */\\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\\n require(borrowRateMantissa <= borrowRateMaxMantissa, \\\"borrow rate is absurdly high\\\");\\n\\n /* Calculate the number of blocks elapsed since the last accrual */\\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\\n ensureNoMathError(mathErr);\\n\\n /*\\n * Calculate the interest accumulated into borrows and reserves and the new index:\\n * simpleInterestFactor = borrowRate * blockDelta\\n * interestAccumulated = simpleInterestFactor * totalBorrows\\n * totalBorrowsNew = interestAccumulated + totalBorrows\\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\\n */\\n\\n Exp memory simpleInterestFactor;\\n uint interestAccumulated;\\n uint totalBorrowsNew;\\n uint totalReservesNew;\\n uint borrowIndexNew;\\n\\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\\n Exp({ mantissa: reserveFactorMantissa }),\\n interestAccumulated,\\n reservesPrior\\n );\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accrualBlockNumber = currentBlockNumber;\\n borrowIndex = borrowIndexNew;\\n totalBorrows = totalBorrowsNew;\\n totalReserves = totalReservesNew;\\n\\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\\n ensureNoMathError(mathErr);\\n if (blockDelta >= reduceReservesBlockDelta) {\\n reduceReservesBlockNumber = currentBlockNumber;\\n if (cashPrior < totalReservesNew) {\\n _reduceReservesFresh(cashPrior);\\n } else {\\n _reduceReservesFresh(totalReservesNew);\\n }\\n }\\n\\n /* We emit an AccrueInterest event */\\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new comptroller for the market\\n * @dev Admin function to set a new comptroller\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewComptroller event\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ComptrollerInterface oldComptroller = comptroller;\\n // Ensure invoke comptroller.isComptroller() returns true\\n require(newComptroller.isComptroller(), \\\"marker method returned false\\\");\\n\\n // Set market's comptroller to newComptroller\\n comptroller = newComptroller;\\n\\n // Emit NewComptroller(oldComptroller, newComptroller)\\n emit NewComptroller(oldComptroller, newComptroller);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\\n * @dev Governance function to accrue interest and update the interest rate model\\n * @param newInterestRateModel_ The new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\\n ensureAllowed(\\\"_setInterestRateModel(address)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\\n }\\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\\n return _setInterestRateModelFresh(newInterestRateModel_);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the VToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStored() public view returns (uint) {\\n (MathError err, uint result) = exchangeRateStoredInternal();\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return The calculated balance\\n */\\n function borrowBalanceStored(address account) public view returns (uint) {\\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\\n * @dev Called by both `transfer` and `transferFrom` internally\\n * @param spender The address of the account performing the transfer\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param tokens The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\\n /* Fail if transfer not allowed */\\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Do not allow self-transfers */\\n if (src == dst) {\\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n /* Get the allowance, infinite for the account owner */\\n uint startingAllowance = 0;\\n if (spender == src) {\\n startingAllowance = uint(-1);\\n } else {\\n startingAllowance = transferAllowances[src][spender];\\n }\\n\\n /* Do the calculations, checking for {under,over}flow */\\n MathError mathErr;\\n uint allowanceNew;\\n uint srvTokensNew;\\n uint dstTokensNew;\\n\\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\\n }\\n\\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n accountTokens[src] = srvTokensNew;\\n accountTokens[dst] = dstTokensNew;\\n\\n /* Eat some of the allowance (if necessary) */\\n if (startingAllowance != uint(-1)) {\\n transferAllowances[src][spender] = allowanceNew;\\n }\\n\\n /* We emit a Transfer event */\\n emit Transfer(src, dst, tokens);\\n\\n comptroller.transferVerify(address(this), src, dst, tokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintFresh(msg.sender, mintAmount);\\n }\\n\\n /**\\n * @notice User supplies assets into the market and receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param minter The address of the account which is supplying the assets\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the minter and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[minter] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[minter] = vars.accountTokensNew;\\n\\n /* We emit a Mint event, and a Transfer event */\\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), minter, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The address of the account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\\n }\\n\\n /**\\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param payer The address of the account which is paying the underlying token\\n * @param receiver The address of the account which is receiving vToken\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\\n ensureNonZeroAddress(receiver);\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the payer and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[receiver] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[receiver] = vars.accountTokensNew;\\n\\n /* We emit a MintBehalf event, and a Transfer event */\\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), receiver, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokens\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens, if called by a delegate\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemUnderlyingInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // solhint-disable-next-line code-complexity\\n function redeemFresh(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokensIn,\\n uint redeemAmountIn\\n ) internal returns (uint) {\\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \\\"one of redeemTokensIn or redeemAmountIn must be zero\\\");\\n\\n RedeemLocalVars memory vars;\\n\\n /* exchangeRate = invoke Exchange Rate Stored() */\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n ensureNoMathError(vars.mathErr);\\n\\n /* If redeemTokensIn > 0: */\\n if (redeemTokensIn > 0) {\\n /*\\n * We calculate the exchange rate and the amount of underlying to be redeemed:\\n * redeemTokens = redeemTokensIn\\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\\n */\\n vars.redeemTokens = redeemTokensIn;\\n\\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\\n Exp({ mantissa: vars.exchangeRateMantissa }),\\n redeemTokensIn\\n );\\n ensureNoMathError(vars.mathErr);\\n } else {\\n /*\\n * We get the current exchange rate and calculate the amount to be redeemed:\\n * redeemTokens = redeemAmountIn / exchangeRate\\n * redeemAmount = redeemAmountIn\\n */\\n\\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\\n redeemAmountIn,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n vars.redeemAmount = redeemAmountIn;\\n }\\n\\n /* Fail if redeem not allowed */\\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /*\\n * We calculate the new total supply and redeemer balance, checking for underflow:\\n * totalSupplyNew = totalSupply - redeemTokens\\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* Fail gracefully if protocol has insufficient cash */\\n if (getCashPrior() < vars.redeemAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[redeemer] = vars.accountTokensNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the redeemAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken has redeemAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n\\n uint feeAmount;\\n uint remainedAmount;\\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\\n (vars.mathErr, feeAmount) = mulUInt(\\n vars.redeemAmount,\\n IComptroller(address(comptroller)).treasuryPercent()\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\\n\\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\\n } else {\\n remainedAmount = vars.redeemAmount;\\n }\\n\\n doTransferOut(receiver, remainedAmount);\\n\\n /* We emit a Transfer event, and a Redeem event */\\n emit Transfer(redeemer, address(this), vars.redeemTokens);\\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function borrowInternal(\\n address borrower,\\n address payable receiver,\\n uint borrowAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\\n }\\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\\n return borrowFresh(borrower, receiver, borrowAmount);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @dev Before calling this function, ensure that the interest has been accrued\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\\n */\\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\\n /* Revert if borrow not allowed */\\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Revert if protocol has insufficient underlying cash */\\n if (getCashPrior() < borrowAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n BorrowLocalVars memory vars;\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on overflow:\\n * accountBorrowsNew = accountBorrows + borrowAmount\\n * totalBorrowsNew = totalBorrows + borrowAmount\\n */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the borrowAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken borrowAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n doTransferOut(receiver, borrowAmount);\\n\\n /* We emit a Borrow event */\\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\\n }\\n\\n /**\\n * @notice Borrows are repaid by another user (possibly the borrower).\\n * @param payer The account paying off the borrow\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount of undelrying tokens being returned\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\\n /* Fail if repayBorrow not allowed */\\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\\n if (allowed != 0) {\\n return (\\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\\n 0\\n );\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\\n }\\n\\n RepayBorrowLocalVars memory vars;\\n\\n /* We remember the original borrowerIndex for verification purposes */\\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\\n\\n /* We fetch the amount the borrower owes, with accumulated interest */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n uint(vars.mathErr)\\n ),\\n 0\\n );\\n }\\n\\n /* If repayAmount == -1, repayAmount = accountBorrows */\\n if (repayAmount == uint(-1)) {\\n vars.repayAmount = vars.accountBorrows;\\n } else {\\n vars.repayAmount = repayAmount;\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the payer and the repayAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional repayAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on underflow:\\n * accountBorrowsNew = accountBorrows - actualRepayAmount\\n * totalBorrowsNew = totalBorrows - actualRepayAmount\\n */\\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /* We emit a RepayBorrow event */\\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\\n\\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function liquidateBorrowInternal(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\\n }\\n\\n error = vTokenCollateral.accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\\n }\\n\\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\\n }\\n\\n /**\\n * @notice The liquidator liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param liquidator The address repaying the borrow and seizing collateral\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n // solhint-disable-next-line code-complexity\\n function liquidateBorrowFresh(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal returns (uint, uint) {\\n /* Fail if liquidate not allowed */\\n uint allowed = comptroller.liquidateBorrowAllowed(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n repayAmount\\n );\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Verify vTokenCollateral market's block number equals current block number */\\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\\n }\\n\\n /* Fail if repayAmount = 0 */\\n if (repayAmount == 0) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\\n }\\n\\n /* Fail if repayAmount = -1 */\\n if (repayAmount == uint(-1)) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\\n }\\n\\n /* Fail if repayBorrow fails */\\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\\n if (repayBorrowError != uint(Error.NO_ERROR)) {\\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We calculate the number of collateral tokens that will be seized */\\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\\n address(this),\\n address(vTokenCollateral),\\n actualRepayAmount\\n );\\n require(amountSeizeError == uint(Error.NO_ERROR), \\\"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\\\");\\n\\n /* Revert if borrower collateral token balance < seizeTokens */\\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \\\"LIQUIDATE_SEIZE_TOO_MUCH\\\");\\n\\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\\n uint seizeError;\\n if (address(vTokenCollateral) == address(this)) {\\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\\n } else {\\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\\n }\\n\\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\\n require(seizeError == uint(Error.NO_ERROR), \\\"token seizure failed\\\");\\n\\n /* We emit a LiquidateBorrow event */\\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.liquidateBorrowVerify(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n actualRepayAmount,\\n seizeTokens\\n );\\n\\n return (uint(Error.NO_ERROR), actualRepayAmount);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function seizeInternal(\\n address seizerToken,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) internal returns (uint) {\\n /* Fail if seize not allowed */\\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\\n }\\n\\n MathError mathErr;\\n uint borrowerTokensNew;\\n uint liquidatorTokensNew;\\n\\n /*\\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\\n */\\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\\n }\\n\\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountTokens[borrower] = borrowerTokensNew;\\n accountTokens[liquidator] = liquidatorTokensNew;\\n\\n /* Emit a Transfer event */\\n emit Transfer(borrower, liquidator, seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\\n * @dev Governance function to set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\\n // Verify market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\\n }\\n\\n // Check newReserveFactor \\u2264 maxReserveFactor\\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\\n }\\n\\n uint oldReserveFactorMantissa = reserveFactorMantissa;\\n reserveFactorMantissa = newReserveFactorMantissa;\\n\\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\\n * @param addAmount Amount of addition to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\\n (error, ) = _addReservesFresh(addAmount);\\n return error;\\n }\\n\\n /**\\n * @notice Add reserves by transferring from caller\\n * @dev Requires fresh interest accrual\\n * @param addAmount Amount of addition to reserves\\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\\n */\\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\\n // totalReserves + actualAddAmount\\n uint totalReservesNew;\\n uint actualAddAmount;\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the caller and the addAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional addAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n\\n actualAddAmount = doTransferIn(msg.sender, addAmount);\\n\\n totalReservesNew = totalReserves + actualAddAmount;\\n\\n /* Revert on overflow */\\n require(totalReservesNew >= totalReserves, \\\"add reserves unexpected overflow\\\");\\n\\n // Store reserves[n+1] = reserves[n] + actualAddAmount\\n totalReserves = totalReservesNew;\\n\\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\\n\\n /* Return (NO_ERROR, actualAddAmount) */\\n return (uint(Error.NO_ERROR), actualAddAmount);\\n }\\n\\n /**\\n * @notice Reduces reserves by transferring to protocol share reserve contract\\n * @dev Requires fresh interest accrual\\n * @param reduceAmount Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\\n if (reduceAmount == 0) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\\n }\\n\\n // Fail gracefully if protocol has insufficient underlying cash\\n if (getCashPrior() < reduceAmount) {\\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\\n }\\n\\n // Check reduceAmount \\u2264 reserves[n] (totalReserves)\\n if (reduceAmount > totalReserves) {\\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n // totalReserves - reduceAmount\\n uint totalReservesNew = totalReserves - reduceAmount;\\n\\n // Store reserves[n+1] = reserves[n] - reduceAmount\\n totalReserves = totalReservesNew;\\n\\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n doTransferOut(protocolShareReserve, reduceAmount);\\n\\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\\n address(comptroller),\\n underlying,\\n IProtocolShareReserveV5.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice updates the interest rate model (requires fresh interest accrual)\\n * @dev Governance function to update the interest rate model\\n * @param newInterestRateModel the new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\\n // Used to store old model for use in the event that is emitted on success\\n InterestRateModel oldInterestRateModel;\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\\n }\\n\\n // Track the market's current interest rate model\\n oldInterestRateModel = interestRateModel;\\n\\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\\n require(newInterestRateModel.isInterestRateModel(), \\\"marker method returned false\\\");\\n\\n // Set the interest rate model to newInterestRateModel\\n interestRateModel = newInterestRateModel;\\n\\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\\n * This may revert due to insufficient balance or insufficient allowance.\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint);\\n\\n /**\\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\\n */\\n function doTransferOut(address payable to, uint amount) internal;\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\\n */\\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\\n /* Note: we do not assert that the market is up to date */\\n MathError mathErr;\\n uint principalTimesIndex;\\n uint result;\\n\\n /* Get borrowBalance and borrowIndex */\\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\\n\\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\\n */\\n if (borrowSnapshot.principal == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n /* Calculate new borrow balance using the interest index:\\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\\n */\\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, result);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the vToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\\n uint _totalSupply = totalSupply;\\n if (_totalSupply == 0) {\\n /*\\n * If there are no tokens minted:\\n * exchangeRate = initialExchangeRate\\n */\\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\\n } else {\\n /*\\n * Otherwise:\\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\\n */\\n uint totalCash = getCashPrior();\\n uint cashPlusBorrowsMinusReserves;\\n Exp memory exchangeRate;\\n MathError mathErr;\\n\\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, exchangeRate.mantissa);\\n }\\n }\\n\\n function ensureAllowed(string memory functionSig) private view {\\n require(\\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\\n \\\"access denied\\\"\\n );\\n }\\n\\n function ensureAdmin(address caller_) private view {\\n require(caller_ == admin, \\\"Unauthorized\\\");\\n }\\n\\n function ensureNoMathError(MathError mErr) private pure {\\n require(mErr == MathError.NO_ERROR, \\\"math error\\\");\\n }\\n\\n function ensureNonZeroAddress(address address_) private pure {\\n require(address_ != address(0), \\\"zero address\\\");\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying owned by this contract\\n */\\n function getCashPrior() internal view returns (uint);\\n}\\n\",\"keccak256\":\"0xfdbcdbd6cab4aeba2c06f39adbfbd8e42a3e50d02aed628c2d76b97659d84b68\"},\"contracts/Tokens/VTokens/VTokenInterfaces.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\n\\ninterface IProtocolShareReserveV5 {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\\n}\\n\\ncontract VTokenStorageBase {\\n /**\\n * @notice Container for borrow balance information\\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\\n */\\n struct BorrowSnapshot {\\n uint principal;\\n uint interestIndex;\\n }\\n\\n /**\\n * @dev Guard variable for re-entrancy checks\\n */\\n bool internal _notEntered;\\n\\n /**\\n * @notice EIP-20 token name for this token\\n */\\n string public name;\\n\\n /**\\n * @notice EIP-20 token symbol for this token\\n */\\n string public symbol;\\n\\n /**\\n * @notice EIP-20 token decimals for this token\\n */\\n uint8 public decimals;\\n\\n /**\\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\\n */\\n\\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\\n\\n /**\\n * @notice Maximum fraction of interest that can be set aside for reserves\\n */\\n uint internal constant reserveFactorMaxMantissa = 1e18;\\n\\n /**\\n * @notice Administrator for this contract\\n */\\n address payable public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address payable public pendingAdmin;\\n\\n /**\\n * @notice Contract which oversees inter-vToken operations\\n */\\n ComptrollerInterface public comptroller;\\n\\n /**\\n * @notice Model which tells what the current interest rate should be\\n */\\n InterestRateModel public interestRateModel;\\n\\n /**\\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\\n */\\n uint internal initialExchangeRateMantissa;\\n\\n /**\\n * @notice Fraction of interest currently set aside for reserves\\n */\\n uint public reserveFactorMantissa;\\n\\n /**\\n * @notice Block number that interest was last accrued at\\n */\\n uint public accrualBlockNumber;\\n\\n /**\\n * @notice Accumulator of the total earned interest rate since the opening of the market\\n */\\n uint public borrowIndex;\\n\\n /**\\n * @notice Total amount of outstanding borrows of the underlying in this market\\n */\\n uint public totalBorrows;\\n\\n /**\\n * @notice Total amount of reserves of the underlying held in this market\\n */\\n uint public totalReserves;\\n\\n /**\\n * @notice Total number of tokens in circulation\\n */\\n uint public totalSupply;\\n\\n /**\\n * @notice Official record of token balances for each account\\n */\\n mapping(address => uint) internal accountTokens;\\n\\n /**\\n * @notice Approved token transfer amounts on behalf of others\\n */\\n mapping(address => mapping(address => uint)) internal transferAllowances;\\n\\n /**\\n * @notice Mapping of account addresses to outstanding borrow balances\\n */\\n mapping(address => BorrowSnapshot) internal accountBorrows;\\n\\n /**\\n * @notice Underlying asset for this VToken\\n */\\n address public underlying;\\n\\n /**\\n * @notice Implementation address for this contract\\n */\\n address public implementation;\\n\\n /**\\n * @notice delta block after which reserves will be reduced\\n */\\n uint public reduceReservesBlockDelta;\\n\\n /**\\n * @notice last block number at which reserves were reduced\\n */\\n uint public reduceReservesBlockNumber;\\n\\n /**\\n * @notice address of protocol share reserve contract\\n */\\n address payable public protocolShareReserve;\\n\\n /**\\n * @notice address of accessControlManager\\n */\\n\\n address public accessControlManager;\\n}\\n\\ncontract VTokenStorage is VTokenStorageBase {\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\\ncontract VTokenInterface is VTokenStorage {\\n /**\\n * @notice Indicator that this is a vToken contract (for inspection)\\n */\\n bool public constant isVToken = true;\\n\\n /*** Market Events ***/\\n\\n /**\\n * @notice Event emitted when interest is accrued\\n */\\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when tokens are minted\\n */\\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are minted behalf by payer to receiver\\n */\\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed\\n */\\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed and fee is transferred\\n */\\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\\n\\n /**\\n * @notice Event emitted when underlying is borrowed\\n */\\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is repaid\\n */\\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is liquidated\\n */\\n event LiquidateBorrow(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n address vTokenCollateral,\\n uint seizeTokens\\n );\\n\\n /*** Admin Events ***/\\n\\n /**\\n * @notice Event emitted when pendingAdmin is changed\\n */\\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\\n\\n /**\\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\\n */\\n event NewAdmin(address oldAdmin, address newAdmin);\\n\\n /**\\n * @notice Event emitted when comptroller is changed\\n */\\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\\n\\n /**\\n * @notice Event emitted when interestRateModel is changed\\n */\\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\\n\\n /**\\n * @notice Event emitted when the reserve factor is changed\\n */\\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\\n\\n /**\\n * @notice Event emitted when the reserves are added\\n */\\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\\n\\n /**\\n * @notice Event emitted when the reserves are reduced\\n */\\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\\n\\n /**\\n * @notice EIP20 Transfer event\\n */\\n event Transfer(address indexed from, address indexed to, uint amount);\\n\\n /**\\n * @notice EIP20 Approval event\\n */\\n event Approval(address indexed owner, address indexed spender, uint amount);\\n\\n /**\\n * @notice Event emitted when block delta for reduce reserves get updated\\n */\\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\\n\\n /**\\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\\n */\\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\\n\\n /**\\n * @notice Failure event\\n */\\n event Failure(uint error, uint info, uint detail);\\n\\n /// @notice Emitted when access control address is changed by admin\\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\\n\\n /*** User Interface ***/\\n\\n function transfer(address dst, uint amount) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint amount) external returns (bool);\\n\\n function approve(address spender, uint amount) external returns (bool);\\n\\n function balanceOfUnderlying(address owner) external returns (uint);\\n\\n function totalBorrowsCurrent() external returns (uint);\\n\\n function borrowBalanceCurrent(address account) external returns (uint);\\n\\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _acceptAdmin() external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function balanceOf(address owner) external view returns (uint);\\n\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\\n\\n function borrowRatePerBlock() external view returns (uint);\\n\\n function supplyRatePerBlock() external view returns (uint);\\n\\n function getCash() external view returns (uint);\\n\\n function exchangeRateCurrent() public returns (uint);\\n\\n function accrueInterest() public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\\n\\n function borrowBalanceStored(address account) public view returns (uint);\\n\\n function exchangeRateStored() public view returns (uint);\\n}\\n\\ncontract VBep20Interface {\\n /*** User Interface ***/\\n\\n function mint(uint mintAmount) external returns (uint);\\n\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\\n\\n function redeem(uint redeemTokens) external returns (uint);\\n\\n function redeemUnderlying(uint redeemAmount) external returns (uint);\\n\\n function borrow(uint borrowAmount) external returns (uint);\\n\\n function repayBorrow(uint repayAmount) external returns (uint);\\n\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\\n\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint);\\n\\n /*** Admin Functions ***/\\n\\n function _addReserves(uint addAmount) external returns (uint);\\n}\\n\\ncontract VDelegatorInterface {\\n /**\\n * @notice Emitted when implementation is changed\\n */\\n event NewImplementation(address oldImplementation, address newImplementation);\\n\\n /**\\n * @notice Called by the admin to update the implementation of the delegator\\n * @param implementation_ The address of the new implementation for delegation\\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\\n */\\n function _setImplementation(\\n address implementation_,\\n bool allowResign,\\n bytes memory becomeImplementationData\\n ) public;\\n}\\n\\ncontract VDelegateInterface {\\n /**\\n * @notice Called by the delegator on a delegate to initialize it for duty\\n * @dev Should revert if any issues arise which make it unfit for delegation\\n * @param data The encoded bytes data for any initialization\\n */\\n function _becomeImplementation(bytes memory data) public;\\n\\n /**\\n * @notice Called by the delegator on a delegate to forfeit its responsibility\\n */\\n function _resignImplementation() public;\\n}\\n\",\"keccak256\":\"0x2f12533847458414b423cc85677489709d772bec4e48933ae983d6861202a41b\"},\"contracts/Utils/CarefulMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Careful Math\\n * @author Venus\\n * @notice Derived from OpenZeppelin's SafeMath library\\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\\n */\\ncontract CarefulMath {\\n /**\\n * @dev Possible error codes that we can return\\n */\\n enum MathError {\\n NO_ERROR,\\n DIVISION_BY_ZERO,\\n INTEGER_OVERFLOW,\\n INTEGER_UNDERFLOW\\n }\\n\\n /**\\n * @dev Multiplies two numbers, returns an error on overflow.\\n */\\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (a == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n uint c = a * b;\\n\\n if (c / a != b) {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n } else {\\n return (MathError.NO_ERROR, c);\\n }\\n }\\n\\n /**\\n * @dev Integer division of two numbers, truncating the quotient.\\n */\\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b == 0) {\\n return (MathError.DIVISION_BY_ZERO, 0);\\n }\\n\\n return (MathError.NO_ERROR, a / b);\\n }\\n\\n /**\\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b <= a) {\\n return (MathError.NO_ERROR, a - b);\\n } else {\\n return (MathError.INTEGER_UNDERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev Adds two numbers, returns an error on overflow.\\n */\\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n uint c = a + b;\\n\\n if (c >= a) {\\n return (MathError.NO_ERROR, c);\\n } else {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev add a and b and then subtract c\\n */\\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\\n (MathError err0, uint sum) = addUInt(a, b);\\n\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, 0);\\n }\\n\\n return subUInt(sum, c);\\n }\\n}\\n\",\"keccak256\":\"0x5bd84fb723641b98d0559272323b90ce42595f025af89cfb214d8c064c9ee3c3\"},\"contracts/Utils/ErrorReporter.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\ncontract ComptrollerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n COMPTROLLER_MISMATCH,\\n INSUFFICIENT_SHORTFALL,\\n INSUFFICIENT_LIQUIDITY,\\n INVALID_CLOSE_FACTOR,\\n INVALID_COLLATERAL_FACTOR,\\n INVALID_LIQUIDATION_INCENTIVE,\\n MARKET_NOT_ENTERED, // no longer possible\\n MARKET_NOT_LISTED,\\n MARKET_ALREADY_LISTED,\\n MATH_ERROR,\\n NONZERO_BORROW_BALANCE,\\n PRICE_ERROR,\\n REJECTION,\\n SNAPSHOT_ERROR,\\n TOO_MANY_ASSETS,\\n TOO_MUCH_REPAY,\\n INSUFFICIENT_BALANCE_FOR_VAI,\\n MARKET_NOT_COLLATERAL\\n }\\n\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n EXIT_MARKET_BALANCE_OWED,\\n EXIT_MARKET_REJECTION,\\n SET_CLOSE_FACTOR_OWNER_CHECK,\\n SET_CLOSE_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_NO_EXISTS,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\\n SET_IMPLEMENTATION_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_PRICE_ORACLE_OWNER_CHECK,\\n SUPPORT_MARKET_EXISTS,\\n SUPPORT_MARKET_OWNER_CHECK,\\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\\n SET_VAI_MINT_RATE_CHECK,\\n SET_VAICONTROLLER_OWNER_CHECK,\\n SET_MINTED_VAI_REJECTION,\\n SET_TREASURY_OWNER_CHECK,\\n UNLIST_MARKET_NOT_LISTED\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract TokenErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n BAD_INPUT,\\n COMPTROLLER_REJECTION,\\n COMPTROLLER_CALCULATION_ERROR,\\n INTEREST_RATE_MODEL_ERROR,\\n INVALID_ACCOUNT_PAIR,\\n INVALID_CLOSE_AMOUNT_REQUESTED,\\n INVALID_COLLATERAL_FACTOR,\\n MATH_ERROR,\\n MARKET_NOT_FRESH,\\n MARKET_NOT_LISTED,\\n TOKEN_INSUFFICIENT_ALLOWANCE,\\n TOKEN_INSUFFICIENT_BALANCE,\\n TOKEN_INSUFFICIENT_CASH,\\n TOKEN_TRANSFER_IN_FAILED,\\n TOKEN_TRANSFER_OUT_FAILED,\\n TOKEN_PRICE_ERROR\\n }\\n\\n /*\\n * Note: FailureInfo (but not Error) is kept in alphabetical order\\n * This is because FailureInfo grows significantly faster, and\\n * the order of Error has some meaning, while the order of FailureInfo\\n * is entirely arbitrary.\\n */\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n BORROW_ACCRUE_INTEREST_FAILED,\\n BORROW_CASH_NOT_AVAILABLE,\\n BORROW_FRESHNESS_CHECK,\\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n BORROW_MARKET_NOT_LISTED,\\n BORROW_COMPTROLLER_REJECTION,\\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n LIQUIDATE_COMPTROLLER_REJECTION,\\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n LIQUIDATE_FRESHNESS_CHECK,\\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_ACCRUE_INTEREST_FAILED,\\n MINT_COMPTROLLER_REJECTION,\\n MINT_EXCHANGE_CALCULATION_FAILED,\\n MINT_EXCHANGE_RATE_READ_FAILED,\\n MINT_FRESHNESS_CHECK,\\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n MINT_TRANSFER_IN_FAILED,\\n MINT_TRANSFER_IN_NOT_POSSIBLE,\\n REDEEM_ACCRUE_INTEREST_FAILED,\\n REDEEM_COMPTROLLER_REJECTION,\\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_RATE_READ_FAILED,\\n REDEEM_FRESHNESS_CHECK,\\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\\n REDUCE_RESERVES_ADMIN_CHECK,\\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\\n REDUCE_RESERVES_FRESH_CHECK,\\n REDUCE_RESERVES_VALIDATION,\\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_COMPTROLLER_REJECTION,\\n REPAY_BORROW_FRESHNESS_CHECK,\\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COMPTROLLER_OWNER_CHECK,\\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_ORACLE_MARKET_NOT_LISTED,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\\n SET_RESERVE_FACTOR_ADMIN_CHECK,\\n SET_RESERVE_FACTOR_FRESH_CHECK,\\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\\n TRANSFER_COMPTROLLER_REJECTION,\\n TRANSFER_NOT_ALLOWED,\\n TRANSFER_NOT_ENOUGH,\\n TRANSFER_TOO_MUCH,\\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\\n ADD_RESERVES_FRESH_CHECK,\\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\\n REPAY_VAI_COMPTROLLER_REJECTION,\\n REPAY_VAI_FRESHNESS_CHECK,\\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract VAIControllerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED, // The sender is not authorized to perform this action.\\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\\n MATH_ERROR, // A math calculation error occurred.\\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\\n }\\n\\n enum FailureInfo {\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_COMPTROLLER_OWNER_CHECK,\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n VAI_MINT_REJECTION,\\n VAI_BURN_REJECTION,\\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n VAI_LIQUIDATE_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_FEE_CALCULATION_FAILED,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\",\"keccak256\":\"0x4f5a41ef380336395706659e2b8f315870dcf3d617ea6f81104424500b15b1ef\"},\"contracts/Utils/Exponential.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"./CarefulMath.sol\\\";\\nimport \\\"./ExponentialNoError.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Venus\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract Exponential is CarefulMath, ExponentialNoError {\\n /**\\n * @dev Creates an exponential from numerator and denominator values.\\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\\n * or if `denom` is zero.\\n */\\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\\n }\\n\\n /**\\n * @dev Adds two exponentials, returning a new exponential.\\n */\\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Subtracts two exponentials, returning a new exponential.\\n */\\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, returning a new Exp.\\n */\\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(product));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return addUInt(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Divide an Exp by a scalar, returning a new Exp.\\n */\\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, returning a new Exp.\\n */\\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\\n /*\\n We are doing this as:\\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\\n\\n How it works:\\n Exp = a / b;\\n Scalar = s;\\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\\n */\\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n return getExp(numerator, divisor.mantissa);\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\\n */\\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(fraction));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials, returning a new exponential.\\n */\\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n // We add half the scale before dividing so that we get rounding instead of truncation.\\n // See \\\"Listing 6\\\" and text above it at https://accu.org/index.php/journals/1717\\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\\n assert(err2 == MathError.NO_ERROR);\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\\n */\\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\\n }\\n\\n /**\\n * @dev Multiplies three exponentials, returning a new exponential.\\n */\\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\\n (MathError err, Exp memory ab) = mulExp(a, b);\\n if (err != MathError.NO_ERROR) {\\n return (err, ab);\\n }\\n return mulExp(ab, c);\\n }\\n\\n /**\\n * @dev Divides two exponentials, returning a new exponential.\\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\\n */\\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n return getExp(a.mantissa, b.mantissa);\\n }\\n}\\n\",\"keccak256\":\"0x92a68e9f6de3a70b103aa0ddb68faa8e60c443b1268e03853d5054171fe8e290\"},\"contracts/Utils/ExponentialNoError.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n uint internal constant expScale = 1e18;\\n uint internal constant doubleScale = 1e36;\\n uint internal constant halfExpScale = expScale / 2;\\n uint internal constant mantissaOne = expScale;\\n\\n struct Exp {\\n uint mantissa;\\n }\\n\\n struct Double {\\n uint mantissa;\\n }\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / expScale;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp <= right Exp.\\n */\\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa <= right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp > right Exp.\\n */\\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa > right.mantissa;\\n }\\n\\n /**\\n * @dev returns true if Exp is exactly zero\\n */\\n function isZeroExp(Exp memory value) internal pure returns (bool) {\\n return value.mantissa == 0;\\n }\\n\\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\\n require(n < 2 ** 224, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2 ** 32, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint a, uint b) internal pure returns (uint) {\\n return add_(a, b, \\\"addition overflow\\\");\\n }\\n\\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n uint c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint a, uint b) internal pure returns (uint) {\\n return sub_(a, b, \\\"subtraction underflow\\\");\\n }\\n\\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\\n }\\n\\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / expScale;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\\n }\\n\\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Double memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / doubleScale;\\n }\\n\\n function mul_(uint a, uint b) internal pure returns (uint) {\\n return mul_(a, b, \\\"multiplication overflow\\\");\\n }\\n\\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n uint c = a * b;\\n require(c / a == b, errorMessage);\\n return c;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Exp memory b) internal pure returns (uint) {\\n return div_(mul_(a, expScale), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Double memory b) internal pure returns (uint) {\\n return div_(mul_(a, doubleScale), b.mantissa);\\n }\\n\\n function div_(uint a, uint b) internal pure returns (uint) {\\n return div_(a, b, \\\"divide by zero\\\");\\n }\\n\\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n function fraction(uint a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\\n }\\n}\\n\",\"keccak256\":\"0x237e63d9ad2bf232d70f854b8867a465913cab4d2033d295ec7736bf618ca302\"}},\"version\":1}",
1746
+ "bytecode": "0x60806040523480156200001157600080fd5b50604051620026af380380620026af83398181016040526101408110156200003857600080fd5b81516020830151604080850151606086015160808701805193519597949692959194919392820192846401000000008211156200007457600080fd5b9083019060208201858111156200008a57600080fd5b8251640100000000811182820188101715620000a557600080fd5b82525081516020918201929091019080838360005b83811015620000d4578181015183820152602001620000ba565b50505050905090810190601f168015620001025780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200012657600080fd5b9083019060208201858111156200013c57600080fd5b82516401000000008111828201881017156200015757600080fd5b82525081516020918201929091019080838360005b83811015620001865781810151838201526020016200016c565b50505050905090810190601f168015620001b45780820380516001836020036101000a031916815260200191505b50604081815260208301519083015160608401516080909401805192969195919284640100000000821115620001e957600080fd5b908301906020820185811115620001ff57600080fd5b82516401000000008111828201881017156200021a57600080fd5b82525081516020918201929091019080838360005b83811015620002495781810151838201526020016200022f565b50505050905090810190601f168015620002775780820380516001836020036101000a031916815260200191505b5060405250505033600360016101000a8154816001600160a01b0302191690836001600160a01b0316021790555062000424828b8b8b8b8b8b8b60405160240180886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b0316815260200185815260200180602001806020018460ff1660ff168152602001838103835286818151815260200191508051906020019080838360005b838110156200035157818101518382015260200162000337565b50505050905090810190601f1680156200037f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620003b45781810151838201526020016200039a565b50505050905090810190601f168015620003e25780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03908116631a31d46560e01b17909152909a50620004721698505050505050505050565b506200043c826000836001600160e01b036200053916565b5050600380546001600160a01b0390921661010002610100600160a81b0319909216919091179055506200071a95505050505050565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310620004b45780518252601f19909201916020918201910162000493565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811462000516576040519150601f19603f3d011682016040523d82523d6000602084013e6200051b565b606091505b5091509150600082141562000531573d60208201fd5b949350505050565b60035461010090046001600160a01b03163314620005895760405162461bcd60e51b8152600401808060200182810382526039815260200180620026766039913960400191505060405180910390fd5b8115620005cb576040805160048152602481019091526020810180516001600160e01b0390811663153ab50560e01b17909152620005c99190620006f016565b505b601280546001600160a01b038581166001600160a01b03198316179092556040516020602482018181528551604484015285519490931693620006a1938693909283926064909201919085019080838360005b83811015620006385781810151838201526020016200061e565b50505050905090810190601f168015620006665780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03908116630adccee560e31b17909152909350620006f016915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b60125460609062000714906001600160a01b0316836001600160e01b036200047216565b92915050565b611f4c806200072a6000396000f3fe6080604052600436106103505760003560e01c806373acee98116101c6578063bd6d894d116100f7578063e9c714f211610095578063f5e3c4621161006f578063f5e3c46214610db4578063f851a44014610df7578063f8f9da2814610e0c578063fca7820b14610e2157610350565b8063e9c714f214610d57578063f2b3abbd14610d6c578063f3fdb15a14610d9f57610350565b8063d1109c2f116100d1578063d1109c2f14610cc8578063db006a7514610cdd578063dd62ed3e14610d07578063e9a44fd914610d4257610350565b8063bd6d894d14610c30578063c37f68e214610c45578063c5ebeaec14610c9e57610350565b8063a9059cbb11610164578063ae9d70b01161013e578063ae9d70b014610b90578063b2a02ff114610ba5578063b4a0bdf314610be8578063b71d1a0c14610bfd57610350565b8063a9059cbb14610b2d578063aa5af0fd14610b66578063ae96f14114610b7b57610350565b806395d89b41116101a057806395d89b4114610aa657806395dd919314610abb578063a0712d6814610aee578063a6afed9514610b1857610350565b806373acee9814610a52578063852a12e314610a675780638f840ddd14610a9157610350565b80633af9e669116102a0578063555bcc401161023e578063601a0bf111610218578063601a0bf1146109cb5780636c540baf146109f55780636f307dc314610a0a57806370a0823114610a1f57610350565b8063555bcc40146108d75780635c60da1b146109a15780635fe3b567146109b657610350565b80633e9410101161027a5780633e941010146107b45780634487152f146107de5780634576b5db1461088f57806347bd3718146108c257610350565b80633af9e669146107575780633b1d21a21461078a5780633d9ea3a11461079f57610350565b806318160ddd1161030d57806323b872dd116102e757806323b872dd1461067f5780632608f818146106c257806326782247146106fb578063313ce5671461072c57610350565b806318160ddd1461061c578063182df0f51461063157806323323e031461064657610350565b806306fdde03146104105780630933c1ed1461049a578063095ea7b31461054b5780630e75270214610598578063173b9904146105d457806317bfdfbc146105e9575b341561038d5760405162461bcd60e51b8152600401808060200182810382526037815260200180611ee16037913960400191505060405180910390fd5b6012546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146103f0576040519150601f19603f3d011682016040523d82523d6000602084013e6103f5565b606091505b505090506040513d6000823e81801561040c573d82f35b3d82fd5b34801561041c57600080fd5b50610425610e4b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561045f578181015183820152602001610447565b50505050905090810190601f16801561048c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104a657600080fd5b50610425600480360360208110156104bd57600080fd5b810190602081018135600160201b8111156104d757600080fd5b8201836020820111156104e957600080fd5b803590602001918460018302840111600160201b8311171561050a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ed8945050505050565b34801561055757600080fd5b506105846004803603604081101561056e57600080fd5b506001600160a01b038135169060200135610ef7565b604080519115158252519081900360200190f35b3480156105a457600080fd5b506105c2600480360360208110156105bb57600080fd5b5035610f6e565b60408051918252519081900360200190f35b3480156105e057600080fd5b506105c2610fd5565b3480156105f557600080fd5b506105c26004803603602081101561060c57600080fd5b50356001600160a01b0316610fdb565b34801561062857600080fd5b506105c261102d565b34801561063d57600080fd5b506105c2611033565b34801561065257600080fd5b506105c26004803603604081101561066957600080fd5b506001600160a01b03813516906020013561108a565b34801561068b57600080fd5b50610584600480360360608110156106a257600080fd5b506001600160a01b038135811691602081013590911690604001356110e0565b3480156106ce57600080fd5b506105c2600480360360408110156106e557600080fd5b506001600160a01b038135169060200135611160565b34801561070757600080fd5b506107106111b6565b604080516001600160a01b039092168252519081900360200190f35b34801561073857600080fd5b506107416111c5565b6040805160ff9092168252519081900360200190f35b34801561076357600080fd5b506105c26004803603602081101561077a57600080fd5b50356001600160a01b03166111ce565b34801561079657600080fd5b506105c2611220565b3480156107ab57600080fd5b50610584611258565b3480156107c057600080fd5b506105c2600480360360208110156107d757600080fd5b503561125d565b3480156107ea57600080fd5b506104256004803603602081101561080157600080fd5b810190602081018135600160201b81111561081b57600080fd5b82018360208201111561082d57600080fd5b803590602001918460018302840111600160201b8311171561084e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506112a4945050505050565b34801561089b57600080fd5b506105c2600480360360208110156108b257600080fd5b50356001600160a01b03166114c3565b3480156108ce57600080fd5b506105c2611515565b3480156108e357600080fd5b5061099f600480360360608110156108fa57600080fd5b6001600160a01b03823516916020810135151591810190606081016040820135600160201b81111561092b57600080fd5b82018360208201111561093d57600080fd5b803590602001918460018302840111600160201b8311171561095e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061151b945050505050565b005b3480156109ad57600080fd5b506107106116be565b3480156109c257600080fd5b506107106116cd565b3480156109d757600080fd5b506105c2600480360360208110156109ee57600080fd5b50356116dc565b348015610a0157600080fd5b506105c2611723565b348015610a1657600080fd5b50610710611729565b348015610a2b57600080fd5b506105c260048036036020811015610a4257600080fd5b50356001600160a01b0316611738565b348015610a5e57600080fd5b506105c261178a565b348015610a7357600080fd5b506105c260048036036020811015610a8a57600080fd5b50356117c2565b348015610a9d57600080fd5b506105c2611809565b348015610ab257600080fd5b5061042561180f565b348015610ac757600080fd5b506105c260048036036020811015610ade57600080fd5b50356001600160a01b0316611867565b348015610afa57600080fd5b506105c260048036036020811015610b1157600080fd5b50356118b9565b348015610b2457600080fd5b506105c2611900565b348015610b3957600080fd5b5061058460048036036040811015610b5057600080fd5b506001600160a01b038135169060200135611938565b348015610b7257600080fd5b506105c261198e565b348015610b8757600080fd5b506105c2611994565b348015610b9c57600080fd5b506105c261199a565b348015610bb157600080fd5b506105c260048036036060811015610bc857600080fd5b506001600160a01b038135811691602081013590911690604001356119d2565b348015610bf457600080fd5b50610710611a30565b348015610c0957600080fd5b506105c260048036036020811015610c2057600080fd5b50356001600160a01b0316611a3f565b348015610c3c57600080fd5b506105c2611a91565b348015610c5157600080fd5b50610c7860048036036020811015610c6857600080fd5b50356001600160a01b0316611ac9565b604080519485526020850193909352838301919091526060830152519081900360800190f35b348015610caa57600080fd5b506105c260048036036020811015610cc157600080fd5b5035611b5b565b348015610cd457600080fd5b506105c2611ba2565b348015610ce957600080fd5b506105c260048036036020811015610d0057600080fd5b5035611ba8565b348015610d1357600080fd5b506105c260048036036040811015610d2a57600080fd5b506001600160a01b0381358116916020013516611bef565b348015610d4e57600080fd5b50610710611c49565b348015610d6357600080fd5b506105c2611c58565b348015610d7857600080fd5b506105c260048036036020811015610d8f57600080fd5b50356001600160a01b0316611c90565b348015610dab57600080fd5b50610710611ce2565b348015610dc057600080fd5b506105c260048036036060811015610dd757600080fd5b506001600160a01b03813581169160208101359160409091013516611cf1565b348015610e0357600080fd5b50610710611d52565b348015610e1857600080fd5b506105c2611d66565b348015610e2d57600080fd5b506105c260048036036020811015610e4457600080fd5b5035611d9e565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610ed05780601f10610ea557610100808354040283529160200191610ed0565b820191906000526020600020905b815481529060010190602001808311610eb357829003601f168201915b505050505081565b601254606090610ef1906001600160a01b031683611de5565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052600090606090610f4d90610ed8565b9050808060200190516020811015610f6457600080fd5b5051949350505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663073a938160e11b179052600090606090610fb590610ed8565b9050808060200190516020811015610fcc57600080fd5b50519392505050565b60085481565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166305eff7ef60e21b179052600090606090610fb590610ed8565b600d5481565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b17905260009060609061106b906112a4565b905080806020019051602081101561108257600080fd5b505191505090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03166323323e0360e01b179052600090606090610f4d90610ed8565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905260009060609061113e90610ed8565b905080806020019051602081101561115557600080fd5b505195945050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03166304c11f0360e31b179052600090606090610f4d90610ed8565b6004546001600160a01b031681565b60035460ff1681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316633af9e66960e01b179052600090606090610fb590610ed8565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b17905260009060609061106b906112a4565b600181565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b03166303e9410160e41b179052600090606090610fb590610ed8565b606060006060306001600160a01b0316846040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156112f55781810151838201526020016112dd565b50505050905090810190601f1680156113225780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b178152905182519295509350839250908083835b6020831061137d5780518252601f19909201916020918201910161135e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146113dd576040519150601f19603f3d011682016040523d82523d6000602084013e6113e2565b606091505b509150915060008214156113f7573d60208201fd5b80806020019051602081101561140c57600080fd5b8101908080516040519392919084600160201b82111561142b57600080fd5b90830190602082018581111561144057600080fd5b8251600160201b81118282018810171561145957600080fd5b82525081516020918201929091019080838360005b8381101561148657818101518382015260200161146e565b50505050905090810190601f1680156114b35780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316634576b5db60e01b179052600090606090610fb590610ed8565b600b5481565b60035461010090046001600160a01b031633146115695760405162461bcd60e51b8152600401808060200182810382526039815260200180611ea86039913960400191505060405180910390fd5b81156115a3576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b1790526115a190610ed8565b505b601280546001600160a01b038581166001600160a01b0319831617909255604051602060248201818152855160448401528551949093169361166f938693909283926064909201919085019080838360005b8381101561160d5781810151838201526020016115f5565b50505050905090810190601f16801561163a5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b1790529250610ed8915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b6012546001600160a01b031681565b6005546001600160a01b031681565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663601a0bf160e01b179052600090606090610fb590610ed8565b60095481565b6011546001600160a01b031681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166370a0823160e01b179052600090606090610fb5906112a4565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b17905260009060609061106b90610ed8565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663852a12e360e01b179052600090606090610fb590610ed8565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610ed05780601f10610ea557610100808354040283529160200191610ed0565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166395dd919360e01b179052600090606090610fb5906112a4565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663140e25ad60e31b179052600090606090610fb590610ed8565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b17905260009060609061106b90610ed8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052600090606090610f4d90610ed8565b600a5481565b60145481565b6040805160048152602481019091526020810180516001600160e01b0316630ae9d70b60e41b17905260009060609061106b906112a4565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b031663b2a02ff160e01b17905260009060609061113e90610ed8565b6016546001600160a01b031681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316632dc7468360e21b179052600090606090610fb590610ed8565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b17905260009060609061106b90610ed8565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166361bfb47160e11b179052600090819081908190606090611b21906112a4565b9050808060200190516080811015611b3857600080fd5b508051602082015160408301516060909301519199909850919650945092505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663317afabb60e21b179052600090606090610fb590610ed8565b60135481565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663db006a7560e01b179052600090606090610fb590610ed8565b604080516001600160a01b03808516602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316636eb1769f60e11b179052600090606090610f4d906112a4565b6015546001600160a01b031681565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b17905260009060609061106b90610ed8565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031663f2b3abbd60e01b179052600090606090610fb590610ed8565b6006546001600160a01b031681565b604080516001600160a01b0380861660248301526044820185905283166064808301919091528251808303909101815260849091019091526020810180516001600160e01b0316637af1e23160e11b17905260009060609061113e90610ed8565b60035461010090046001600160a01b031681565b6040805160048152602481019091526020810180516001600160e01b0316631f1f3b4560e31b17905260009060609061106b906112a4565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663fca7820b60e01b179052600090606090610fb590610ed8565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310611e255780518252601f199092019160209182019101611e06565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611e85576040519150601f19603f3d011682016040523d82523d6000602084013e611e8a565b606091505b50915091506000821415611e9f573d60208201fd5b94935050505056fe56426570323044656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696e56426570323044656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636ba265627a7a72315820cf4d8382732299e3b736c2441acc517d487d82b99b7755342736502c1bfc44d664736f6c6343000510003256426570323044656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696e",
1747
+ "deployedBytecode": "0x6080604052600436106103505760003560e01c806373acee98116101c6578063bd6d894d116100f7578063e9c714f211610095578063f5e3c4621161006f578063f5e3c46214610db4578063f851a44014610df7578063f8f9da2814610e0c578063fca7820b14610e2157610350565b8063e9c714f214610d57578063f2b3abbd14610d6c578063f3fdb15a14610d9f57610350565b8063d1109c2f116100d1578063d1109c2f14610cc8578063db006a7514610cdd578063dd62ed3e14610d07578063e9a44fd914610d4257610350565b8063bd6d894d14610c30578063c37f68e214610c45578063c5ebeaec14610c9e57610350565b8063a9059cbb11610164578063ae9d70b01161013e578063ae9d70b014610b90578063b2a02ff114610ba5578063b4a0bdf314610be8578063b71d1a0c14610bfd57610350565b8063a9059cbb14610b2d578063aa5af0fd14610b66578063ae96f14114610b7b57610350565b806395d89b41116101a057806395d89b4114610aa657806395dd919314610abb578063a0712d6814610aee578063a6afed9514610b1857610350565b806373acee9814610a52578063852a12e314610a675780638f840ddd14610a9157610350565b80633af9e669116102a0578063555bcc401161023e578063601a0bf111610218578063601a0bf1146109cb5780636c540baf146109f55780636f307dc314610a0a57806370a0823114610a1f57610350565b8063555bcc40146108d75780635c60da1b146109a15780635fe3b567146109b657610350565b80633e9410101161027a5780633e941010146107b45780634487152f146107de5780634576b5db1461088f57806347bd3718146108c257610350565b80633af9e669146107575780633b1d21a21461078a5780633d9ea3a11461079f57610350565b806318160ddd1161030d57806323b872dd116102e757806323b872dd1461067f5780632608f818146106c257806326782247146106fb578063313ce5671461072c57610350565b806318160ddd1461061c578063182df0f51461063157806323323e031461064657610350565b806306fdde03146104105780630933c1ed1461049a578063095ea7b31461054b5780630e75270214610598578063173b9904146105d457806317bfdfbc146105e9575b341561038d5760405162461bcd60e51b8152600401808060200182810382526037815260200180611ee16037913960400191505060405180910390fd5b6012546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146103f0576040519150601f19603f3d011682016040523d82523d6000602084013e6103f5565b606091505b505090506040513d6000823e81801561040c573d82f35b3d82fd5b34801561041c57600080fd5b50610425610e4b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561045f578181015183820152602001610447565b50505050905090810190601f16801561048c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104a657600080fd5b50610425600480360360208110156104bd57600080fd5b810190602081018135600160201b8111156104d757600080fd5b8201836020820111156104e957600080fd5b803590602001918460018302840111600160201b8311171561050a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ed8945050505050565b34801561055757600080fd5b506105846004803603604081101561056e57600080fd5b506001600160a01b038135169060200135610ef7565b604080519115158252519081900360200190f35b3480156105a457600080fd5b506105c2600480360360208110156105bb57600080fd5b5035610f6e565b60408051918252519081900360200190f35b3480156105e057600080fd5b506105c2610fd5565b3480156105f557600080fd5b506105c26004803603602081101561060c57600080fd5b50356001600160a01b0316610fdb565b34801561062857600080fd5b506105c261102d565b34801561063d57600080fd5b506105c2611033565b34801561065257600080fd5b506105c26004803603604081101561066957600080fd5b506001600160a01b03813516906020013561108a565b34801561068b57600080fd5b50610584600480360360608110156106a257600080fd5b506001600160a01b038135811691602081013590911690604001356110e0565b3480156106ce57600080fd5b506105c2600480360360408110156106e557600080fd5b506001600160a01b038135169060200135611160565b34801561070757600080fd5b506107106111b6565b604080516001600160a01b039092168252519081900360200190f35b34801561073857600080fd5b506107416111c5565b6040805160ff9092168252519081900360200190f35b34801561076357600080fd5b506105c26004803603602081101561077a57600080fd5b50356001600160a01b03166111ce565b34801561079657600080fd5b506105c2611220565b3480156107ab57600080fd5b50610584611258565b3480156107c057600080fd5b506105c2600480360360208110156107d757600080fd5b503561125d565b3480156107ea57600080fd5b506104256004803603602081101561080157600080fd5b810190602081018135600160201b81111561081b57600080fd5b82018360208201111561082d57600080fd5b803590602001918460018302840111600160201b8311171561084e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506112a4945050505050565b34801561089b57600080fd5b506105c2600480360360208110156108b257600080fd5b50356001600160a01b03166114c3565b3480156108ce57600080fd5b506105c2611515565b3480156108e357600080fd5b5061099f600480360360608110156108fa57600080fd5b6001600160a01b03823516916020810135151591810190606081016040820135600160201b81111561092b57600080fd5b82018360208201111561093d57600080fd5b803590602001918460018302840111600160201b8311171561095e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061151b945050505050565b005b3480156109ad57600080fd5b506107106116be565b3480156109c257600080fd5b506107106116cd565b3480156109d757600080fd5b506105c2600480360360208110156109ee57600080fd5b50356116dc565b348015610a0157600080fd5b506105c2611723565b348015610a1657600080fd5b50610710611729565b348015610a2b57600080fd5b506105c260048036036020811015610a4257600080fd5b50356001600160a01b0316611738565b348015610a5e57600080fd5b506105c261178a565b348015610a7357600080fd5b506105c260048036036020811015610a8a57600080fd5b50356117c2565b348015610a9d57600080fd5b506105c2611809565b348015610ab257600080fd5b5061042561180f565b348015610ac757600080fd5b506105c260048036036020811015610ade57600080fd5b50356001600160a01b0316611867565b348015610afa57600080fd5b506105c260048036036020811015610b1157600080fd5b50356118b9565b348015610b2457600080fd5b506105c2611900565b348015610b3957600080fd5b5061058460048036036040811015610b5057600080fd5b506001600160a01b038135169060200135611938565b348015610b7257600080fd5b506105c261198e565b348015610b8757600080fd5b506105c2611994565b348015610b9c57600080fd5b506105c261199a565b348015610bb157600080fd5b506105c260048036036060811015610bc857600080fd5b506001600160a01b038135811691602081013590911690604001356119d2565b348015610bf457600080fd5b50610710611a30565b348015610c0957600080fd5b506105c260048036036020811015610c2057600080fd5b50356001600160a01b0316611a3f565b348015610c3c57600080fd5b506105c2611a91565b348015610c5157600080fd5b50610c7860048036036020811015610c6857600080fd5b50356001600160a01b0316611ac9565b604080519485526020850193909352838301919091526060830152519081900360800190f35b348015610caa57600080fd5b506105c260048036036020811015610cc157600080fd5b5035611b5b565b348015610cd457600080fd5b506105c2611ba2565b348015610ce957600080fd5b506105c260048036036020811015610d0057600080fd5b5035611ba8565b348015610d1357600080fd5b506105c260048036036040811015610d2a57600080fd5b506001600160a01b0381358116916020013516611bef565b348015610d4e57600080fd5b50610710611c49565b348015610d6357600080fd5b506105c2611c58565b348015610d7857600080fd5b506105c260048036036020811015610d8f57600080fd5b50356001600160a01b0316611c90565b348015610dab57600080fd5b50610710611ce2565b348015610dc057600080fd5b506105c260048036036060811015610dd757600080fd5b506001600160a01b03813581169160208101359160409091013516611cf1565b348015610e0357600080fd5b50610710611d52565b348015610e1857600080fd5b506105c2611d66565b348015610e2d57600080fd5b506105c260048036036020811015610e4457600080fd5b5035611d9e565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610ed05780601f10610ea557610100808354040283529160200191610ed0565b820191906000526020600020905b815481529060010190602001808311610eb357829003601f168201915b505050505081565b601254606090610ef1906001600160a01b031683611de5565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052600090606090610f4d90610ed8565b9050808060200190516020811015610f6457600080fd5b5051949350505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663073a938160e11b179052600090606090610fb590610ed8565b9050808060200190516020811015610fcc57600080fd5b50519392505050565b60085481565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166305eff7ef60e21b179052600090606090610fb590610ed8565b600d5481565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b17905260009060609061106b906112a4565b905080806020019051602081101561108257600080fd5b505191505090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03166323323e0360e01b179052600090606090610f4d90610ed8565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905260009060609061113e90610ed8565b905080806020019051602081101561115557600080fd5b505195945050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03166304c11f0360e31b179052600090606090610f4d90610ed8565b6004546001600160a01b031681565b60035460ff1681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316633af9e66960e01b179052600090606090610fb590610ed8565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b17905260009060609061106b906112a4565b600181565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b03166303e9410160e41b179052600090606090610fb590610ed8565b606060006060306001600160a01b0316846040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156112f55781810151838201526020016112dd565b50505050905090810190601f1680156113225780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b178152905182519295509350839250908083835b6020831061137d5780518252601f19909201916020918201910161135e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146113dd576040519150601f19603f3d011682016040523d82523d6000602084013e6113e2565b606091505b509150915060008214156113f7573d60208201fd5b80806020019051602081101561140c57600080fd5b8101908080516040519392919084600160201b82111561142b57600080fd5b90830190602082018581111561144057600080fd5b8251600160201b81118282018810171561145957600080fd5b82525081516020918201929091019080838360005b8381101561148657818101518382015260200161146e565b50505050905090810190601f1680156114b35780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316634576b5db60e01b179052600090606090610fb590610ed8565b600b5481565b60035461010090046001600160a01b031633146115695760405162461bcd60e51b8152600401808060200182810382526039815260200180611ea86039913960400191505060405180910390fd5b81156115a3576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b1790526115a190610ed8565b505b601280546001600160a01b038581166001600160a01b0319831617909255604051602060248201818152855160448401528551949093169361166f938693909283926064909201919085019080838360005b8381101561160d5781810151838201526020016115f5565b50505050905090810190601f16801561163a5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b1790529250610ed8915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b6012546001600160a01b031681565b6005546001600160a01b031681565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663601a0bf160e01b179052600090606090610fb590610ed8565b60095481565b6011546001600160a01b031681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166370a0823160e01b179052600090606090610fb5906112a4565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b17905260009060609061106b90610ed8565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663852a12e360e01b179052600090606090610fb590610ed8565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610ed05780601f10610ea557610100808354040283529160200191610ed0565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166395dd919360e01b179052600090606090610fb5906112a4565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663140e25ad60e31b179052600090606090610fb590610ed8565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b17905260009060609061106b90610ed8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052600090606090610f4d90610ed8565b600a5481565b60145481565b6040805160048152602481019091526020810180516001600160e01b0316630ae9d70b60e41b17905260009060609061106b906112a4565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b031663b2a02ff160e01b17905260009060609061113e90610ed8565b6016546001600160a01b031681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316632dc7468360e21b179052600090606090610fb590610ed8565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b17905260009060609061106b90610ed8565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166361bfb47160e11b179052600090819081908190606090611b21906112a4565b9050808060200190516080811015611b3857600080fd5b508051602082015160408301516060909301519199909850919650945092505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663317afabb60e21b179052600090606090610fb590610ed8565b60135481565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663db006a7560e01b179052600090606090610fb590610ed8565b604080516001600160a01b03808516602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316636eb1769f60e11b179052600090606090610f4d906112a4565b6015546001600160a01b031681565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b17905260009060609061106b90610ed8565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031663f2b3abbd60e01b179052600090606090610fb590610ed8565b6006546001600160a01b031681565b604080516001600160a01b0380861660248301526044820185905283166064808301919091528251808303909101815260849091019091526020810180516001600160e01b0316637af1e23160e11b17905260009060609061113e90610ed8565b60035461010090046001600160a01b031681565b6040805160048152602481019091526020810180516001600160e01b0316631f1f3b4560e31b17905260009060609061106b906112a4565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663fca7820b60e01b179052600090606090610fb590610ed8565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310611e255780518252601f199092019160209182019101611e06565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611e85576040519150601f19603f3d011682016040523d82523d6000602084013e611e8a565b606091505b50915091506000821415611e9f573d60208201fd5b94935050505056fe56426570323044656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696e56426570323044656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636ba265627a7a72315820cf4d8382732299e3b736c2441acc517d487d82b99b7755342736502c1bfc44d664736f6c63430005100032",
1748
+ "devdoc": {
1749
+ "author": "Venus",
1750
+ "methods": {
1751
+ "_acceptAdmin()": {
1752
+ "details": "Admin function for pending admin to accept role and update admin",
1753
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1754
+ },
1755
+ "_addReserves(uint256)": {
1756
+ "params": {
1757
+ "addAmount": "Amount of reserves to add"
1758
+ },
1759
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1760
+ },
1761
+ "_reduceReserves(uint256)": {
1762
+ "params": {
1763
+ "reduceAmount": "Amount of reduction to reserves"
1764
+ },
1765
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1766
+ },
1767
+ "_setComptroller(address)": {
1768
+ "details": "Admin function to set a new comptroller",
1769
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1770
+ },
1771
+ "_setImplementation(address,bool,bytes)": {
1772
+ "params": {
1773
+ "allowResign": "Flag to indicate whether to call _resignImplementation on the old implementation",
1774
+ "becomeImplementationData": "The encoded bytes data to be passed to _becomeImplementation",
1775
+ "implementation_": "The address of the new implementation for delegation"
1776
+ }
1777
+ },
1778
+ "_setInterestRateModel(address)": {
1779
+ "details": "Admin function to accrue interest and update the interest rate model",
1780
+ "params": {
1781
+ "newInterestRateModel": "The new interest rate model to use"
1782
+ },
1783
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1784
+ },
1785
+ "_setPendingAdmin(address)": {
1786
+ "details": "Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.",
1787
+ "params": {
1788
+ "newPendingAdmin": "New pending admin."
1789
+ },
1790
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1791
+ },
1792
+ "_setReserveFactor(uint256)": {
1793
+ "details": "Admin function to accrue interest and set a new reserve factor",
1794
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1795
+ },
1796
+ "accrueInterest()": {
1797
+ "details": "This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage."
1798
+ },
1799
+ "allowance(address,address)": {
1800
+ "params": {
1801
+ "owner": "The address of the account which owns the tokens to be spent",
1802
+ "spender": "The address of the account which may transfer tokens"
1803
+ },
1804
+ "return": "The number of tokens allowed to be spent (-1 means infinite)"
1805
+ },
1806
+ "approve(address,uint256)": {
1807
+ "details": "This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)",
1808
+ "params": {
1809
+ "amount": "The number of tokens that are approved (-1 means infinite)",
1810
+ "spender": "The address of the account which may transfer tokens"
1811
+ },
1812
+ "return": "Whether or not the approval succeeded"
1813
+ },
1814
+ "balanceOf(address)": {
1815
+ "params": {
1816
+ "owner": "The address of the account to query"
1817
+ },
1818
+ "return": "The number of tokens owned by `owner`"
1819
+ },
1820
+ "balanceOfUnderlying(address)": {
1821
+ "details": "This also accrues interest in a transaction",
1822
+ "params": {
1823
+ "owner": "The address of the account to query"
1824
+ },
1825
+ "return": "The amount of underlying owned by `owner`"
1826
+ },
1827
+ "borrow(uint256)": {
1828
+ "params": {
1829
+ "borrowAmount": "The amount of the underlying asset to borrow"
1830
+ },
1831
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1832
+ },
1833
+ "borrowBalanceCurrent(address)": {
1834
+ "params": {
1835
+ "account": "The address whose balance should be calculated after updating borrowIndex"
1836
+ },
1837
+ "return": "The calculated balance"
1838
+ },
1839
+ "borrowBalanceStored(address)": {
1840
+ "params": {
1841
+ "account": "The address whose balance should be calculated"
1842
+ },
1843
+ "return": "The calculated balance"
1844
+ },
1845
+ "borrowRatePerBlock()": {
1846
+ "return": "The borrow interest rate per block, scaled by 1e18"
1847
+ },
1848
+ "constructor": {
1849
+ "params": {
1850
+ "admin_": "Address of the administrator of this token",
1851
+ "becomeImplementationData": "The encoded args for becomeImplementation",
1852
+ "comptroller_": "The address of the comptroller",
1853
+ "decimals_": "BEP-20 decimal precision of this token",
1854
+ "implementation_": "The address of the implementation the contract delegates to",
1855
+ "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18",
1856
+ "interestRateModel_": "The address of the interest rate model",
1857
+ "name_": "BEP-20 name of this token",
1858
+ "symbol_": "BEP-20 symbol of this token",
1859
+ "underlying_": "The address of the underlying asset"
1860
+ }
1861
+ },
1862
+ "delegateToImplementation(bytes)": {
1863
+ "details": "It returns to the external caller whatever the implementation returns or forwards reverts",
1864
+ "params": {
1865
+ "data": "The raw data to delegatecall"
1866
+ },
1867
+ "return": "The returned bytes from the delegatecall"
1868
+ },
1869
+ "delegateToViewImplementation(bytes)": {
1870
+ "details": "It returns to the external caller whatever the implementation returns or forwards reverts There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.",
1871
+ "params": {
1872
+ "data": "The raw data to delegatecall"
1873
+ },
1874
+ "return": "The returned bytes from the delegatecall"
1875
+ },
1876
+ "exchangeRateCurrent()": {
1877
+ "return": "Calculated exchange rate scaled by 1e18"
1878
+ },
1879
+ "exchangeRateStored()": {
1880
+ "details": "This function does not accrue interest before calculating the exchange rate",
1881
+ "return": "Calculated exchange rate scaled by 1e18"
1882
+ },
1883
+ "getAccountSnapshot(address)": {
1884
+ "details": "This is used by comptroller to more efficiently perform liquidity checks.",
1885
+ "params": {
1886
+ "account": "Address of the account to snapshot"
1887
+ },
1888
+ "return": "(possible error, token balance, borrow balance, exchange rate mantissa)"
1889
+ },
1890
+ "getCash()": {
1891
+ "return": "The quantity of underlying asset owned by this contract"
1892
+ },
1893
+ "liquidateBorrow(address,uint256,address)": {
1894
+ "params": {
1895
+ "borrower": "The borrower of this vToken to be liquidated",
1896
+ "repayAmount": "The amount of the underlying borrowed asset to repay",
1897
+ "vTokenCollateral": "The market in which to seize collateral from the borrower"
1898
+ },
1899
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1900
+ },
1901
+ "mint(uint256)": {
1902
+ "details": "Accrues interest whether or not the operation succeeds, unless reverted",
1903
+ "params": {
1904
+ "mintAmount": "The amount of the underlying asset to supply"
1905
+ },
1906
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1907
+ },
1908
+ "mintBehalf(address,uint256)": {
1909
+ "details": "Accrues interest whether or not the operation succeeds, unless reverted",
1910
+ "params": {
1911
+ "mintAmount": "The amount of the underlying asset to supply"
1912
+ },
1913
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1914
+ },
1915
+ "redeem(uint256)": {
1916
+ "details": "Accrues interest whether or not the operation succeeds, unless reverted",
1917
+ "params": {
1918
+ "redeemTokens": "The number of vTokens to redeem into underlying asset"
1919
+ },
1920
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1921
+ },
1922
+ "redeemUnderlying(uint256)": {
1923
+ "details": "Accrues interest whether or not the operation succeeds, unless reverted",
1924
+ "params": {
1925
+ "redeemAmount": "The amount of underlying to redeem"
1926
+ },
1927
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1928
+ },
1929
+ "repayBorrow(uint256)": {
1930
+ "params": {
1931
+ "repayAmount": "The amount to repay"
1932
+ },
1933
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1934
+ },
1935
+ "repayBorrowBehalf(address,uint256)": {
1936
+ "params": {
1937
+ "borrower": "The account with the debt being payed off",
1938
+ "repayAmount": "The amount to repay"
1939
+ },
1940
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1941
+ },
1942
+ "seize(address,address,uint256)": {
1943
+ "details": "Will fail unless called by another vToken during the process of liquidation. It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.",
1944
+ "params": {
1945
+ "borrower": "The account having collateral seized",
1946
+ "liquidator": "The account receiving seized collateral",
1947
+ "seizeTokens": "The number of vTokens to seize"
1948
+ },
1949
+ "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1950
+ },
1951
+ "supplyRatePerBlock()": {
1952
+ "return": "The supply interest rate per block, scaled by 1e18"
1953
+ },
1954
+ "totalBorrowsCurrent()": {
1955
+ "return": "The total borrows with interest"
1956
+ },
1957
+ "transfer(address,uint256)": {
1958
+ "params": {
1959
+ "amount": "The number of tokens to transfer",
1960
+ "dst": "The address of the destination account"
1961
+ },
1962
+ "return": "Whether or not the transfer succeeded"
1963
+ },
1964
+ "transferFrom(address,address,uint256)": {
1965
+ "params": {
1966
+ "amount": "The number of tokens to transfer",
1967
+ "dst": "The address of the destination account",
1968
+ "src": "The address of the source account"
1969
+ },
1970
+ "return": "Whether or not the transfer succeeded"
1971
+ }
1972
+ },
1973
+ "title": "Venus's VBep20Delegator Contract"
1974
+ },
1975
+ "userdoc": {
1976
+ "methods": {
1977
+ "_acceptAdmin()": {
1978
+ "notice": "Accepts transfer of admin rights. `msg.sender` must be pendingAdmin"
1979
+ },
1980
+ "_addReserves(uint256)": {
1981
+ "notice": "Accrues interest and adds reserves by transferring from admin"
1982
+ },
1983
+ "_reduceReserves(uint256)": {
1984
+ "notice": "Accrues interest and reduces reserves by transferring to admin"
1985
+ },
1986
+ "_setComptroller(address)": {
1987
+ "notice": "Sets a new comptroller for the market"
1988
+ },
1989
+ "_setImplementation(address,bool,bytes)": {
1990
+ "notice": "Called by the admin to update the implementation of the delegator"
1991
+ },
1992
+ "_setInterestRateModel(address)": {
1993
+ "notice": "Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`"
1994
+ },
1995
+ "_setPendingAdmin(address)": {
1996
+ "notice": "Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer."
1997
+ },
1998
+ "_setReserveFactor(uint256)": {
1999
+ "notice": "Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh"
2000
+ },
2001
+ "accrueInterest()": {
2002
+ "notice": "Applies accrued interest to total borrows and reserves."
2003
+ },
2004
+ "allowance(address,address)": {
2005
+ "notice": "Get the current allowance from `owner` for `spender`"
2006
+ },
2007
+ "approve(address,uint256)": {
2008
+ "notice": "Approve `spender` to transfer up to `amount` from `src`"
2009
+ },
2010
+ "balanceOf(address)": {
2011
+ "notice": "Get the token balance of the `owner`"
2012
+ },
2013
+ "balanceOfUnderlying(address)": {
2014
+ "notice": "Get the underlying balance of the `owner`"
2015
+ },
2016
+ "borrow(uint256)": {
2017
+ "notice": "Sender borrows assets from the protocol to their own address"
2018
+ },
2019
+ "borrowBalanceCurrent(address)": {
2020
+ "notice": "Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex"
2021
+ },
2022
+ "borrowBalanceStored(address)": {
2023
+ "notice": "Return the borrow balance of account based on stored data"
2024
+ },
2025
+ "borrowRatePerBlock()": {
2026
+ "notice": "Returns the current per-block borrow interest rate for this vToken"
2027
+ },
2028
+ "constructor": "Construct a new money market",
2029
+ "delegateToImplementation(bytes)": {
2030
+ "notice": "Delegates execution to the implementation contract"
2031
+ },
2032
+ "delegateToViewImplementation(bytes)": {
2033
+ "notice": "Delegates execution to an implementation contract"
2034
+ },
2035
+ "exchangeRateCurrent()": {
2036
+ "notice": "Accrue interest then return the up-to-date exchange rate"
2037
+ },
2038
+ "exchangeRateStored()": {
2039
+ "notice": "Calculates the exchange rate from the underlying to the VToken"
2040
+ },
2041
+ "getAccountSnapshot(address)": {
2042
+ "notice": "Get a snapshot of the account's balances and the cached exchange rate"
2043
+ },
2044
+ "getCash()": {
2045
+ "notice": "Get cash balance of this vToken in the underlying asset"
2046
+ },
2047
+ "liquidateBorrow(address,uint256,address)": {
2048
+ "notice": "The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator."
2049
+ },
2050
+ "mint(uint256)": {
2051
+ "notice": "Sender supplies assets into the market and receives vTokens in exchange"
2052
+ },
2053
+ "mintBehalf(address,uint256)": {
2054
+ "notice": "Sender supplies assets into the market and receiver receives vTokens in exchange"
2055
+ },
2056
+ "redeem(uint256)": {
2057
+ "notice": "Sender redeems vTokens in exchange for the underlying asset"
2058
+ },
2059
+ "redeemUnderlying(uint256)": {
2060
+ "notice": "Sender redeems vTokens in exchange for a specified amount of underlying asset"
2061
+ },
2062
+ "repayBorrow(uint256)": {
2063
+ "notice": "Sender repays their own borrow"
2064
+ },
2065
+ "repayBorrowBehalf(address,uint256)": {
2066
+ "notice": "Sender repays a borrow belonging to another borrower"
2067
+ },
2068
+ "seize(address,address,uint256)": {
2069
+ "notice": "Transfers collateral tokens (this market) to the liquidator."
2070
+ },
2071
+ "supplyRatePerBlock()": {
2072
+ "notice": "Returns the current per-block supply interest rate for this vToken"
2073
+ },
2074
+ "totalBorrowsCurrent()": {
2075
+ "notice": "Returns the current total borrows plus accrued interest"
2076
+ },
2077
+ "transfer(address,uint256)": {
2078
+ "notice": "Transfer `amount` tokens from `msg.sender` to `dst`"
2079
+ },
2080
+ "transferFrom(address,address,uint256)": {
2081
+ "notice": "Transfer `amount` tokens from `src` to `dst`"
2082
+ }
2083
+ },
2084
+ "notice": "vTokens which wrap an EIP-20 underlying and delegate to an implementation"
2085
+ },
2086
+ "storageLayout": {
2087
+ "storage": [
2088
+ {
2089
+ "astId": 23976,
2090
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2091
+ "label": "_notEntered",
2092
+ "offset": 0,
2093
+ "slot": "0",
2094
+ "type": "t_bool"
2095
+ },
2096
+ {
2097
+ "astId": 23978,
2098
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2099
+ "label": "name",
2100
+ "offset": 0,
2101
+ "slot": "1",
2102
+ "type": "t_string_storage"
2103
+ },
2104
+ {
2105
+ "astId": 23980,
2106
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2107
+ "label": "symbol",
2108
+ "offset": 0,
2109
+ "slot": "2",
2110
+ "type": "t_string_storage"
2111
+ },
2112
+ {
2113
+ "astId": 23982,
2114
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2115
+ "label": "decimals",
2116
+ "offset": 0,
2117
+ "slot": "3",
2118
+ "type": "t_uint8"
2119
+ },
2120
+ {
2121
+ "astId": 23990,
2122
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2123
+ "label": "admin",
2124
+ "offset": 1,
2125
+ "slot": "3",
2126
+ "type": "t_address_payable"
2127
+ },
2128
+ {
2129
+ "astId": 23992,
2130
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2131
+ "label": "pendingAdmin",
2132
+ "offset": 0,
2133
+ "slot": "4",
2134
+ "type": "t_address_payable"
2135
+ },
2136
+ {
2137
+ "astId": 23994,
2138
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2139
+ "label": "comptroller",
2140
+ "offset": 0,
2141
+ "slot": "5",
2142
+ "type": "t_contract(ComptrollerInterface)2454"
2143
+ },
2144
+ {
2145
+ "astId": 23996,
2146
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2147
+ "label": "interestRateModel",
2148
+ "offset": 0,
2149
+ "slot": "6",
2150
+ "type": "t_contract(InterestRateModel)9772"
2151
+ },
2152
+ {
2153
+ "astId": 23998,
2154
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2155
+ "label": "initialExchangeRateMantissa",
2156
+ "offset": 0,
2157
+ "slot": "7",
2158
+ "type": "t_uint256"
2159
+ },
2160
+ {
2161
+ "astId": 24000,
2162
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2163
+ "label": "reserveFactorMantissa",
2164
+ "offset": 0,
2165
+ "slot": "8",
2166
+ "type": "t_uint256"
2167
+ },
2168
+ {
2169
+ "astId": 24002,
2170
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2171
+ "label": "accrualBlockNumber",
2172
+ "offset": 0,
2173
+ "slot": "9",
2174
+ "type": "t_uint256"
2175
+ },
2176
+ {
2177
+ "astId": 24004,
2178
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2179
+ "label": "borrowIndex",
2180
+ "offset": 0,
2181
+ "slot": "10",
2182
+ "type": "t_uint256"
2183
+ },
2184
+ {
2185
+ "astId": 24006,
2186
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2187
+ "label": "totalBorrows",
2188
+ "offset": 0,
2189
+ "slot": "11",
2190
+ "type": "t_uint256"
2191
+ },
2192
+ {
2193
+ "astId": 24008,
2194
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2195
+ "label": "totalReserves",
2196
+ "offset": 0,
2197
+ "slot": "12",
2198
+ "type": "t_uint256"
2199
+ },
2200
+ {
2201
+ "astId": 24010,
2202
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2203
+ "label": "totalSupply",
2204
+ "offset": 0,
2205
+ "slot": "13",
2206
+ "type": "t_uint256"
2207
+ },
2208
+ {
2209
+ "astId": 24014,
2210
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2211
+ "label": "accountTokens",
2212
+ "offset": 0,
2213
+ "slot": "14",
2214
+ "type": "t_mapping(t_address,t_uint256)"
2215
+ },
2216
+ {
2217
+ "astId": 24020,
2218
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2219
+ "label": "transferAllowances",
2220
+ "offset": 0,
2221
+ "slot": "15",
2222
+ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
2223
+ },
2224
+ {
2225
+ "astId": 24024,
2226
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2227
+ "label": "accountBorrows",
2228
+ "offset": 0,
2229
+ "slot": "16",
2230
+ "type": "t_mapping(t_address,t_struct(BorrowSnapshot)23974_storage)"
2231
+ },
2232
+ {
2233
+ "astId": 24026,
2234
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2235
+ "label": "underlying",
2236
+ "offset": 0,
2237
+ "slot": "17",
2238
+ "type": "t_address"
2239
+ },
2240
+ {
2241
+ "astId": 24028,
2242
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2243
+ "label": "implementation",
2244
+ "offset": 0,
2245
+ "slot": "18",
2246
+ "type": "t_address"
2247
+ },
2248
+ {
2249
+ "astId": 24030,
2250
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2251
+ "label": "reduceReservesBlockDelta",
2252
+ "offset": 0,
2253
+ "slot": "19",
2254
+ "type": "t_uint256"
2255
+ },
2256
+ {
2257
+ "astId": 24032,
2258
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2259
+ "label": "reduceReservesBlockNumber",
2260
+ "offset": 0,
2261
+ "slot": "20",
2262
+ "type": "t_uint256"
2263
+ },
2264
+ {
2265
+ "astId": 24034,
2266
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2267
+ "label": "protocolShareReserve",
2268
+ "offset": 0,
2269
+ "slot": "21",
2270
+ "type": "t_address_payable"
2271
+ },
2272
+ {
2273
+ "astId": 24036,
2274
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2275
+ "label": "accessControlManager",
2276
+ "offset": 0,
2277
+ "slot": "22",
2278
+ "type": "t_address"
2279
+ },
2280
+ {
2281
+ "astId": 24043,
2282
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2283
+ "label": "__gap",
2284
+ "offset": 0,
2285
+ "slot": "23",
2286
+ "type": "t_array(t_uint256)50_storage"
2287
+ }
2288
+ ],
2289
+ "types": {
2290
+ "t_address": {
2291
+ "encoding": "inplace",
2292
+ "label": "address",
2293
+ "numberOfBytes": "20"
2294
+ },
2295
+ "t_address_payable": {
2296
+ "encoding": "inplace",
2297
+ "label": "address payable",
2298
+ "numberOfBytes": "20"
2299
+ },
2300
+ "t_array(t_uint256)50_storage": {
2301
+ "base": "t_uint256",
2302
+ "encoding": "inplace",
2303
+ "label": "uint256[50]",
2304
+ "numberOfBytes": "1600"
2305
+ },
2306
+ "t_bool": {
2307
+ "encoding": "inplace",
2308
+ "label": "bool",
2309
+ "numberOfBytes": "1"
2310
+ },
2311
+ "t_contract(ComptrollerInterface)2454": {
2312
+ "encoding": "inplace",
2313
+ "label": "contract ComptrollerInterface",
2314
+ "numberOfBytes": "20"
2315
+ },
2316
+ "t_contract(InterestRateModel)9772": {
2317
+ "encoding": "inplace",
2318
+ "label": "contract InterestRateModel",
2319
+ "numberOfBytes": "20"
2320
+ },
2321
+ "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
2322
+ "encoding": "mapping",
2323
+ "key": "t_address",
2324
+ "label": "mapping(address => mapping(address => uint256))",
2325
+ "numberOfBytes": "32",
2326
+ "value": "t_mapping(t_address,t_uint256)"
2327
+ },
2328
+ "t_mapping(t_address,t_struct(BorrowSnapshot)23974_storage)": {
2329
+ "encoding": "mapping",
2330
+ "key": "t_address",
2331
+ "label": "mapping(address => struct VTokenStorageBase.BorrowSnapshot)",
2332
+ "numberOfBytes": "32",
2333
+ "value": "t_struct(BorrowSnapshot)23974_storage"
2334
+ },
2335
+ "t_mapping(t_address,t_uint256)": {
2336
+ "encoding": "mapping",
2337
+ "key": "t_address",
2338
+ "label": "mapping(address => uint256)",
2339
+ "numberOfBytes": "32",
2340
+ "value": "t_uint256"
2341
+ },
2342
+ "t_string_storage": {
2343
+ "encoding": "bytes",
2344
+ "label": "string",
2345
+ "numberOfBytes": "32"
2346
+ },
2347
+ "t_struct(BorrowSnapshot)23974_storage": {
2348
+ "encoding": "inplace",
2349
+ "label": "struct VTokenStorageBase.BorrowSnapshot",
2350
+ "members": [
2351
+ {
2352
+ "astId": 23971,
2353
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2354
+ "label": "principal",
2355
+ "offset": 0,
2356
+ "slot": "0",
2357
+ "type": "t_uint256"
2358
+ },
2359
+ {
2360
+ "astId": 23973,
2361
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2362
+ "label": "interestIndex",
2363
+ "offset": 0,
2364
+ "slot": "1",
2365
+ "type": "t_uint256"
2366
+ }
2367
+ ],
2368
+ "numberOfBytes": "64"
2369
+ },
2370
+ "t_uint256": {
2371
+ "encoding": "inplace",
2372
+ "label": "uint256",
2373
+ "numberOfBytes": "32"
2374
+ },
2375
+ "t_uint8": {
2376
+ "encoding": "inplace",
2377
+ "label": "uint8",
2378
+ "numberOfBytes": "1"
2379
+ }
2380
+ }
2381
+ }
2382
+ }