Commit ae37e024 authored by smartcontracts's avatar smartcontracts Committed by GitHub

fix: multiple fuzz flakes (#11981)

Fixes a couple of fuzz flakes that were found when fuzzing
heavily.
parent 68b52398
......@@ -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 {
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment