Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Bump v3 dependencies #938

Merged
merged 4 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading