chore: assert exact eth balance at aggregate test

This commit is contained in:
pedrobergamini
2025-08-08 12:00:12 -03:00
parent a76c35d95e
commit 7f8e1e6e3b

View File

@@ -479,12 +479,11 @@ contract BebopExecutorTest is Constants, Permit2TestHelper, TestUtils {
totalMakerAmount,
"USDC should be at receiver"
);
// ETH balance check - the harness may have different balance due to test setup
// Just ensure no excessive ETH is stuck
assertLe(
// With pranking, settlement pulls ETH from taker; executor keeps msg.value
assertEq(
address(bebopExecutor).balance,
initialExecutorBalance + 1 ether,
"Too much ETH left in executor"
totalTakerAmount,
"Executor ETH balance should equal msg.value for aggregate ETH flow"
);
}
@@ -625,12 +624,11 @@ contract BebopExecutorTest is Constants, Permit2TestHelper, TestUtils {
expectedPartialOutput,
"USDC should be at receiver"
);
// ETH balance check - the harness may have different balance due to test setup
// Just ensure no excessive ETH is stuck
assertLe(
// With pranking, settlement pulls ETH from taker; executor keeps msg.value
assertEq(
address(bebopExecutor).balance,
initialExecutorBalance + 1 ether,
"Too much ETH left in executor"
partialFillAmount,
"Executor ETH balance should equal msg.value for aggregate ETH flow"
);
}