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: SuperchainWETH test flake #13115

Merged
merged 1 commit into from
Nov 27, 2024
Merged
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
17 changes: 9 additions & 8 deletions packages/contracts-bedrock/test/L2/SuperchainWETH.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ contract SuperchainWETH_Test is CommonTest {
/// @notice Test that the internal mint function reverts to protect against accidentally changing the visibility.
function testFuzz_calling_internalMintFunction_reverts(address _caller, address _to, uint256 _amount) public {
// Arrange
bytes memory _calldata = abi.encodeWithSignature("_mint(address,uint256)", _to, _amount); // nosemgrep:
// sol-style-use-abi-encodecall
// nosemgrep: sol-style-use-abi-encodecall
bytes memory _calldata = abi.encodeWithSignature("_mint(address,uint256)", _to, _amount);
vm.expectRevert(bytes(""));

// Act
Expand All @@ -344,8 +344,8 @@ contract SuperchainWETH_Test is CommonTest {
/// @notice Test that the mint function reverts to protect against accidentally changing the visibility.
function testFuzz_calling_mintFunction_reverts(address _caller, address _to, uint256 _amount) public {
// Arrange
bytes memory _calldata = abi.encodeWithSignature("mint(address,uint256)", _to, _amount); // nosemgrep:
// sol-style-use-abi-encodecall
// nosemgrep: sol-style-use-abi-encodecall
bytes memory _calldata = abi.encodeWithSignature("mint(address,uint256)", _to, _amount);
vm.expectRevert(bytes(""));

// Act
Expand All @@ -359,8 +359,8 @@ contract SuperchainWETH_Test is CommonTest {
/// @notice Test that the internal burn function reverts to protect against accidentally changing the visibility.
function testFuzz_calling_internalBurnFunction_reverts(address _caller, address _from, uint256 _amount) public {
// Arrange
bytes memory _calldata = abi.encodeWithSignature("_burn(address,uint256)", _from, _amount); // nosemgrep:
// sol-style-use-abi-encodecall
// nosemgrep: sol-style-use-abi-encodecall
bytes memory _calldata = abi.encodeWithSignature("_burn(address,uint256)", _from, _amount);
vm.expectRevert(bytes(""));

// Act
Expand All @@ -374,8 +374,8 @@ contract SuperchainWETH_Test is CommonTest {
/// @notice Test that the burn function reverts to protect against accidentally changing the visibility.
function testFuzz_calling_burnFuunction_reverts(address _caller, address _from, uint256 _amount) public {
// Arrange
bytes memory _calldata = abi.encodeWithSignature("burn(address,uint256)", _from, _amount); // nosemgrep:
// sol-style-use-abi-encodecall
// nosemgrep: sol-style-use-abi-encodecall
bytes memory _calldata = abi.encodeWithSignature("burn(address,uint256)", _from, _amount);
vm.expectRevert(bytes(""));

// Act
Expand Down Expand Up @@ -504,6 +504,7 @@ contract SuperchainWETH_Test is CommonTest {
external
{
// Assume
vm.assume(_sender != address(ethLiquidity));
vm.assume(_sender != ZERO_ADDRESS);
vm.assume(_to != ZERO_ADDRESS);
_amount = bound(_amount, 0, type(uint248).max - 1);
Expand Down