Skip to content

Commit

Permalink
add test for sender
Browse files Browse the repository at this point in the history
  • Loading branch information
jpick713 committed Jul 29, 2024
1 parent 08764f2 commit a77801c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/fork/concrete/handlers-base/AerodromeFlashswapHandler.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,19 @@ abstract contract AerodromeFlashswapHandler_Test is LrtHandler_ForkBase {
function testFork_RevertWhen_UntrustedCallerCallsFlashswapCallback() external {
vm.skip(borrowerWhitelistProof.length > 0);

vm.expectRevert(
abi.encodeWithSelector(AerodromeFlashswapHandler.SwapOnlyCallableByHandler.selector, address(this))
);
IPool(AERODROME_POOL).swap(1e18, 0, address(_getTypedUFHandler()), "");
}

function testFork_RevertWhen_otherCallerCallsFlashswapCallback() external {
vm.skip(borrowerWhitelistProof.length > 0);

vm.expectRevert(
abi.encodeWithSelector(AerodromeFlashswapHandler.CallbackOnlyCallableByPool.selector, address(this))
);
_getTypedUFHandler().hook(address(_getTypedUFHandler()), 1, 1, "");
_getTypedUFHandler().hook(address(_getHandler()), 1, 1, "");
}

function testFork_RevertWhen_TradingInZeroLiquidityRegion() external {
Expand Down

0 comments on commit a77801c

Please sign in to comment.