@venusprotocol/venus-protocol 10.1.0-slim-dev.6 → 10.1.0-slim-dev.7

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.
Files changed (116) hide show
  1. package/artifacts/contracts/Admin/VBNBAdmin.sol/VBNBAdmin.json +2 -2
  2. package/artifacts/contracts/Admin/VBNBAdminStorage.sol/VBNBAdminStorage.json +2 -2
  3. package/artifacts/contracts/Comptroller/ComptrollerInterface.sol/ComptrollerInterface.json +65 -0
  4. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV10Storage.json +2 -2
  5. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV11Storage.json +2 -2
  6. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV12Storage.json +2 -2
  7. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV13Storage.json +2 -2
  8. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV14Storage.json +2 -2
  9. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV15Storage.json +2 -2
  10. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV16Storage.json +2 -2
  11. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV17Storage.json +2 -2
  12. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV18Storage.json +736 -0
  13. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV1Storage.json +2 -2
  14. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV2Storage.json +2 -2
  15. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV3Storage.json +2 -2
  16. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV4Storage.json +2 -2
  17. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV5Storage.json +2 -2
  18. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV6Storage.json +2 -2
  19. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV7Storage.json +2 -2
  20. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV8Storage.json +2 -2
  21. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/ComptrollerV9Storage.json +2 -2
  22. package/artifacts/contracts/Comptroller/ComptrollerStorage.sol/UnitrollerAdminStorage.json +2 -2
  23. package/artifacts/contracts/Comptroller/Diamond/Diamond.sol/Diamond.json +34 -2
  24. package/artifacts/contracts/Comptroller/Diamond/DiamondConsolidated.sol/DiamondConsolidated.json +310 -2
  25. package/artifacts/contracts/Comptroller/Diamond/facets/FacetBase.sol/FacetBase.json +128 -2
  26. package/artifacts/contracts/Comptroller/Diamond/facets/FlashLoanFacet.sol/FlashLoanFacet.json +1208 -0
  27. package/artifacts/contracts/Comptroller/Diamond/facets/MarketFacet.sol/MarketFacet.json +128 -2
  28. package/artifacts/contracts/Comptroller/Diamond/facets/PolicyFacet.sol/PolicyFacet.json +128 -2
  29. package/artifacts/contracts/Comptroller/Diamond/facets/RewardFacet.sol/RewardFacet.json +128 -2
  30. package/artifacts/contracts/Comptroller/Diamond/facets/SetterFacet.sol/SetterFacet.json +197 -2
  31. package/artifacts/contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol/XVSRewardsHelper.json +128 -2
  32. package/artifacts/contracts/Comptroller/Diamond/interfaces/IFlashLoanFacet.sol/IFlashLoanFacet.json +44 -0
  33. package/artifacts/contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol/ISetterFacet.json +31 -0
  34. package/artifacts/contracts/Comptroller/Unitroller.sol/Unitroller.json +96 -2
  35. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV10StorageR1.json +2 -2
  36. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV11StorageR1.json +2 -2
  37. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV12StorageR1.json +2 -2
  38. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV13StorageR1.json +2 -2
  39. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV14StorageR1.json +2 -2
  40. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV15StorageR1.json +2 -2
  41. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV16StorageR1.json +2 -2
  42. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV1StorageR1.json +2 -2
  43. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV2StorageR1.json +2 -2
  44. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV3StorageR1.json +2 -2
  45. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV4StorageR1.json +2 -2
  46. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV5StorageR1.json +2 -2
  47. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV6StorageR1.json +2 -2
  48. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV7StorageR1.json +2 -2
  49. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV8StorageR1.json +2 -2
  50. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/ComptrollerV9StorageR1.json +2 -2
  51. package/artifacts/contracts/Comptroller/legacy/ComptrollerStorageR1.sol/UnitrollerAdminStorageR1.json +2 -2
  52. package/artifacts/contracts/Comptroller/legacy/Diamond/DiamondConsolidatedR1.sol/DiamondConsolidatedR1.json +96 -2
  53. package/artifacts/contracts/Comptroller/legacy/Diamond/DiamondR1.sol/DiamondR1.json +2 -2
  54. package/artifacts/contracts/Comptroller/legacy/Diamond/facets/FacetBaseR1.sol/FacetBaseR1.json +96 -2
  55. package/artifacts/contracts/Comptroller/legacy/Diamond/facets/MarketFacetR1.sol/MarketFacetR1.json +96 -2
  56. package/artifacts/contracts/Comptroller/legacy/Diamond/facets/PolicyFacetR1.sol/PolicyFacetR1.json +96 -2
  57. package/artifacts/contracts/Comptroller/legacy/Diamond/facets/RewardFacetR1.sol/RewardFacetR1.json +96 -2
  58. package/artifacts/contracts/Comptroller/legacy/Diamond/facets/SetterFacetR1.sol/SetterFacetR1.json +96 -2
  59. package/artifacts/contracts/Comptroller/legacy/Diamond/facets/XVSRewardsHelperR1.sol/XVSRewardsHelperR1.json +96 -2
  60. package/artifacts/contracts/FlashLoan/interfaces/IFlashLoanReceiver.sol/IFlashLoanReceiver.json +60 -0
  61. package/artifacts/contracts/Lens/ComptrollerLens.sol/ComptrollerLens.json +96 -2
  62. package/artifacts/contracts/Lens/SnapshotLens.sol/SnapshotLens.json +2 -2
  63. package/artifacts/contracts/Lens/VenusLens.sol/VenusLens.json +2 -2
  64. package/artifacts/contracts/Liquidator/Liquidator.sol/Liquidator.json +2 -2
  65. package/artifacts/contracts/Tokens/VAI/VAIController.sol/VAIController.json +2 -2
  66. package/artifacts/contracts/Tokens/VAI/VAIControllerStorage.sol/VAIControllerStorageG1.json +2 -2
  67. package/artifacts/contracts/Tokens/VAI/VAIControllerStorage.sol/VAIControllerStorageG2.json +2 -2
  68. package/artifacts/contracts/Tokens/VAI/VAIControllerStorage.sol/VAIControllerStorageG3.json +2 -2
  69. package/artifacts/contracts/Tokens/VAI/VAIControllerStorage.sol/VAIControllerStorageG4.json +2 -2
  70. package/artifacts/contracts/Tokens/VAI/VAIControllerStorage.sol/VAIUnitrollerAdminStorage.json +2 -2
  71. package/artifacts/contracts/Tokens/VAI/VAIUnitroller.sol/VAIUnitroller.json +2 -2
  72. package/artifacts/contracts/Tokens/VTokens/VBNB.sol/VBNB.json +372 -2
  73. package/artifacts/contracts/Tokens/VTokens/VBep20.sol/VBep20.json +372 -2
  74. package/artifacts/contracts/Tokens/VTokens/VBep20Delegate.sol/VBep20Delegate.json +372 -2
  75. package/artifacts/contracts/Tokens/VTokens/VBep20Delegator.sol/VBep20Delegator.json +229 -2
  76. package/artifacts/contracts/Tokens/VTokens/VBep20Immutable.sol/VBep20Immutable.json +372 -2
  77. package/artifacts/contracts/Tokens/VTokens/VToken.sol/VToken.json +370 -0
  78. package/artifacts/contracts/Tokens/VTokens/VTokenInterfaces.sol/VTokenInterface.json +227 -0
  79. package/artifacts/contracts/Tokens/VTokens/VTokenInterfaces.sol/VTokenStorage.json +54 -2
  80. package/artifacts/contracts/Tokens/VTokens/VTokenInterfaces.sol/VTokenStorageBase.json +2 -2
  81. package/artifacts/contracts/Tokens/test/IERC20NonStandard.sol/IERC20NonStandard.json +182 -0
  82. package/artifacts/contracts/Utils/ErrorReporter.sol/ComptrollerErrorReporter.json +96 -2
  83. package/artifacts/contracts/Utils/ErrorReporter.sol/TokenErrorReporter.json +2 -2
  84. package/artifacts/contracts/Utils/ErrorReporter.sol/VAIControllerErrorReporter.json +2 -2
  85. package/artifacts/contracts/Utils/ReentrancyGuardTransient.sol/ReentrancyGuardTransient.json +16 -0
  86. package/artifacts/contracts/Utils/TransientSlot.sol/TransientSlot.json +10 -0
  87. package/artifacts/contracts/test/BadFlashLoanReceiver.sol/BadFlashLoanReceiver.json +112 -0
  88. package/artifacts/contracts/test/BorrowDebtFlashLoanReceiver.sol/BorrowDebtFlashLoanReceiver.json +112 -0
  89. package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.json +310 -2
  90. package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.json +2 -2
  91. package/artifacts/contracts/test/ComptrollerMock.sol/ComptrollerMock.json +310 -2
  92. package/artifacts/contracts/test/ComptrollerMockR1.sol/ComptrollerMockR1.json +96 -2
  93. package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.json +310 -2
  94. package/artifacts/contracts/test/DiamondHarness.sol/DiamondHarness.json +34 -2
  95. package/artifacts/contracts/test/EvilXDelegator.sol/EvilXDelegator.json +253 -2
  96. package/artifacts/contracts/test/EvilXToken.sol/EvilXToken.json +372 -2
  97. package/artifacts/contracts/test/EvilXToken.sol/VBep20Scenario.json +372 -2
  98. package/artifacts/contracts/test/FlashLoanReceiverBase.sol/FlashLoanReceiverBase.json +73 -0
  99. package/artifacts/contracts/test/InsufficientRepaymentFlashLoanReceiver.sol/InsufficientRepaymentFlashLoanReceiver.json +112 -0
  100. package/artifacts/contracts/test/LiquidatorHarness.sol/LiquidatorHarness.json +2 -2
  101. package/artifacts/contracts/test/MockFlashLoanReceiver.sol/MockFlashLoanReceiver.json +112 -0
  102. package/artifacts/contracts/test/MockProtocolShareReserve.sol/MockProtocolShareReserve.json +2 -2
  103. package/artifacts/contracts/test/MockVBNB.sol/MockVBNB.json +372 -2
  104. package/artifacts/contracts/test/SimplePriceOracle.sol/SimplePriceOracle.json +2 -2
  105. package/artifacts/contracts/test/VAIControllerHarness.sol/VAIControllerHarness.json +2 -2
  106. package/artifacts/contracts/test/VBep20Harness.sol/VBep20DelegateHarness.json +372 -2
  107. package/artifacts/contracts/test/VBep20Harness.sol/VBep20DelegateScenario.json +372 -2
  108. package/artifacts/contracts/test/VBep20Harness.sol/VBep20DelegateScenarioExtra.json +372 -2
  109. package/artifacts/contracts/test/VBep20Harness.sol/VBep20DelegatorScenario.json +213 -42
  110. package/artifacts/contracts/test/VBep20Harness.sol/VBep20Harness.json +372 -2
  111. package/artifacts/contracts/test/VBep20Harness.sol/VBep20Scenario.json +372 -2
  112. package/artifacts/contracts/test/VBep20Harness.sol/VEvil.json +372 -2
  113. package/artifacts/contracts/test/VBep20MockDelegate.sol/VBep20MockDelegate.json +372 -2
  114. package/deployments/bscmainnet_addresses.json +8 -7
  115. package/deployments/bsctestnet_addresses.json +8 -7
  116. package/package.json +3 -2
@@ -3,6 +3,69 @@
3
3
  "contractName": "VToken",
4
4
  "sourceName": "contracts/Tokens/VTokens/VToken.sol",
5
5
  "abi": [
6
+ {
7
+ "inputs": [],
8
+ "name": "FlashLoanAlreadyActive",
9
+ "type": "error"
10
+ },
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "uint256",
15
+ "name": "fee",
16
+ "type": "uint256"
17
+ },
18
+ {
19
+ "internalType": "uint256",
20
+ "name": "maxFee",
21
+ "type": "uint256"
22
+ }
23
+ ],
24
+ "name": "FlashLoanFeeTooHigh",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "internalType": "uint256",
31
+ "name": "fee",
32
+ "type": "uint256"
33
+ },
34
+ {
35
+ "internalType": "uint256",
36
+ "name": "maxFee",
37
+ "type": "uint256"
38
+ }
39
+ ],
40
+ "name": "FlashLoanProtocolShareTooHigh",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [],
45
+ "name": "InsufficientCash",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [
50
+ {
51
+ "internalType": "uint256",
52
+ "name": "actualAmount",
53
+ "type": "uint256"
54
+ },
55
+ {
56
+ "internalType": "uint256",
57
+ "name": "requiredTotalFee",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "InsufficientRepayment",
62
+ "type": "error"
63
+ },
64
+ {
65
+ "inputs": [],
66
+ "name": "InvalidComptroller",
67
+ "type": "error"
68
+ },
6
69
  {
7
70
  "anonymous": false,
8
71
  "inputs": [
@@ -115,6 +178,56 @@
115
178
  "name": "Failure",
116
179
  "type": "event"
117
180
  },
181
+ {
182
+ "anonymous": false,
183
+ "inputs": [
184
+ {
185
+ "indexed": false,
186
+ "internalType": "uint256",
187
+ "name": "oldFlashLoanFeeMantissa",
188
+ "type": "uint256"
189
+ },
190
+ {
191
+ "indexed": false,
192
+ "internalType": "uint256",
193
+ "name": "newFlashLoanFeeMantissa",
194
+ "type": "uint256"
195
+ },
196
+ {
197
+ "indexed": false,
198
+ "internalType": "uint256",
199
+ "name": "oldFlashLoanProtocolShare",
200
+ "type": "uint256"
201
+ },
202
+ {
203
+ "indexed": false,
204
+ "internalType": "uint256",
205
+ "name": "newFlashLoanProtocolShare",
206
+ "type": "uint256"
207
+ }
208
+ ],
209
+ "name": "FlashLoanFeeUpdated",
210
+ "type": "event"
211
+ },
212
+ {
213
+ "anonymous": false,
214
+ "inputs": [
215
+ {
216
+ "indexed": false,
217
+ "internalType": "bool",
218
+ "name": "previousStatus",
219
+ "type": "bool"
220
+ },
221
+ {
222
+ "indexed": false,
223
+ "internalType": "bool",
224
+ "name": "newStatus",
225
+ "type": "bool"
226
+ }
227
+ ],
228
+ "name": "FlashLoanStatusChanged",
229
+ "type": "event"
230
+ },
118
231
  {
119
232
  "anonymous": false,
120
233
  "inputs": [
@@ -540,6 +653,68 @@
540
653
  "name": "Transfer",
541
654
  "type": "event"
542
655
  },
656
+ {
657
+ "anonymous": false,
658
+ "inputs": [
659
+ {
660
+ "indexed": true,
661
+ "internalType": "address",
662
+ "name": "asset",
663
+ "type": "address"
664
+ },
665
+ {
666
+ "indexed": true,
667
+ "internalType": "address",
668
+ "name": "sender",
669
+ "type": "address"
670
+ },
671
+ {
672
+ "indexed": false,
673
+ "internalType": "uint256",
674
+ "name": "amount",
675
+ "type": "uint256"
676
+ },
677
+ {
678
+ "indexed": false,
679
+ "internalType": "uint256",
680
+ "name": "totalFee",
681
+ "type": "uint256"
682
+ },
683
+ {
684
+ "indexed": false,
685
+ "internalType": "uint256",
686
+ "name": "protocolFee",
687
+ "type": "uint256"
688
+ }
689
+ ],
690
+ "name": "TransferInUnderlyingFlashLoan",
691
+ "type": "event"
692
+ },
693
+ {
694
+ "anonymous": false,
695
+ "inputs": [
696
+ {
697
+ "indexed": false,
698
+ "internalType": "address",
699
+ "name": "asset",
700
+ "type": "address"
701
+ },
702
+ {
703
+ "indexed": false,
704
+ "internalType": "address",
705
+ "name": "receiver",
706
+ "type": "address"
707
+ },
708
+ {
709
+ "indexed": false,
710
+ "internalType": "uint256",
711
+ "name": "amount",
712
+ "type": "uint256"
713
+ }
714
+ ],
715
+ "name": "TransferOutUnderlyingFlashLoan",
716
+ "type": "event"
717
+ },
543
718
  {
544
719
  "inputs": [],
545
720
  "name": "_acceptAdmin",
@@ -850,6 +1025,30 @@
850
1025
  "stateMutability": "view",
851
1026
  "type": "function"
852
1027
  },
1028
+ {
1029
+ "inputs": [
1030
+ {
1031
+ "internalType": "uint256",
1032
+ "name": "amount",
1033
+ "type": "uint256"
1034
+ }
1035
+ ],
1036
+ "name": "calculateFlashLoanFee",
1037
+ "outputs": [
1038
+ {
1039
+ "internalType": "uint256",
1040
+ "name": "",
1041
+ "type": "uint256"
1042
+ },
1043
+ {
1044
+ "internalType": "uint256",
1045
+ "name": "",
1046
+ "type": "uint256"
1047
+ }
1048
+ ],
1049
+ "stateMutability": "view",
1050
+ "type": "function"
1051
+ },
853
1052
  {
854
1053
  "inputs": [],
855
1054
  "name": "comptroller",
@@ -902,6 +1101,69 @@
902
1101
  "stateMutability": "view",
903
1102
  "type": "function"
904
1103
  },
1104
+ {
1105
+ "inputs": [],
1106
+ "name": "flashLoanAmount",
1107
+ "outputs": [
1108
+ {
1109
+ "internalType": "uint256",
1110
+ "name": "",
1111
+ "type": "uint256"
1112
+ }
1113
+ ],
1114
+ "stateMutability": "view",
1115
+ "type": "function"
1116
+ },
1117
+ {
1118
+ "inputs": [
1119
+ {
1120
+ "internalType": "address",
1121
+ "name": "borrower",
1122
+ "type": "address"
1123
+ },
1124
+ {
1125
+ "internalType": "uint256",
1126
+ "name": "borrowAmount",
1127
+ "type": "uint256"
1128
+ }
1129
+ ],
1130
+ "name": "flashLoanDebtPosition",
1131
+ "outputs": [
1132
+ {
1133
+ "internalType": "uint256",
1134
+ "name": "",
1135
+ "type": "uint256"
1136
+ }
1137
+ ],
1138
+ "stateMutability": "nonpayable",
1139
+ "type": "function"
1140
+ },
1141
+ {
1142
+ "inputs": [],
1143
+ "name": "flashLoanFeeMantissa",
1144
+ "outputs": [
1145
+ {
1146
+ "internalType": "uint256",
1147
+ "name": "",
1148
+ "type": "uint256"
1149
+ }
1150
+ ],
1151
+ "stateMutability": "view",
1152
+ "type": "function"
1153
+ },
1154
+ {
1155
+ "inputs": [],
1156
+ "name": "flashLoanProtocolShareMantissa",
1157
+ "outputs": [
1158
+ {
1159
+ "internalType": "uint256",
1160
+ "name": "",
1161
+ "type": "uint256"
1162
+ }
1163
+ ],
1164
+ "stateMutability": "view",
1165
+ "type": "function"
1166
+ },
905
1167
  {
906
1168
  "inputs": [
907
1169
  {
@@ -1013,6 +1275,19 @@
1013
1275
  "stateMutability": "view",
1014
1276
  "type": "function"
1015
1277
  },
1278
+ {
1279
+ "inputs": [],
1280
+ "name": "isFlashLoanEnabled",
1281
+ "outputs": [
1282
+ {
1283
+ "internalType": "bool",
1284
+ "name": "",
1285
+ "type": "bool"
1286
+ }
1287
+ ],
1288
+ "stateMutability": "view",
1289
+ "type": "function"
1290
+ },
1016
1291
  {
1017
1292
  "inputs": [],
1018
1293
  "name": "isVToken",
@@ -1152,6 +1427,49 @@
1152
1427
  "stateMutability": "nonpayable",
1153
1428
  "type": "function"
1154
1429
  },
1430
+ {
1431
+ "inputs": [
1432
+ {
1433
+ "internalType": "bool",
1434
+ "name": "enabled",
1435
+ "type": "bool"
1436
+ }
1437
+ ],
1438
+ "name": "setFlashLoanEnabled",
1439
+ "outputs": [
1440
+ {
1441
+ "internalType": "uint256",
1442
+ "name": "",
1443
+ "type": "uint256"
1444
+ }
1445
+ ],
1446
+ "stateMutability": "nonpayable",
1447
+ "type": "function"
1448
+ },
1449
+ {
1450
+ "inputs": [
1451
+ {
1452
+ "internalType": "uint256",
1453
+ "name": "flashLoanFeeMantissa_",
1454
+ "type": "uint256"
1455
+ },
1456
+ {
1457
+ "internalType": "uint256",
1458
+ "name": "flashLoanProtocolShare_",
1459
+ "type": "uint256"
1460
+ }
1461
+ ],
1462
+ "name": "setFlashLoanFeeMantissa",
1463
+ "outputs": [
1464
+ {
1465
+ "internalType": "uint256",
1466
+ "name": "",
1467
+ "type": "uint256"
1468
+ }
1469
+ ],
1470
+ "stateMutability": "nonpayable",
1471
+ "type": "function"
1472
+ },
1155
1473
  {
1156
1474
  "inputs": [
1157
1475
  {
@@ -1309,6 +1627,58 @@
1309
1627
  "stateMutability": "nonpayable",
1310
1628
  "type": "function"
1311
1629
  },
1630
+ {
1631
+ "inputs": [
1632
+ {
1633
+ "internalType": "address payable",
1634
+ "name": "from",
1635
+ "type": "address"
1636
+ },
1637
+ {
1638
+ "internalType": "uint256",
1639
+ "name": "repaymentAmount",
1640
+ "type": "uint256"
1641
+ },
1642
+ {
1643
+ "internalType": "uint256",
1644
+ "name": "totalFee",
1645
+ "type": "uint256"
1646
+ },
1647
+ {
1648
+ "internalType": "uint256",
1649
+ "name": "protocolFee",
1650
+ "type": "uint256"
1651
+ }
1652
+ ],
1653
+ "name": "transferInUnderlyingFlashLoan",
1654
+ "outputs": [
1655
+ {
1656
+ "internalType": "uint256",
1657
+ "name": "",
1658
+ "type": "uint256"
1659
+ }
1660
+ ],
1661
+ "stateMutability": "nonpayable",
1662
+ "type": "function"
1663
+ },
1664
+ {
1665
+ "inputs": [
1666
+ {
1667
+ "internalType": "address payable",
1668
+ "name": "to",
1669
+ "type": "address"
1670
+ },
1671
+ {
1672
+ "internalType": "uint256",
1673
+ "name": "amount",
1674
+ "type": "uint256"
1675
+ }
1676
+ ],
1677
+ "name": "transferOutUnderlyingFlashLoan",
1678
+ "outputs": [],
1679
+ "stateMutability": "nonpayable",
1680
+ "type": "function"
1681
+ },
1312
1682
  {
1313
1683
  "inputs": [],
1314
1684
  "name": "underlying",
@@ -3,6 +3,69 @@
3
3
  "contractName": "VTokenInterface",
4
4
  "sourceName": "contracts/Tokens/VTokens/VTokenInterfaces.sol",
5
5
  "abi": [
6
+ {
7
+ "inputs": [],
8
+ "name": "FlashLoanAlreadyActive",
9
+ "type": "error"
10
+ },
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "uint256",
15
+ "name": "fee",
16
+ "type": "uint256"
17
+ },
18
+ {
19
+ "internalType": "uint256",
20
+ "name": "maxFee",
21
+ "type": "uint256"
22
+ }
23
+ ],
24
+ "name": "FlashLoanFeeTooHigh",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "internalType": "uint256",
31
+ "name": "fee",
32
+ "type": "uint256"
33
+ },
34
+ {
35
+ "internalType": "uint256",
36
+ "name": "maxFee",
37
+ "type": "uint256"
38
+ }
39
+ ],
40
+ "name": "FlashLoanProtocolShareTooHigh",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [],
45
+ "name": "InsufficientCash",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [
50
+ {
51
+ "internalType": "uint256",
52
+ "name": "actualAmount",
53
+ "type": "uint256"
54
+ },
55
+ {
56
+ "internalType": "uint256",
57
+ "name": "requiredTotalFee",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "InsufficientRepayment",
62
+ "type": "error"
63
+ },
64
+ {
65
+ "inputs": [],
66
+ "name": "InvalidComptroller",
67
+ "type": "error"
68
+ },
6
69
  {
7
70
  "anonymous": false,
8
71
  "inputs": [
@@ -90,6 +153,56 @@
90
153
  "name": "Borrow",
91
154
  "type": "event"
92
155
  },
156
+ {
157
+ "anonymous": false,
158
+ "inputs": [
159
+ {
160
+ "indexed": false,
161
+ "internalType": "uint256",
162
+ "name": "oldFlashLoanFeeMantissa",
163
+ "type": "uint256"
164
+ },
165
+ {
166
+ "indexed": false,
167
+ "internalType": "uint256",
168
+ "name": "newFlashLoanFeeMantissa",
169
+ "type": "uint256"
170
+ },
171
+ {
172
+ "indexed": false,
173
+ "internalType": "uint256",
174
+ "name": "oldFlashLoanProtocolShare",
175
+ "type": "uint256"
176
+ },
177
+ {
178
+ "indexed": false,
179
+ "internalType": "uint256",
180
+ "name": "newFlashLoanProtocolShare",
181
+ "type": "uint256"
182
+ }
183
+ ],
184
+ "name": "FlashLoanFeeUpdated",
185
+ "type": "event"
186
+ },
187
+ {
188
+ "anonymous": false,
189
+ "inputs": [
190
+ {
191
+ "indexed": false,
192
+ "internalType": "bool",
193
+ "name": "previousStatus",
194
+ "type": "bool"
195
+ },
196
+ {
197
+ "indexed": false,
198
+ "internalType": "bool",
199
+ "name": "newStatus",
200
+ "type": "bool"
201
+ }
202
+ ],
203
+ "name": "FlashLoanStatusChanged",
204
+ "type": "event"
205
+ },
93
206
  {
94
207
  "anonymous": false,
95
208
  "inputs": [
@@ -515,6 +628,68 @@
515
628
  "name": "Transfer",
516
629
  "type": "event"
517
630
  },
631
+ {
632
+ "anonymous": false,
633
+ "inputs": [
634
+ {
635
+ "indexed": true,
636
+ "internalType": "address",
637
+ "name": "asset",
638
+ "type": "address"
639
+ },
640
+ {
641
+ "indexed": true,
642
+ "internalType": "address",
643
+ "name": "sender",
644
+ "type": "address"
645
+ },
646
+ {
647
+ "indexed": false,
648
+ "internalType": "uint256",
649
+ "name": "amount",
650
+ "type": "uint256"
651
+ },
652
+ {
653
+ "indexed": false,
654
+ "internalType": "uint256",
655
+ "name": "totalFee",
656
+ "type": "uint256"
657
+ },
658
+ {
659
+ "indexed": false,
660
+ "internalType": "uint256",
661
+ "name": "protocolFee",
662
+ "type": "uint256"
663
+ }
664
+ ],
665
+ "name": "TransferInUnderlyingFlashLoan",
666
+ "type": "event"
667
+ },
668
+ {
669
+ "anonymous": false,
670
+ "inputs": [
671
+ {
672
+ "indexed": false,
673
+ "internalType": "address",
674
+ "name": "asset",
675
+ "type": "address"
676
+ },
677
+ {
678
+ "indexed": false,
679
+ "internalType": "address",
680
+ "name": "receiver",
681
+ "type": "address"
682
+ },
683
+ {
684
+ "indexed": false,
685
+ "internalType": "uint256",
686
+ "name": "amount",
687
+ "type": "uint256"
688
+ }
689
+ ],
690
+ "name": "TransferOutUnderlyingFlashLoan",
691
+ "type": "event"
692
+ },
518
693
  {
519
694
  "inputs": [],
520
695
  "name": "_acceptAdmin",
@@ -877,6 +1052,45 @@
877
1052
  "stateMutability": "view",
878
1053
  "type": "function"
879
1054
  },
1055
+ {
1056
+ "inputs": [],
1057
+ "name": "flashLoanAmount",
1058
+ "outputs": [
1059
+ {
1060
+ "internalType": "uint256",
1061
+ "name": "",
1062
+ "type": "uint256"
1063
+ }
1064
+ ],
1065
+ "stateMutability": "view",
1066
+ "type": "function"
1067
+ },
1068
+ {
1069
+ "inputs": [],
1070
+ "name": "flashLoanFeeMantissa",
1071
+ "outputs": [
1072
+ {
1073
+ "internalType": "uint256",
1074
+ "name": "",
1075
+ "type": "uint256"
1076
+ }
1077
+ ],
1078
+ "stateMutability": "view",
1079
+ "type": "function"
1080
+ },
1081
+ {
1082
+ "inputs": [],
1083
+ "name": "flashLoanProtocolShareMantissa",
1084
+ "outputs": [
1085
+ {
1086
+ "internalType": "uint256",
1087
+ "name": "",
1088
+ "type": "uint256"
1089
+ }
1090
+ ],
1091
+ "stateMutability": "view",
1092
+ "type": "function"
1093
+ },
880
1094
  {
881
1095
  "inputs": [
882
1096
  {
@@ -950,6 +1164,19 @@
950
1164
  "stateMutability": "view",
951
1165
  "type": "function"
952
1166
  },
1167
+ {
1168
+ "inputs": [],
1169
+ "name": "isFlashLoanEnabled",
1170
+ "outputs": [
1171
+ {
1172
+ "internalType": "bool",
1173
+ "name": "",
1174
+ "type": "bool"
1175
+ }
1176
+ ],
1177
+ "stateMutability": "view",
1178
+ "type": "function"
1179
+ },
953
1180
  {
954
1181
  "inputs": [],
955
1182
  "name": "isVToken",