Commit 71b29264 authored by smartcontracts's avatar smartcontracts Committed by GitHub

fix: fuzz flake in CrossL2Inbox test (#13360)

Fixes a minor flake in CrossL2Inbox where the test can fail when
the target is the vm address itself.
parent 5bdc9ac0
......@@ -157,6 +157,9 @@ contract CrossL2InboxTest is Test {
// Ensure that the target call is payable if value is sent
if (_value > 0) assumePayable(_target);
// Ensure target is not a forge address.
assumeNotForgeAddress(_target);
// Ensure is not a deposit transaction
vm.mockCall({
callee: Predeploys.L1_BLOCK_ATTRIBUTES,
......@@ -413,6 +416,9 @@ contract CrossL2InboxTest is Test {
// Ensure that the target call is payable if value is sent
if (_value > 0) assumePayable(_target);
// Ensure target is not a forge address.
assumeNotForgeAddress(_target);
// Ensure that the target call reverts
vm.mockCallRevert({ callee: _target, msgValue: _value, data: _message, revertData: abi.encode(false) });
......
......@@ -252,6 +252,9 @@ contract L2ToL2CrossDomainMessengerTest is Test {
// Ensure that the target call is payable if value is sent
if (_value > 0) assumePayable(_target);
// Ensure that the target is not a forge address.
assumeNotForgeAddress(_target);
// Ensure that the target contract does not revert
vm.mockCall({ callee: _target, msgValue: _value, data: _message, returnData: abi.encode(true) });
......
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