Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
ae37e024
Unverified
Commit
ae37e024
authored
Sep 18, 2024
by
smartcontracts
Committed by
GitHub
Sep 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: multiple fuzz flakes (#11981)
Fixes a couple of fuzz flakes that were found when fuzzing heavily.
parent
68b52398
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
DataAvailabilityChallenge.t.sol
...contracts-bedrock/test/L1/DataAvailabilityChallenge.t.sol
+3
-0
L2ToL2CrossDomainMessenger.t.sol
...ontracts-bedrock/test/L2/L2ToL2CrossDomainMessenger.t.sol
+5
-1
No files found.
packages/contracts-bedrock/test/L1/DataAvailabilityChallenge.t.sol
View file @
ae37e024
...
@@ -10,6 +10,7 @@ import {
...
@@ -10,6 +10,7 @@ import {
import { computeCommitmentKeccak256 } from "src/L1/DataAvailabilityChallenge.sol";
import { computeCommitmentKeccak256 } from "src/L1/DataAvailabilityChallenge.sol";
import { Proxy } from "src/universal/Proxy.sol";
import { Proxy } from "src/universal/Proxy.sol";
import { CommonTest } from "test/setup/CommonTest.sol";
import { CommonTest } from "test/setup/CommonTest.sol";
import { Preinstalls } from "src/libraries/Preinstalls.sol";
contract DataAvailabilityChallengeTest is CommonTest {
contract DataAvailabilityChallengeTest is CommonTest {
function setUp() public virtual override {
function setUp() public virtual override {
...
@@ -33,6 +34,8 @@ contract DataAvailabilityChallengeTest is CommonTest {
...
@@ -33,6 +34,8 @@ contract DataAvailabilityChallengeTest is CommonTest {
function testWithdraw(address sender, uint256 amount) public {
function testWithdraw(address sender, uint256 amount) public {
assumePayable(sender);
assumePayable(sender);
assumeNotPrecompile(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 != address(dataAvailabilityChallenge));
vm.assume(sender.balance == 0);
vm.assume(sender.balance == 0);
vm.deal(sender, amount);
vm.deal(sender, amount);
...
...
packages/contracts-bedrock/test/L2/L2ToL2CrossDomainMessenger.t.sol
View file @
ae37e024
...
@@ -194,8 +194,12 @@ contract L2ToL2CrossDomainMessengerTest is Test {
...
@@ -194,8 +194,12 @@ contract L2ToL2CrossDomainMessengerTest is Test {
)
)
external
external
{
{
// Ensure that the target contract is not a Forge contract.
assumeNotForgeAddress(_target);
// Ensure that the target contract is not CrossL2Inbox or L2ToL2CrossDomainMessenger
// 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
// Ensure that the target call is payable if value is sent
if (_value > 0) assumePayable(_target);
if (_value > 0) assumePayable(_target);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment