Skip to content

Commit

Permalink
refactor: remove AAVE deal
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Oct 10, 2024
1 parent fbb5b13 commit bab4886
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
22 changes: 0 additions & 22 deletions test/prod/ProdTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,4 @@ contract ProdTest is Test, BaseConfig {
function testShowBlockNumber() public view {
console.log("Testing at block", block.number);
}

// Needed because AAVE packs the balance struct.
function deal(
address underlying,
address user,
uint256 amount
) internal override {
if (underlying == aave) {
uint256 balance = ERC20(underlying).balanceOf(user);

if (amount > balance) {
ERC20(underlying).transfer(user, amount - balance);
} else {
vm.prank(user);
ERC20(underlying).transfer(address(this), balance - amount);
}

return;
}

super.deal(underlying, user, amount);
}
}
2 changes: 0 additions & 2 deletions test/prod/aave-v2/setup/TestSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ contract TestSetup is Config, ProdTest {

vm.label(address(user), "User");

// Only 104 bits are used for the balance in the AAVE balance slot
deal(aave, address(this), type(uint104).max);
// Only 255 bits are used for the balance in the USDC balance slot
deal(usdc, address(this), 2**255 - 1);
deal(dai, address(this), type(uint256).max);
Expand Down

0 comments on commit bab4886

Please sign in to comment.