-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added flashloans to e2e tests (#386)
* Added flashloans to e2e tests * Removed error from mock contract * fix: patch collector * Removed duplicated deployments of the MockFlashLoanReceiver contract * Fixed tests CapsPlusRiskSteward (updated fork block) * Patched deal2 function for the sUSD token in the OPTIMISM network --------- Co-authored-by: Lukas <lukasstrassel@googlemail.com>
- Loading branch information
Showing
10 changed files
with
146 additions
and
47 deletions.
There are no files selected for viewing
Submodule aave-address-book
updated
75 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.10; | ||
|
||
import {IERC20} from 'openzeppelin-contracts/contracts/token/ERC20/IERC20.sol'; | ||
import {SafeERC20} from 'openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol'; | ||
|
||
contract MockFlashLoanReceiver { | ||
using SafeERC20 for IERC20; | ||
|
||
function executeOperation( | ||
address[] calldata assets, | ||
uint256[] calldata amounts, | ||
uint256[] calldata premiums, | ||
address /* initiator */, | ||
bytes calldata /* params */ | ||
) external returns (bool) { | ||
for (uint256 i = 0; i < assets.length; i++) { | ||
IERC20(assets[i]).forceApprove(msg.sender, amounts[i] + premiums[i]); | ||
} | ||
|
||
return true; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2f0f37b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
♻️ Forge Gas Snapshots
Seems like you are not measuring gas of any operations yet. 🤔
Consider adding some snapshot tests to measure regressions & improvements.
2f0f37b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌈 Test Results
2f0f37b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔮 Coverage report
105, 106, 107, 108, 114 and 2 more
60, 65, 68, 84, 94 and 109 more
ProtocolV2TestBase.defaultTest, ProtocolV2TestBase.defaultTest, ProtocolV2TestBase.createConfigurationSnapshot, ProtocolV2TestBase.e2eTest, ProtocolV2TestBase.e2eTestAsset and 13 more
55, 63, 94, 107, 108 and 43 more
ProtocolV3TestBase.defaultTest, ProtocolV3TestBase.defaultTest, ProtocolV3TestBase.configChangePlausibilityTest, ProtocolV3TestBase.e2eTest, ProtocolV3TestBase.e2eTestAsset and 2 more
112, 117
AaveArbEthERC20Bridge.whoCanRescue, AaveArbEthERC20Bridge.maxRescue
48, 49, 53, 58
AaveOpEthERC20Bridge.nonce, AaveOpEthERC20Bridge.whoCanRescue, AaveOpEthERC20Bridge.maxRescue
63, 73, 95, 100, 111
AavePolEthERC20Bridge.whoCanRescue, AavePolEthERC20Bridge.maxRescue
78, 82, 83, 85, 86 and 4 more
AavePolEthPlasmaBridge.exit, AavePolEthPlasmaBridge.whoCanRescue, AavePolEthPlasmaBridge.maxRescue, AavePolEthPlasmaBridge.receive
96, 97, 111, 121, 123 and 25 more
DefaultReserveInterestRateStrategy.getMaxVariableBorrowRate, DefaultReserveInterestRateStrategy.calculateInterestRates, DefaultReserveInterestRateStrategy.calculateInterestRates, DefaultReserveInterestRateStrategy._getOverallBorrowRate
25, 26, 27, 30, 35 and 5 more
PercentageMath.percentMul, PercentageMath.percentDiv
28, 29, 30, 32, 73 and 16 more
SafeMath.add, SafeMath.mul, SafeMath.div, SafeMath.div, SafeMath.mod and 1 more
33, 34, 40, 41, 47 and 30 more
WadRayMath.wad, WadRayMath.halfRay, WadRayMath.halfWad, WadRayMath.wadMul, WadRayMath.wadDiv and 4 more
12, 13, 14, 17, 18 and 1 more
FreezingSteward.constructor, FreezingSteward.setFreeze
132, 137
AaveSwapper.whoCanRescue, AaveSwapper.maxRescue
29, 30
BaseSwapPayload._deposit
47, 48, 49, 50, 56 and 2 more
56
AaveV2Payload.rateStrategiesUpdates
30, 32, 34, 35, 37 and 4 more
V2RateStrategyFactory.strategyHashFromParams, V2RateStrategyFactory.getStrategyByParams, V2RateStrategyFactory.getStrategyData
12, 13
AaveV3PayloadArbitrum.getPoolContext
12, 13
AaveV3PayloadAvalanche.getPoolContext
12, 13
AaveV3PayloadBNB.getPoolContext
12, 13
AaveV3PayloadBase.getPoolContext
12, 13
AaveV3PayloadEthereum.getPoolContext
14, 15
AaveV3PayloadEthereumEtherFi.getPoolContext
14, 15
AaveV3PayloadEthereumLido.getPoolContext
12, 13
AaveV3PayloadLinea.getPoolContext
12, 13
AaveV3PayloadOptimism.getPoolContext
12, 13
AaveV3PayloadPolygon.getPoolContext
12, 13
AaveV3PayloadScroll.getPoolContext
12, 13
AaveV3PayloadSonic.getPoolContext
12, 13
AaveV3PayloadZkSync.getPoolContext
2f0f37b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌈 Test Results zksync