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: multiple fuzz flakes #11981

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { computeCommitmentKeccak256 } from "src/L1/DataAvailabilityChallenge.sol";
import { Proxy } from "src/universal/Proxy.sol";
import { CommonTest } from "test/setup/CommonTest.sol";
import { Preinstalls } from "src/libraries/Preinstalls.sol";

contract DataAvailabilityChallengeTest is CommonTest {
function setUp() public virtual override {
Expand All @@ -33,6 +34,8 @@ contract DataAvailabilityChallengeTest is CommonTest {
function testWithdraw(address sender, uint256 amount) public {
assumePayable(sender);
assumeNotPrecompile(sender);
// EntryPoint will revert if using amount > type(uint112).max.
vm.assume(sender != Preinstalls.EntryPoint_v060);
vm.assume(sender != address(dataAvailabilityChallenge));
vm.assume(sender.balance == 0);
vm.deal(sender, amount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,12 @@ contract L2ToL2CrossDomainMessengerTest is Test {
)
external
{
// Ensure that the target contract is not a Forge contract.
assumeNotForgeAddress(_target);

// Ensure that the target contract is not CrossL2Inbox or L2ToL2CrossDomainMessenger
vm.assume(_target != Predeploys.CROSS_L2_INBOX && _target != Predeploys.L2_TO_L2_CROSS_DOMAIN_MESSENGER);
vm.assume(_target != Predeploys.CROSS_L2_INBOX);
vm.assume(_target != Predeploys.L2_TO_L2_CROSS_DOMAIN_MESSENGER);

// Ensure that the target call is payable if value is sent
if (_value > 0) assumePayable(_target);
Expand Down
Loading