Skip to content

Commit

Permalink
fix: Bump version of v3 dependencies (#938)
Browse files Browse the repository at this point in the history
* fix: Bump aave dependencies and fix tests
  • Loading branch information
miguelmtzinf authored Mar 7, 2024
1 parent 6070e82 commit 64870f0
Show file tree
Hide file tree
Showing 39 changed files with 2,658 additions and 1,417 deletions.
2 changes: 1 addition & 1 deletion contracts/mocks/flashloan/MockFlashLoanReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ contract MockFlashLoanReceiver is FlashLoanReceiverBase {
: amounts[i] + premiums[i];
//execution does not fail - mint tokens and return them to the _destination

token.mint(premiums[i]);
token.mint(address(this), premiums[i]);

IERC20(assets[i]).approve(address(POOL), amountToReturn);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/flashloan/MockSimpleFlashLoanReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ contract MockFlashLoanSimpleReceiver is FlashLoanSimpleReceiverBase {
uint256 amountToReturn = (_amountToApprove != 0) ? _amountToApprove : amount.add(premium);
//execution does not fail - mint tokens and return them to the _destination

token.mint(premium);
token.mint(address(this), premium);

IERC20(asset).approve(address(POOL), amountToReturn);

Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/tests/FlashloanAttacker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ contract FlashloanAttacker is FlashLoanSimpleReceiverBase {

function supplyAsset(address asset, uint256 amount) public {
MintableERC20 token = MintableERC20(asset);
token.mint(amount);
token.mint(address(this), amount);
token.approve(address(_pool), type(uint256).max);
_pool.supply(asset, amount, address(this), 0);
}
Expand All @@ -49,7 +49,7 @@ contract FlashloanAttacker is FlashLoanSimpleReceiverBase {
// Also do a normal borrow here in the middle
_innerBorrow(asset);

token.mint(premium);
token.mint(address(this), premium);
IERC20(asset).approve(address(POOL), amountToReturn);

return true;
Expand Down
Loading

0 comments on commit 64870f0

Please sign in to comment.