Commit 04d79720 authored by Michael Amadi's avatar Michael Amadi Committed by GitHub

apply exclude in test name checks and add it to ci and just check (#12805)

* apply exclude in test name checks and add it to ci and just check

* rename names/ to test-names/

* add and use no build test names check command

* apply test name checks to half of excludes test files

* apply test name checks to last half of excludes test files
parent ed6a6290
...@@ -706,6 +706,8 @@ jobs: ...@@ -706,6 +706,8 @@ jobs:
command: size-check command: size-check
- run-contracts-check: - run-contracts-check:
command: unused-imports-check-no-build command: unused-imports-check-no-build
- run-contracts-check:
command: lint-forge-tests-check-no-build
contracts-bedrock-validate-spacers: contracts-bedrock-validate-spacers:
docker: docker:
......
...@@ -165,9 +165,12 @@ semver-diff-check: build semver-diff-check-no-build ...@@ -165,9 +165,12 @@ semver-diff-check: build semver-diff-check-no-build
semgrep-test-validity-check: semgrep-test-validity-check:
forge fmt ../../.semgrep/tests/sol-rules.t.sol --check forge fmt ../../.semgrep/tests/sol-rules.t.sol --check
# Checks that forge test names are correctly formatted. Does not build contracts.
lint-forge-tests-check-no-build:
go run ./scripts/checks/test-names
# Checks that forge test names are correctly formatted. # Checks that forge test names are correctly formatted.
lint-forge-tests-check: lint-forge-tests-check: build lint-forge-tests-check-no-build
go run ./scripts/checks/names
# Checks that contracts are properly linted. # Checks that contracts are properly linted.
lint-check: lint-check:
...@@ -216,7 +219,8 @@ check: ...@@ -216,7 +219,8 @@ check:
semver-diff-check-no-build \ semver-diff-check-no-build \
validate-deploy-configs \ validate-deploy-configs \
validate-spacers-no-build \ validate-spacers-no-build \
interfaces-check-no-build interfaces-check-no-build \
lint-forge-tests-check-no-build
######################################################## ########################################################
# DEV TOOLS # # DEV TOOLS #
......
...@@ -18,6 +18,8 @@ type CheckInfo struct { ...@@ -18,6 +18,8 @@ type CheckInfo struct {
error string error string
} }
var excludes = map[string]bool{}
var checks = []CheckInfo{ var checks = []CheckInfo{
{ {
error: "test name parts should be in camelCase", error: "test name parts should be in camelCase",
...@@ -97,6 +99,10 @@ func main() { ...@@ -97,6 +99,10 @@ func main() {
return nil return nil
} }
if excludes[strings.TrimSuffix(filepath.Base(path), filepath.Ext(path))] {
return nil
}
data, err := os.ReadFile(path) data, err := os.ReadFile(path)
if err != nil { if err != nil {
return err return err
......
...@@ -61,7 +61,7 @@ contract DelayedVetoable_Init is Test { ...@@ -61,7 +61,7 @@ contract DelayedVetoable_Init is Test {
contract DelayedVetoable_Getters_Test is DelayedVetoable_Init { contract DelayedVetoable_Getters_Test is DelayedVetoable_Init {
/// @dev The getters return the expected values when called by the zero address. /// @dev The getters return the expected values when called by the zero address.
function test_getters() external { function test_getters_succeeds() external {
vm.startPrank(address(0)); vm.startPrank(address(0));
assertEq(delayedVetoable.initiator(), initiator); assertEq(delayedVetoable.initiator(), initiator);
assertEq(delayedVetoable.vetoer(), vetoer); assertEq(delayedVetoable.vetoer(), vetoer);
......
...@@ -623,7 +623,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer { ...@@ -623,7 +623,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer {
} }
/// @dev Tests that sendMessage succeeds with a custom gas token when the call value is zero. /// @dev Tests that sendMessage succeeds with a custom gas token when the call value is zero.
function test_sendMessage_customGasToken_noValue_succeeds() external { function test_sendMessage_customGasTokenButNoValue_succeeds() external {
// Mock the gasPayingToken function to return a custom gas token // Mock the gasPayingToken function to return a custom gas token
vm.mockCall( vm.mockCall(
address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(18)) address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(18))
...@@ -671,7 +671,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer { ...@@ -671,7 +671,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer {
} }
/// @dev Tests that the sendMessage reverts when call value is non-zero with custom gas token. /// @dev Tests that the sendMessage reverts when call value is non-zero with custom gas token.
function test_sendMessage_customGasToken_withValue_reverts() external { function test_sendMessage_customGasTokenWithValue_reverts() external {
// Mock the gasPayingToken function to return a custom gas token // Mock the gasPayingToken function to return a custom gas token
vm.mockCall( vm.mockCall(
address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2)) address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2))
...@@ -682,7 +682,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer { ...@@ -682,7 +682,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer {
} }
/// @dev Tests that the relayMessage succeeds with a custom gas token when the call value is zero. /// @dev Tests that the relayMessage succeeds with a custom gas token when the call value is zero.
function test_relayMessage_customGasToken_noValue_succeeds() external { function test_relayMessage_customGasTokenAndNoValue_succeeds() external {
// Mock the gasPayingToken function to return a custom gas token // Mock the gasPayingToken function to return a custom gas token
vm.mockCall( vm.mockCall(
address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2)) address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2))
...@@ -722,7 +722,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer { ...@@ -722,7 +722,7 @@ contract L1CrossDomainMessenger_Test is Bridge_Initializer {
/// @dev Tests that the relayMessage reverts when call value is non-zero with custom gas token. /// @dev Tests that the relayMessage reverts when call value is non-zero with custom gas token.
/// The L2CrossDomainMessenger contract cannot `sendMessage` with value when using a custom gas token. /// The L2CrossDomainMessenger contract cannot `sendMessage` with value when using a custom gas token.
function test_relayMessage_customGasToken_withValue_reverts() external virtual { function test_relayMessage_customGasTokenWithValue_reverts() external virtual {
// Mock the gasPayingToken function to return a custom gas token // Mock the gasPayingToken function to return a custom gas token
vm.mockCall( vm.mockCall(
address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2)) address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2))
......
...@@ -773,7 +773,7 @@ contract OptimismPortal_FinalizeWithdrawal_Test is CommonTest { ...@@ -773,7 +773,7 @@ contract OptimismPortal_FinalizeWithdrawal_Test is CommonTest {
} }
/// @dev Tests that `finalizeWithdrawalTransaction` succeeds. /// @dev Tests that `finalizeWithdrawalTransaction` succeeds.
function test_finalizeWithdrawalTransaction_provenWithdrawalHash_ether_succeeds() external { function test_finalizeWithdrawalTransaction_provenWithdrawalHashEther_succeeds() external {
uint256 bobBalanceBefore = address(bob).balance; uint256 bobBalanceBefore = address(bob).balance;
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
...@@ -789,7 +789,7 @@ contract OptimismPortal_FinalizeWithdrawal_Test is CommonTest { ...@@ -789,7 +789,7 @@ contract OptimismPortal_FinalizeWithdrawal_Test is CommonTest {
} }
/// @dev Tests that `finalizeWithdrawalTransaction` succeeds. /// @dev Tests that `finalizeWithdrawalTransaction` succeeds.
function test_finalizeWithdrawalTransaction_provenWithdrawalHash_nonEther_targetToken_reverts() external { function test_finalizeWithdrawalTransaction_provenWithdrawalHashNonEtherTargetToken_reverts() external {
vm.mockCall( vm.mockCall(
address(systemConfig), address(systemConfig),
abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encodeCall(systemConfig.gasPayingToken, ()),
...@@ -1483,7 +1483,7 @@ contract OptimismPortalWithMockERC20_Test is OptimismPortal_FinalizeWithdrawal_T ...@@ -1483,7 +1483,7 @@ contract OptimismPortalWithMockERC20_Test is OptimismPortal_FinalizeWithdrawal_T
} }
/// @dev Tests that `finalizeWithdrawalTransaction` succeeds. /// @dev Tests that `finalizeWithdrawalTransaction` succeeds.
function test_finalizeWithdrawalTransaction_provenWithdrawalHash_nonEther_succeeds() external { function test_finalizeWithdrawalTransaction_provenWithdrawalHashNonEther_succeeds() external {
// Mint the token to the contract and approve the token for the portal // Mint the token to the contract and approve the token for the portal
token.mint(address(this), _defaultTx.value); token.mint(address(this), _defaultTx.value);
token.approve(address(optimismPortal), _defaultTx.value); token.approve(address(optimismPortal), _defaultTx.value);
...@@ -1562,7 +1562,7 @@ contract OptimismPortalWithMockERC20_Test is OptimismPortal_FinalizeWithdrawal_T ...@@ -1562,7 +1562,7 @@ contract OptimismPortalWithMockERC20_Test is OptimismPortal_FinalizeWithdrawal_T
/// @dev Tests that `depositTransaction` succeeds when a custom gas token is used but the msg.value is zero. /// @dev Tests that `depositTransaction` succeeds when a custom gas token is used but the msg.value is zero.
/// forge-config: ciheavy.fuzz.runs = 8192 /// forge-config: ciheavy.fuzz.runs = 8192
function testFuzz_depositTransaction_customGasToken_noValue_senderIsOrigin_succeeds( function testFuzz_depositTransaction_customGasTokenWithNoValueAndSenderIsOrigin_succeeds(
address _to, address _to,
uint256 _value, uint256 _value,
uint64 _gasLimit, uint64 _gasLimit,
...@@ -1586,7 +1586,7 @@ contract OptimismPortalWithMockERC20_Test is OptimismPortal_FinalizeWithdrawal_T ...@@ -1586,7 +1586,7 @@ contract OptimismPortalWithMockERC20_Test is OptimismPortal_FinalizeWithdrawal_T
/// @dev Tests that `depositTransaction` succeeds when a custom gas token is used but the msg.value is zero. /// @dev Tests that `depositTransaction` succeeds when a custom gas token is used but the msg.value is zero.
/// forge-config: ciheavy.fuzz.runs = 8192 /// forge-config: ciheavy.fuzz.runs = 8192
function testFuzz_depositTransaction_customGasToken_noValue_senderNotOrigin_succeeds( function testFuzz_depositTransaction_customGasTokenWithNoValueAndSenderNotOrigin_succeeds(
address _to, address _to,
uint256 _value, uint256 _value,
uint64 _gasLimit, uint64 _gasLimit,
...@@ -1609,7 +1609,7 @@ contract OptimismPortalWithMockERC20_Test is OptimismPortal_FinalizeWithdrawal_T ...@@ -1609,7 +1609,7 @@ contract OptimismPortalWithMockERC20_Test is OptimismPortal_FinalizeWithdrawal_T
} }
/// @dev Tests that `depositTransaction` fails when a custom gas token is used and msg.value is non-zero. /// @dev Tests that `depositTransaction` fails when a custom gas token is used and msg.value is non-zero.
function test_depositTransaction_customGasToken_withValue_reverts() external { function test_depositTransaction_customGasTokenWithValue_reverts() external {
// Mock the gas paying token to be the ERC20 token // Mock the gas paying token to be the ERC20 token
vm.mockCall( vm.mockCall(
address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(token), 18) address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(token), 18)
......
...@@ -583,7 +583,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest { ...@@ -583,7 +583,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
/// @dev Tests that `proveWithdrawalTransaction` reverts when the withdrawal has already been proven, and the new /// @dev Tests that `proveWithdrawalTransaction` reverts when the withdrawal has already been proven, and the new
/// game has the `CHALLENGER_WINS` status. /// game has the `CHALLENGER_WINS` status.
function test_proveWithdrawalTransaction_replayProve_differentGameChallengerWins_reverts() external { function test_proveWithdrawalTransaction_replayProveDifferentGameChallengerWins_reverts() external {
vm.expectEmit(address(optimismPortal2)); vm.expectEmit(address(optimismPortal2));
emit WithdrawalProven(_withdrawalHash, alice, bob); emit WithdrawalProven(_withdrawalHash, alice, bob);
vm.expectEmit(address(optimismPortal2)); vm.expectEmit(address(optimismPortal2));
...@@ -632,7 +632,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest { ...@@ -632,7 +632,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
/// @dev Tests that `proveWithdrawalTransaction` can be re-executed if the dispute game proven against has been /// @dev Tests that `proveWithdrawalTransaction` can be re-executed if the dispute game proven against has been
/// blacklisted. /// blacklisted.
function test_proveWithdrawalTransaction_replayProveBlacklisted_suceeds() external { function test_proveWithdrawalTransaction_replayProveBlacklisted_succeeds() external {
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalProven(_withdrawalHash, alice, bob); emit WithdrawalProven(_withdrawalHash, alice, bob);
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
...@@ -670,7 +670,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest { ...@@ -670,7 +670,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
/// @dev Tests that `proveWithdrawalTransaction` can be re-executed if the dispute game proven against has resolved /// @dev Tests that `proveWithdrawalTransaction` can be re-executed if the dispute game proven against has resolved
/// against the favor of the root claim. /// against the favor of the root claim.
function test_proveWithdrawalTransaction_replayProveBadProposal_suceeds() external { function test_proveWithdrawalTransaction_replayProveBadProposal_succeeds() external {
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalProven(_withdrawalHash, alice, bob); emit WithdrawalProven(_withdrawalHash, alice, bob);
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
...@@ -704,7 +704,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest { ...@@ -704,7 +704,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
/// @dev Tests that `proveWithdrawalTransaction` can be re-executed if the dispute game proven against is no longer /// @dev Tests that `proveWithdrawalTransaction` can be re-executed if the dispute game proven against is no longer
/// of the respected game type. /// of the respected game type.
function test_proveWithdrawalTransaction_replayRespectedGameTypeChanged_suceeds() external { function test_proveWithdrawalTransaction_replayRespectedGameTypeChanged_succeeds() external {
// Prove the withdrawal against a game with the current respected game type. // Prove the withdrawal against a game with the current respected game type.
vm.expectEmit(true, true, true, true); vm.expectEmit(true, true, true, true);
emit WithdrawalProven(_withdrawalHash, alice, bob); emit WithdrawalProven(_withdrawalHash, alice, bob);
...@@ -803,7 +803,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest { ...@@ -803,7 +803,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
} }
/// @dev Tests that `finalizeWithdrawalTransaction` succeeds. /// @dev Tests that `finalizeWithdrawalTransaction` succeeds.
function test_finalizeWithdrawalTransaction_provenWithdrawalHash_ether_succeeds() external { function test_finalizeWithdrawalTransaction_provenWithdrawalHashEther_succeeds() external {
uint256 bobBalanceBefore = address(bob).balance; uint256 bobBalanceBefore = address(bob).balance;
vm.expectEmit(address(optimismPortal2)); vm.expectEmit(address(optimismPortal2));
...@@ -891,7 +891,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest { ...@@ -891,7 +891,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
} }
/// @dev Tests that `finalizeWithdrawalTransaction` succeeds. /// @dev Tests that `finalizeWithdrawalTransaction` succeeds.
function test_finalizeWithdrawalTransaction_provenWithdrawalHash_nonEther_targetToken_reverts() external { function test_finalizeWithdrawalTransaction_provenWithdrawalHashNonEtherTargetToken_reverts() external {
vm.mockCall( vm.mockCall(
address(systemConfig), address(systemConfig),
abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encodeCall(systemConfig.gasPayingToken, ()),
...@@ -1730,7 +1730,7 @@ contract OptimismPortal2WithMockERC20_Test is OptimismPortal2_FinalizeWithdrawal ...@@ -1730,7 +1730,7 @@ contract OptimismPortal2WithMockERC20_Test is OptimismPortal2_FinalizeWithdrawal
} }
/// @dev Tests that `finalizeWithdrawalTransaction` succeeds. /// @dev Tests that `finalizeWithdrawalTransaction` succeeds.
function test_finalizeWithdrawalTransaction_provenWithdrawalHash_nonEther_succeeds() external { function test_finalizeWithdrawalTransaction_provenWithdrawalHashWithNonEther_succeeds() external {
// Mint the token to the contract and approve the token for the portal // Mint the token to the contract and approve the token for the portal
token.mint(address(this), _defaultTx.value); token.mint(address(this), _defaultTx.value);
token.approve(address(optimismPortal2), _defaultTx.value); token.approve(address(optimismPortal2), _defaultTx.value);
...@@ -1818,7 +1818,7 @@ contract OptimismPortal2WithMockERC20_Test is OptimismPortal2_FinalizeWithdrawal ...@@ -1818,7 +1818,7 @@ contract OptimismPortal2WithMockERC20_Test is OptimismPortal2_FinalizeWithdrawal
/// @dev Tests that `depositTransaction` succeeds when a custom gas token is used but the msg.value is zero. /// @dev Tests that `depositTransaction` succeeds when a custom gas token is used but the msg.value is zero.
/// forge-config: ciheavy.fuzz.runs = 8192 /// forge-config: ciheavy.fuzz.runs = 8192
function testFuzz_depositTransaction_customGasToken_noValue_senderIsOrigin_succeeds( function testFuzz_depositTransaction_customGasTokenWithNoValueAndSenderIsOrigin_succeeds(
address _to, address _to,
uint256 _value, uint256 _value,
uint64 _gasLimit, uint64 _gasLimit,
...@@ -1842,7 +1842,7 @@ contract OptimismPortal2WithMockERC20_Test is OptimismPortal2_FinalizeWithdrawal ...@@ -1842,7 +1842,7 @@ contract OptimismPortal2WithMockERC20_Test is OptimismPortal2_FinalizeWithdrawal
/// @dev Tests that `depositTransaction` succeeds when a custom gas token is used but the msg.value is zero. /// @dev Tests that `depositTransaction` succeeds when a custom gas token is used but the msg.value is zero.
/// forge-config: ciheavy.fuzz.runs = 8192 /// forge-config: ciheavy.fuzz.runs = 8192
function testFuzz_depositTransaction_customGasToken_noValue_senderNotOrigin_succeeds( function testFuzz_depositTransaction_customGasTokenWithNoValueAndSenderNotOrigin_succeeds(
address _to, address _to,
uint256 _value, uint256 _value,
uint64 _gasLimit, uint64 _gasLimit,
...@@ -1865,7 +1865,7 @@ contract OptimismPortal2WithMockERC20_Test is OptimismPortal2_FinalizeWithdrawal ...@@ -1865,7 +1865,7 @@ contract OptimismPortal2WithMockERC20_Test is OptimismPortal2_FinalizeWithdrawal
} }
/// @dev Tests that `depositTransaction` fails when a custom gas token is used and msg.value is non-zero. /// @dev Tests that `depositTransaction` fails when a custom gas token is used and msg.value is non-zero.
function test_depositTransaction_customGasToken_withValue_reverts() external { function test_depositTransaction_customGasTokenWithValue_reverts() external {
// Mock the gas paying token to be the ERC20 token // Mock the gas paying token to be the ERC20 token
vm.mockCall( vm.mockCall(
address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(token), 18) address(systemConfig), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(token), 18)
......
...@@ -43,7 +43,7 @@ contract OptimismPortalInterop_Test is CommonTest { ...@@ -43,7 +43,7 @@ contract OptimismPortalInterop_Test is CommonTest {
} }
/// @dev Tests that setting the gas paying token config as not the system config reverts. /// @dev Tests that setting the gas paying token config as not the system config reverts.
function testFuzz_setConfig_gasPayingToken_notSystemConfig_reverts(bytes calldata _value) public { function testFuzz_setConfig_gasPayingTokenButNotSystemConfig_reverts(bytes calldata _value) public {
vm.expectRevert(Unauthorized.selector); vm.expectRevert(Unauthorized.selector);
_optimismPortalInterop().setConfig(ConfigType.SET_GAS_PAYING_TOKEN, _value); _optimismPortalInterop().setConfig(ConfigType.SET_GAS_PAYING_TOKEN, _value);
} }
...@@ -66,7 +66,7 @@ contract OptimismPortalInterop_Test is CommonTest { ...@@ -66,7 +66,7 @@ contract OptimismPortalInterop_Test is CommonTest {
} }
/// @dev Tests that setting the add dependency config as not the system config reverts. /// @dev Tests that setting the add dependency config as not the system config reverts.
function testFuzz_setConfig_addDependency_notSystemConfig_reverts(bytes calldata _value) public { function testFuzz_setConfig_addDependencyButNotSystemConfig_reverts(bytes calldata _value) public {
vm.expectRevert(Unauthorized.selector); vm.expectRevert(Unauthorized.selector);
_optimismPortalInterop().setConfig(ConfigType.ADD_DEPENDENCY, _value); _optimismPortalInterop().setConfig(ConfigType.ADD_DEPENDENCY, _value);
} }
...@@ -89,7 +89,7 @@ contract OptimismPortalInterop_Test is CommonTest { ...@@ -89,7 +89,7 @@ contract OptimismPortalInterop_Test is CommonTest {
} }
/// @dev Tests that setting the remove dependency config as not the system config reverts. /// @dev Tests that setting the remove dependency config as not the system config reverts.
function testFuzz_setConfig_removeDependency_notSystemConfig_reverts(bytes calldata _value) public { function testFuzz_setConfig_removeDependencyButNotSystemConfig_reverts(bytes calldata _value) public {
vm.expectRevert(Unauthorized.selector); vm.expectRevert(Unauthorized.selector);
_optimismPortalInterop().setConfig(ConfigType.REMOVE_DEPENDENCY, _value); _optimismPortalInterop().setConfig(ConfigType.REMOVE_DEPENDENCY, _value);
} }
......
...@@ -396,7 +396,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init { ...@@ -396,7 +396,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init {
} }
/// @dev Tests that initialization sets the correct values and getters work when token address passed is 0. /// @dev Tests that initialization sets the correct values and getters work when token address passed is 0.
function test_initialize_customGasToken_zeroTokenAddress_succeeds() external { function test_initialize_customGasTokenWithZeroTokenAddress_succeeds() external {
cleanStorageAndInit(address(0)); cleanStorageAndInit(address(0));
(address addr, uint8 decimals) = systemConfig.gasPayingToken(); (address addr, uint8 decimals) = systemConfig.gasPayingToken();
...@@ -408,7 +408,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init { ...@@ -408,7 +408,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init {
} }
/// @dev Tests that initialization sets the correct values and getters work when token address is Constants.ETHER /// @dev Tests that initialization sets the correct values and getters work when token address is Constants.ETHER
function test_initialize_customGasToken_etherTokenAddress_succeeds() external { function test_initialize_customGasTokenWithEtherTokenAddress_succeeds() external {
cleanStorageAndInit(Constants.ETHER); cleanStorageAndInit(Constants.ETHER);
(address addr, uint8 decimals) = systemConfig.gasPayingToken(); (address addr, uint8 decimals) = systemConfig.gasPayingToken();
...@@ -420,7 +420,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init { ...@@ -420,7 +420,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init {
} }
/// @dev Tests that initialization fails if decimals are not 18. /// @dev Tests that initialization fails if decimals are not 18.
function test_initialize_customGasToken_wrongDecimals_fails() external { function test_initialize_customGasTokenWrongDecimals_fails() external {
vm.mockCall(address(token), abi.encodeCall(token.decimals, ()), abi.encode(8)); vm.mockCall(address(token), abi.encodeCall(token.decimals, ()), abi.encode(8));
vm.expectRevert("SystemConfig: bad decimals of gas paying token"); vm.expectRevert("SystemConfig: bad decimals of gas paying token");
...@@ -428,7 +428,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init { ...@@ -428,7 +428,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init {
} }
/// @dev Tests that initialization fails if name is too long. /// @dev Tests that initialization fails if name is too long.
function test_initialize_customGasToken_nameTooLong_fails() external { function test_initialize_customGasTokenNameTooLong_fails() external {
string memory name = new string(32); string memory name = new string(32);
name = string.concat(name, "a"); name = string.concat(name, "a");
...@@ -439,7 +439,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init { ...@@ -439,7 +439,7 @@ contract SystemConfig_Init_CustomGasToken is SystemConfig_Init {
} }
/// @dev Tests that initialization fails if symbol is too long. /// @dev Tests that initialization fails if symbol is too long.
function test_initialize_customGasToken_symbolTooLong_fails() external { function test_initialize_customGasTokenSymbolTooLong_fails() external {
string memory symbol = new string(33); string memory symbol = new string(33);
symbol = string.concat(symbol, "a"); symbol = string.concat(symbol, "a");
......
...@@ -328,7 +328,7 @@ contract CrossL2InboxTest is Test { ...@@ -328,7 +328,7 @@ contract CrossL2InboxTest is Test {
/// @dev Tests that the `executeMessage` function reverts when called with an identifier with a timestamp earlier /// @dev Tests that the `executeMessage` function reverts when called with an identifier with a timestamp earlier
/// than INTEROP_START timestamp /// than INTEROP_START timestamp
function testFuzz_executeMessage_invalidTimestamp_interopStart_reverts( function testFuzz_executeMessage_invalidTimestampInteropStart_reverts(
Identifier memory _id, Identifier memory _id,
address _target, address _target,
bytes calldata _message, bytes calldata _message,
...@@ -513,7 +513,7 @@ contract CrossL2InboxTest is Test { ...@@ -513,7 +513,7 @@ contract CrossL2InboxTest is Test {
/// @dev Tests that the `validateMessage` function reverts when called with an identifier with a timestamp earlier /// @dev Tests that the `validateMessage` function reverts when called with an identifier with a timestamp earlier
/// than INTEROP_START timestamp /// than INTEROP_START timestamp
function testFuzz_validateMessage_invalidTimestamp_interopStart_reverts( function testFuzz_validateMessage_invalidTimestampInteropStart_reverts(
Identifier memory _id, Identifier memory _id,
bytes32 _messageHash bytes32 _messageHash
) )
......
...@@ -104,7 +104,7 @@ contract L1BlockInteropTest is CommonTest { ...@@ -104,7 +104,7 @@ contract L1BlockInteropTest is CommonTest {
} }
/// @dev Tests that setting the gas paying token config as not the depositor reverts. /// @dev Tests that setting the gas paying token config as not the depositor reverts.
function testFuzz_setConfig_gasPayingToken_notDepositor_reverts( function testFuzz_setConfig_gasPayingTokenButNotDepositor_reverts(
address _token, address _token,
uint8 _decimals, uint8 _decimals,
bytes32 _name, bytes32 _name,
...@@ -132,13 +132,13 @@ contract L1BlockInteropTest is CommonTest { ...@@ -132,13 +132,13 @@ contract L1BlockInteropTest is CommonTest {
} }
/// @dev Tests that adding a dependency reverts if it's the chain's chain id /// @dev Tests that adding a dependency reverts if it's the chain's chain id
function test_setConfig_addDependency_chainChainId_reverts() public prankDepositor { function test_setConfig_addDependencyButChainChainId_reverts() public prankDepositor {
vm.expectRevert(AlreadyDependency.selector); vm.expectRevert(AlreadyDependency.selector);
_l1BlockInterop().setConfig(ConfigType.ADD_DEPENDENCY, StaticConfig.encodeAddDependency(block.chainid)); _l1BlockInterop().setConfig(ConfigType.ADD_DEPENDENCY, StaticConfig.encodeAddDependency(block.chainid));
} }
/// @dev Tests that adding a dependency already in the set reverts /// @dev Tests that adding a dependency already in the set reverts
function test_setConfig_addDependency_alreadyDependency_reverts(uint256 _chainId) public prankDepositor { function test_setConfig_addDependencyButAlreadyDependency_reverts(uint256 _chainId) public prankDepositor {
vm.assume(_chainId != block.chainid); vm.assume(_chainId != block.chainid);
_l1BlockInterop().setConfig(ConfigType.ADD_DEPENDENCY, StaticConfig.encodeAddDependency(_chainId)); _l1BlockInterop().setConfig(ConfigType.ADD_DEPENDENCY, StaticConfig.encodeAddDependency(_chainId));
...@@ -148,13 +148,13 @@ contract L1BlockInteropTest is CommonTest { ...@@ -148,13 +148,13 @@ contract L1BlockInteropTest is CommonTest {
} }
/// @dev Tests that setting the add dependency config as not the depositor reverts. /// @dev Tests that setting the add dependency config as not the depositor reverts.
function testFuzz_setConfig_addDependency_notDepositor_reverts(uint256 _chainId) public { function testFuzz_setConfig_addDependencyButNotDepositor_reverts(uint256 _chainId) public {
vm.expectRevert(NotDepositor.selector); vm.expectRevert(NotDepositor.selector);
_l1BlockInterop().setConfig(ConfigType.ADD_DEPENDENCY, StaticConfig.encodeAddDependency(_chainId)); _l1BlockInterop().setConfig(ConfigType.ADD_DEPENDENCY, StaticConfig.encodeAddDependency(_chainId));
} }
/// @dev Tests that setting the add dependency config when the dependency set size is too large reverts. /// @dev Tests that setting the add dependency config when the dependency set size is too large reverts.
function test_setConfig_addDependency_dependencySetSizeTooLarge_reverts() public prankDepositor { function test_setConfig_addDependencyButDependencySetSizeTooLarge_reverts() public prankDepositor {
for (uint256 i = 0; i < type(uint8).max; i++) { for (uint256 i = 0; i < type(uint8).max; i++) {
_l1BlockInterop().setConfig(ConfigType.ADD_DEPENDENCY, StaticConfig.encodeAddDependency(i)); _l1BlockInterop().setConfig(ConfigType.ADD_DEPENDENCY, StaticConfig.encodeAddDependency(i));
} }
...@@ -179,19 +179,19 @@ contract L1BlockInteropTest is CommonTest { ...@@ -179,19 +179,19 @@ contract L1BlockInteropTest is CommonTest {
} }
/// @dev Tests that setting the remove dependency config as not the depositor reverts. /// @dev Tests that setting the remove dependency config as not the depositor reverts.
function testFuzz_setConfig_removeDependency_notDepositor_reverts(uint256 _chainId) public { function testFuzz_setConfig_removeDependencyButNotDepositor_reverts(uint256 _chainId) public {
vm.expectRevert(NotDepositor.selector); vm.expectRevert(NotDepositor.selector);
_l1BlockInterop().setConfig(ConfigType.REMOVE_DEPENDENCY, StaticConfig.encodeRemoveDependency(_chainId)); _l1BlockInterop().setConfig(ConfigType.REMOVE_DEPENDENCY, StaticConfig.encodeRemoveDependency(_chainId));
} }
/// @dev Tests that setting the remove dependency config for the chain's chain ID reverts. /// @dev Tests that setting the remove dependency config for the chain's chain ID reverts.
function test_setConfig_removeDependency_chainChainId_reverts() public prankDepositor { function test_setConfig_removeDependencyButChainChainId_reverts() public prankDepositor {
vm.expectRevert(CantRemovedDependency.selector); vm.expectRevert(CantRemovedDependency.selector);
_l1BlockInterop().setConfig(ConfigType.REMOVE_DEPENDENCY, StaticConfig.encodeRemoveDependency(block.chainid)); _l1BlockInterop().setConfig(ConfigType.REMOVE_DEPENDENCY, StaticConfig.encodeRemoveDependency(block.chainid));
} }
/// @dev Tests that setting the remove dependency config for a chain ID that is not in the dependency set reverts. /// @dev Tests that setting the remove dependency config for a chain ID that is not in the dependency set reverts.
function testFuzz_setConfig_removeDependency_notDependency_reverts(uint256 _chainId) public prankDepositor { function testFuzz_setConfig_removeDependencyButNotDependency_reverts(uint256 _chainId) public prankDepositor {
vm.assume(_chainId != block.chainid); vm.assume(_chainId != block.chainid);
vm.expectRevert(NotDependency.selector); vm.expectRevert(NotDependency.selector);
...@@ -284,7 +284,7 @@ contract L1BlockInteropSetL1BlockValuesInterop_Test is L1BlockInteropTest { ...@@ -284,7 +284,7 @@ contract L1BlockInteropSetL1BlockValuesInterop_Test is L1BlockInteropTest {
contract L1BlockDepositsComplete_Test is L1BlockInteropTest { contract L1BlockDepositsComplete_Test is L1BlockInteropTest {
// @dev Tests that `depositsComplete` reverts if the caller is not the depositor. // @dev Tests that `depositsComplete` reverts if the caller is not the depositor.
function test_deposits_is_depositor_reverts(address _caller) external { function test_depositsComplete_notDepositor_reverts(address _caller) external {
vm.assume(_caller != _l1BlockInterop().DEPOSITOR_ACCOUNT()); vm.assume(_caller != _l1BlockInterop().DEPOSITOR_ACCOUNT());
vm.expectRevert(NotDepositor.selector); vm.expectRevert(NotDepositor.selector);
_l1BlockInterop().depositsComplete(); _l1BlockInterop().depositsComplete();
......
...@@ -226,7 +226,7 @@ contract L2CrossDomainMessenger_Test is Bridge_Initializer { ...@@ -226,7 +226,7 @@ contract L2CrossDomainMessenger_Test is Bridge_Initializer {
} }
/// @dev Tests that sendMessage succeeds with a custom gas token when the call value is zero. /// @dev Tests that sendMessage succeeds with a custom gas token when the call value is zero.
function test_sendMessage_customGasToken_noValue_succeeds() external { function test_sendMessage_customGasTokenButNoValue_succeeds() external {
// Mock the gasPayingToken function to return a custom gas token // Mock the gasPayingToken function to return a custom gas token
vm.mockCall(address(l1Block), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2))); vm.mockCall(address(l1Block), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2)));
...@@ -266,7 +266,7 @@ contract L2CrossDomainMessenger_Test is Bridge_Initializer { ...@@ -266,7 +266,7 @@ contract L2CrossDomainMessenger_Test is Bridge_Initializer {
} }
/// @dev Tests that the sendMessage reverts when call value is non-zero with custom gas token. /// @dev Tests that the sendMessage reverts when call value is non-zero with custom gas token.
function test_sendMessage_customGasToken_withValue_reverts() external { function test_sendMessage_customGasTokenWithValue_reverts() external {
// Mock the gasPayingToken function to return a custom gas token // Mock the gasPayingToken function to return a custom gas token
vm.mockCall(address(l1Block), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2))); vm.mockCall(address(l1Block), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2)));
...@@ -275,7 +275,7 @@ contract L2CrossDomainMessenger_Test is Bridge_Initializer { ...@@ -275,7 +275,7 @@ contract L2CrossDomainMessenger_Test is Bridge_Initializer {
} }
/// @dev Tests that the relayMessage succeeds with a custom gas token when the call value is zero. /// @dev Tests that the relayMessage succeeds with a custom gas token when the call value is zero.
function test_relayMessage_customGasToken_noValue_succeeds() external { function test_relayMessage_customGasTokenAndNoValue_succeeds() external {
// Mock the gasPayingToken function to return a custom gas token // Mock the gasPayingToken function to return a custom gas token
vm.mockCall(address(l1Block), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2))); vm.mockCall(address(l1Block), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2)));
...@@ -311,7 +311,7 @@ contract L2CrossDomainMessenger_Test is Bridge_Initializer { ...@@ -311,7 +311,7 @@ contract L2CrossDomainMessenger_Test is Bridge_Initializer {
/// @dev Tests that the relayMessage reverts when call value is non-zero with custom gas token. /// @dev Tests that the relayMessage reverts when call value is non-zero with custom gas token.
/// The L1CrossDomainMessenger `sendMessage` function cannot send value with a custom gas token. /// The L1CrossDomainMessenger `sendMessage` function cannot send value with a custom gas token.
function test_relayMessage_customGasToken_withValue_reverts() external virtual { function test_relayMessage_customGasTokenWithValue_reverts() external virtual {
// Mock the gasPayingToken function to return a custom gas token // Mock the gasPayingToken function to return a custom gas token
vm.mockCall(address(l1Block), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2))); vm.mockCall(address(l1Block), abi.encodeCall(systemConfig.gasPayingToken, ()), abi.encode(address(1), uint8(2)));
vm.expectRevert("CrossDomainMessenger: value must be zero unless message is from a system address"); vm.expectRevert("CrossDomainMessenger: value must be zero unless message is from a system address");
......
...@@ -114,14 +114,14 @@ contract L2GenesisTest is Test { ...@@ -114,14 +114,14 @@ contract L2GenesisTest is Test {
} }
/// @notice Tests the genesis predeploys setup using a temp file for the case where useInterop is false. /// @notice Tests the genesis predeploys setup using a temp file for the case where useInterop is false.
function test_genesis_predeploys_notUsingInterop() external { function test_genesisPredeploys_notUsingInterop_works() external {
string memory path = tmpfile(); string memory path = tmpfile();
_test_genesis_predeploys(path, false); _test_genesis_predeploys(path, false);
deleteFile(path); deleteFile(path);
} }
/// @notice Tests the genesis predeploys setup using a temp file for the case where useInterop is true. /// @notice Tests the genesis predeploys setup using a temp file for the case where useInterop is true.
function test_genesis_predeploys_usingInterop() external { function test_genesisPredeploys_usingInterop_works() external {
string memory path = tmpfile(); string memory path = tmpfile();
_test_genesis_predeploys(path, true); _test_genesis_predeploys(path, true);
deleteFile(path); deleteFile(path);
...@@ -154,7 +154,7 @@ contract L2GenesisTest is Test { ...@@ -154,7 +154,7 @@ contract L2GenesisTest is Test {
} }
/// @notice Tests the number of accounts in the genesis setup /// @notice Tests the number of accounts in the genesis setup
function test_allocs_size() external { function test_allocs_size_works() external {
withTempDump(_test_allocs_size); withTempDump(_test_allocs_size);
} }
......
...@@ -102,7 +102,7 @@ contract OptimismSuperchainERC20Test is Test { ...@@ -102,7 +102,7 @@ contract OptimismSuperchainERC20Test is Test {
} }
/// @notice Tests the `initialize` function reverts when the contract is already initialized. /// @notice Tests the `initialize` function reverts when the contract is already initialized.
function testFuzz_initializer_reverts( function testFuzz_initializer_invalidInitialization_reverts(
address _remoteToken, address _remoteToken,
string memory _name, string memory _name,
string memory _symbol, string memory _symbol,
...@@ -256,7 +256,7 @@ contract OptimismSuperchainERC20Test is Test { ...@@ -256,7 +256,7 @@ contract OptimismSuperchainERC20Test is Test {
/// @notice Tests that the `supportsInterface` function returns false for any other interface than the /// @notice Tests that the `supportsInterface` function returns false for any other interface than the
/// `ISuperchainERC20` one. /// `ISuperchainERC20` one.
function testFuzz_supportInterface_returnFalse(bytes4 _interfaceId) public view { function testFuzz_supportInterface_returnFalse_works(bytes4 _interfaceId) public view {
vm.assume(_interfaceId != type(IERC165).interfaceId); vm.assume(_interfaceId != type(IERC165).interfaceId);
vm.assume(_interfaceId != type(IERC20).interfaceId); vm.assume(_interfaceId != type(IERC20).interfaceId);
vm.assume(_interfaceId != type(IERC7802).interfaceId); vm.assume(_interfaceId != type(IERC7802).interfaceId);
......
...@@ -18,7 +18,7 @@ contract OptimismSuperchainERC20BeaconTest is Bridge_Initializer { ...@@ -18,7 +18,7 @@ contract OptimismSuperchainERC20BeaconTest is Bridge_Initializer {
} }
/// @notice Test that calling the implementation function returns the correct implementation address. /// @notice Test that calling the implementation function returns the correct implementation address.
function test_implementation_is_correct() public view { function test_implementation_isCorrect_works() public view {
IBeacon beacon = IBeacon(Predeploys.OPTIMISM_SUPERCHAIN_ERC20_BEACON); IBeacon beacon = IBeacon(Predeploys.OPTIMISM_SUPERCHAIN_ERC20_BEACON);
assertEq(beacon.implementation(), Predeploys.OPTIMISM_SUPERCHAIN_ERC20); assertEq(beacon.implementation(), Predeploys.OPTIMISM_SUPERCHAIN_ERC20);
} }
......
...@@ -34,7 +34,7 @@ contract PredeploysBaseTest is CommonTest { ...@@ -34,7 +34,7 @@ contract PredeploysBaseTest is CommonTest {
|| _addr == Predeploys.GOVERNANCE_TOKEN; || _addr == Predeploys.GOVERNANCE_TOKEN;
} }
function test_predeployToCodeNamespace() external pure { function test_predeployToCodeNamespace_works() external pure {
assertEq( assertEq(
address(0xc0D3C0d3C0d3C0D3c0d3C0d3c0D3C0d3c0d30000), address(0xc0D3C0d3C0d3C0D3c0d3C0d3c0D3C0d3c0d30000),
Predeploys.predeployToCodeNamespace(Predeploys.LEGACY_MESSAGE_PASSER) Predeploys.predeployToCodeNamespace(Predeploys.LEGACY_MESSAGE_PASSER)
......
...@@ -9,7 +9,7 @@ import { IEIP712 } from "src/universal/interfaces/IEIP712.sol"; ...@@ -9,7 +9,7 @@ import { IEIP712 } from "src/universal/interfaces/IEIP712.sol";
/// @title PreinstallsTest /// @title PreinstallsTest
contract PreinstallsTest is CommonTest { contract PreinstallsTest is CommonTest {
/// @dev The domain separator commits to the chainid of the chain /// @dev The domain separator commits to the chainid of the chain
function test_preinstall_permit2_domain_separator() external view { function test_preinstall_permit2DomainSeparator_works() external view {
bytes32 domainSeparator = IEIP712(Preinstalls.Permit2).DOMAIN_SEPARATOR(); bytes32 domainSeparator = IEIP712(Preinstalls.Permit2).DOMAIN_SEPARATOR();
bytes32 typeHash = bytes32 typeHash =
keccak256(abi.encodePacked("EIP712Domain(string name,uint256 chainId,address verifyingContract)")); keccak256(abi.encodePacked("EIP712Domain(string name,uint256 chainId,address verifyingContract)"));
...@@ -23,7 +23,7 @@ contract PreinstallsTest is CommonTest { ...@@ -23,7 +23,7 @@ contract PreinstallsTest is CommonTest {
// Warning the Permit2 domain separator as cached in the DeployPermit2.sol bytecode is incorrect. // Warning the Permit2 domain separator as cached in the DeployPermit2.sol bytecode is incorrect.
} }
function test_permit2_templating() external pure { function test_permit2_templating_works() external pure {
bytes memory customCode = Preinstalls.getPermit2Code(1234); bytes memory customCode = Preinstalls.getPermit2Code(1234);
assertNotEq(customCode.length, 0, "must have code"); assertNotEq(customCode.length, 0, "must have code");
assertEq(uint256(bytes32(Bytes.slice(customCode, 6945, 32))), uint256(1234), "expecting custom chain ID"); assertEq(uint256(bytes32(Bytes.slice(customCode, 6945, 32))), uint256(1234), "expecting custom chain ID");
......
...@@ -322,7 +322,7 @@ contract SuperchainWETH_Test is CommonTest { ...@@ -322,7 +322,7 @@ contract SuperchainWETH_Test is CommonTest {
} }
/// @notice Test that the internal mint function reverts to protect against accidentally changing the visibility. /// @notice Test that the internal mint function reverts to protect against accidentally changing the visibility.
function testFuzz_calling_internal_mint_function_reverts(address _caller, address _to, uint256 _amount) public { function testFuzz_calling_internalMintFunction_reverts(address _caller, address _to, uint256 _amount) public {
// Arrange // Arrange
bytes memory _calldata = abi.encodeWithSignature("_mint(address,uint256)", _to, _amount); // nosemgrep: bytes memory _calldata = abi.encodeWithSignature("_mint(address,uint256)", _to, _amount); // nosemgrep:
// sol-style-use-abi-encodecall // sol-style-use-abi-encodecall
...@@ -337,7 +337,7 @@ contract SuperchainWETH_Test is CommonTest { ...@@ -337,7 +337,7 @@ contract SuperchainWETH_Test is CommonTest {
} }
/// @notice Test that the mint function reverts to protect against accidentally changing the visibility. /// @notice Test that the mint function reverts to protect against accidentally changing the visibility.
function testFuzz_calling_mint_function_reverts(address _caller, address _to, uint256 _amount) public { function testFuzz_calling_mintFunction_reverts(address _caller, address _to, uint256 _amount) public {
// Arrange // Arrange
bytes memory _calldata = abi.encodeWithSignature("mint(address,uint256)", _to, _amount); // nosemgrep: bytes memory _calldata = abi.encodeWithSignature("mint(address,uint256)", _to, _amount); // nosemgrep:
// sol-style-use-abi-encodecall // sol-style-use-abi-encodecall
...@@ -352,7 +352,7 @@ contract SuperchainWETH_Test is CommonTest { ...@@ -352,7 +352,7 @@ contract SuperchainWETH_Test is CommonTest {
} }
/// @notice Test that the internal burn function reverts to protect against accidentally changing the visibility. /// @notice Test that the internal burn function reverts to protect against accidentally changing the visibility.
function testFuzz_calling_internal_burn_function_reverts(address _caller, address _from, uint256 _amount) public { function testFuzz_calling_internalBurnFunction_reverts(address _caller, address _from, uint256 _amount) public {
// Arrange // Arrange
bytes memory _calldata = abi.encodeWithSignature("_burn(address,uint256)", _from, _amount); // nosemgrep: bytes memory _calldata = abi.encodeWithSignature("_burn(address,uint256)", _from, _amount); // nosemgrep:
// sol-style-use-abi-encodecall // sol-style-use-abi-encodecall
...@@ -367,7 +367,7 @@ contract SuperchainWETH_Test is CommonTest { ...@@ -367,7 +367,7 @@ contract SuperchainWETH_Test is CommonTest {
} }
/// @notice Test that the burn function reverts to protect against accidentally changing the visibility. /// @notice Test that the burn function reverts to protect against accidentally changing the visibility.
function testFuzz_calling_burn_function_reverts(address _caller, address _from, uint256 _amount) public { function testFuzz_calling_burnFuunction_reverts(address _caller, address _from, uint256 _amount) public {
// Arrange // Arrange
bytes memory _calldata = abi.encodeWithSignature("burn(address,uint256)", _from, _amount); // nosemgrep: bytes memory _calldata = abi.encodeWithSignature("burn(address,uint256)", _from, _amount); // nosemgrep:
// sol-style-use-abi-encodecall // sol-style-use-abi-encodecall
......
...@@ -1509,7 +1509,7 @@ contract MIPS_Test is CommonTest { ...@@ -1509,7 +1509,7 @@ contract MIPS_Test is CommonTest {
assertEq(postState, outputState(expect), "unexpected post state"); assertEq(postState, outputState(expect), "unexpected post state");
} }
function test_mmap_succeeds_justWithinMemLimit() external { function test_mmap_justWithinMemLimit_succeeds() external {
uint32 insn = 0x0000000c; // syscall uint32 insn = 0x0000000c; // syscall
(bytes32 memRoot, bytes memory proof) = ffi.getCannonMemoryProof(0, insn); (bytes32 memRoot, bytes memory proof) = ffi.getCannonMemoryProof(0, insn);
...@@ -1538,7 +1538,7 @@ contract MIPS_Test is CommonTest { ...@@ -1538,7 +1538,7 @@ contract MIPS_Test is CommonTest {
assertEq(postState, outputState(expect), "unexpected post state"); assertEq(postState, outputState(expect), "unexpected post state");
} }
function test_mmap_fails() external { function test_step_mmap_fails() external {
uint32 insn = 0x0000000c; // syscall uint32 insn = 0x0000000c; // syscall
(bytes32 memRoot, bytes memory proof) = ffi.getCannonMemoryProof(0, insn); (bytes32 memRoot, bytes memory proof) = ffi.getCannonMemoryProof(0, insn);
...@@ -1692,7 +1692,7 @@ contract MIPS_Test is CommonTest { ...@@ -1692,7 +1692,7 @@ contract MIPS_Test is CommonTest {
mips.step(encodedState, proof, 0); mips.step(encodedState, proof, 0);
} }
function test_invalid_root_fails() external { function test_step_invalidRoot_fails() external {
uint32 insn = 0x0000000c; // syscall uint32 insn = 0x0000000c; // syscall
(IMIPS.State memory state, bytes memory proof) = constructMIPSState(0, insn, 0x4, 0); (IMIPS.State memory state, bytes memory proof) = constructMIPSState(0, insn, 0x4, 0);
state.registers[2] = 4246; // exit_group syscall state.registers[2] = 4246; // exit_group syscall
...@@ -1706,7 +1706,7 @@ contract MIPS_Test is CommonTest { ...@@ -1706,7 +1706,7 @@ contract MIPS_Test is CommonTest {
mips.step(encodeState(state), proof, 0); mips.step(encodeState(state), proof, 0);
} }
function test_invalid_root_different_leaf_fails() external { function test_step_invalidRootDifferentLeaf_fails() external {
uint32 insn = 0x0000000c; // syscall uint32 insn = 0x0000000c; // syscall
// Initialize the state, though for the proof, use valid proofs for the instruction // Initialize the state, though for the proof, use valid proofs for the instruction
......
...@@ -159,7 +159,7 @@ contract MIPS2_Test is CommonTest { ...@@ -159,7 +159,7 @@ contract MIPS2_Test is CommonTest {
/// This is useful to more easily debug non-forge tests. /// This is useful to more easily debug non-forge tests.
/// For example, in cannon/mipsevm/evm_test.go step input can be pulled here: /// For example, in cannon/mipsevm/evm_test.go step input can be pulled here:
/// https://github.com/ethereum-optimism/optimism/blob/1f64dd6db5561f3bb76ed1d1ffdaff0cde9b7c4b/cannon/mipsevm/evm_test.go#L80-L80 /// https://github.com/ethereum-optimism/optimism/blob/1f64dd6db5561f3bb76ed1d1ffdaff0cde9b7c4b/cannon/mipsevm/evm_test.go#L80-L80
function test_mips2_step_debug_succeeds() external { function test_step_debug_succeeds() external {
bytes memory input = bytes memory input =
hex"e14ced3200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000acab5a39c6f974b22302e96dcdef1815483eaf580639bb1ee7ac98267afac2bf1ac041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d0b75fb180daf48a79e3143a81fa7c3d90b000000000000000000000078fc2ffac2fd940100000000000080c8ffffffff006504aeffb6e08baf3f85da5476a9160fa8f9f188a722fdd29268b0cbaf596736ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb500000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007c6000000000000ffffffff000000000000000000000000f1f85ff4f1f85ff8506d442dbb3938f83eb60825a7ecbff2000010185e1a31f600050f0000000064a7c3d90be5acea102ad7bda149e0bfd0e7111c77d98b335645e665389becadf140ef999cc64fbd7f04799e85c97dadc5cca510bd5b3d97166d1aec28829f3dd43d8cf1f9358e4103b16d09d466e2c7c048ea3ba1aef3141e700270581aa0b75b50e34fc926bb2d83ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb500000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3021ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba85e58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a193440eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a1968ffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756afcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e0f9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a5f8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8923490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; hex"e14ced3200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000acab5a39c6f974b22302e96dcdef1815483eaf580639bb1ee7ac98267afac2bf1ac041d3ff12045b73c86e4ff95ff662a5eee82abdf44a2d0b75fb180daf48a79e3143a81fa7c3d90b000000000000000000000078fc2ffac2fd940100000000000080c8ffffffff006504aeffb6e08baf3f85da5476a9160fa8f9f188a722fdd29268b0cbaf596736ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb500000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007c6000000000000ffffffff000000000000000000000000f1f85ff4f1f85ff8506d442dbb3938f83eb60825a7ecbff2000010185e1a31f600050f0000000064a7c3d90be5acea102ad7bda149e0bfd0e7111c77d98b335645e665389becadf140ef999cc64fbd7f04799e85c97dadc5cca510bd5b3d97166d1aec28829f3dd43d8cf1f9358e4103b16d09d466e2c7c048ea3ba1aef3141e700270581aa0b75b50e34fc926bb2d83ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb500000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3021ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba85e58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a193440eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a1968ffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f839867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756afcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e0f9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a5f8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8923490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99cc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8beccda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d22733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd95a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3774df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618db8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
(bool success, bytes memory retVal) = address(mips).call(input); (bool success, bytes memory retVal) = address(mips).call(input);
...@@ -246,7 +246,7 @@ contract MIPS2_Test is CommonTest { ...@@ -246,7 +246,7 @@ contract MIPS2_Test is CommonTest {
} }
} }
function test_invalidThreadWitness_reverts() public { function test_step_invalidThreadWitness_reverts() public {
IMIPS2.State memory state; IMIPS2.State memory state;
IMIPS2.ThreadState memory thread; IMIPS2.ThreadState memory thread;
bytes memory memProof; bytes memory memProof;
...@@ -743,12 +743,12 @@ contract MIPS2_Test is CommonTest { ...@@ -743,12 +743,12 @@ contract MIPS2_Test is CommonTest {
} }
/// @dev Test asserting that an clock_gettime monotonic syscall reverts on an invalid memory proof /// @dev Test asserting that an clock_gettime monotonic syscall reverts on an invalid memory proof
function test_syscallClockGettimeMonotonicInvalidProof_reverts() public { function test_step_syscallClockGettimeMonotonicInvalidProof_reverts() public {
_test_syscallClockGettimeInvalidProof_reverts(sys.CLOCK_GETTIME_MONOTONIC_FLAG); _test_syscallClockGettimeInvalidProof_reverts(sys.CLOCK_GETTIME_MONOTONIC_FLAG);
} }
/// @dev Test asserting that an clock_gettime realtime syscall reverts on an invalid memory proof /// @dev Test asserting that an clock_gettime realtime syscall reverts on an invalid memory proof
function test_syscallClockGettimeRealtimeInvalidProof_reverts() public { function test_step_syscallClockGettimeRealtimeInvalidProof_reverts() public {
_test_syscallClockGettimeInvalidProof_reverts(sys.CLOCK_GETTIME_REALTIME_FLAG); _test_syscallClockGettimeInvalidProof_reverts(sys.CLOCK_GETTIME_REALTIME_FLAG);
} }
...@@ -1336,7 +1336,7 @@ contract MIPS2_Test is CommonTest { ...@@ -1336,7 +1336,7 @@ contract MIPS2_Test is CommonTest {
assertEq(postState, outputState(expect), "unexpected post state"); assertEq(postState, outputState(expect), "unexpected post state");
} }
function test_mmap_succeeds_simple() external { function test_mmap_simple_succeeds() external {
uint32 insn = 0x0000000c; // syscall uint32 insn = 0x0000000c; // syscall
(IMIPS2.State memory state, IMIPS2.ThreadState memory thread, bytes memory memProof) = (IMIPS2.State memory state, IMIPS2.ThreadState memory thread, bytes memory memProof) =
constructMIPSState(0, insn, 0x4, 0); constructMIPSState(0, insn, 0x4, 0);
...@@ -1368,7 +1368,7 @@ contract MIPS2_Test is CommonTest { ...@@ -1368,7 +1368,7 @@ contract MIPS2_Test is CommonTest {
assertEq(postState, outputState(expect), "unexpected post state"); assertEq(postState, outputState(expect), "unexpected post state");
} }
function test_mmap_succeeds_justWithinMemLimit() external { function test_mmap_justWithinMemLimit_succeeds() external {
uint32 insn = 0x0000000c; // syscall uint32 insn = 0x0000000c; // syscall
(IMIPS2.State memory state, IMIPS2.ThreadState memory thread, bytes memory memProof) = (IMIPS2.State memory state, IMIPS2.ThreadState memory thread, bytes memory memProof) =
constructMIPSState(0, insn, 0x4, 0); constructMIPSState(0, insn, 0x4, 0);
...@@ -1400,7 +1400,7 @@ contract MIPS2_Test is CommonTest { ...@@ -1400,7 +1400,7 @@ contract MIPS2_Test is CommonTest {
assertEq(postState, outputState(expect), "unexpected post state"); assertEq(postState, outputState(expect), "unexpected post state");
} }
function test_mmap_fails() external { function test_step_mmap_fails() external {
uint32 insn = 0x0000000c; // syscall uint32 insn = 0x0000000c; // syscall
(IMIPS2.State memory state, IMIPS2.ThreadState memory thread, bytes memory memProof) = (IMIPS2.State memory state, IMIPS2.ThreadState memory thread, bytes memory memProof) =
constructMIPSState(0, insn, 0x4, 0); constructMIPSState(0, insn, 0x4, 0);
......
...@@ -49,7 +49,7 @@ contract MIPS64Memory_Test is CommonTest { ...@@ -49,7 +49,7 @@ contract MIPS64Memory_Test is CommonTest {
} }
/// @dev Static unit test asserting that reads revert when a misaligned memory address is provided /// @dev Static unit test asserting that reads revert when a misaligned memory address is provided
function test_readInvalidAddress_reverts() external { function test_readMem_readInvalidAddress_reverts() external {
uint64 addr = 0x100; uint64 addr = 0x100;
uint64 word = 0x11_22_33_44_55_66_77_88; uint64 word = 0x11_22_33_44_55_66_77_88;
bytes32 root; bytes32 root;
...@@ -60,7 +60,7 @@ contract MIPS64Memory_Test is CommonTest { ...@@ -60,7 +60,7 @@ contract MIPS64Memory_Test is CommonTest {
} }
/// @dev Static unit test asserting that reads revert when an invalid proof is provided /// @dev Static unit test asserting that reads revert when an invalid proof is provided
function test_readInvalidProof_reverts() external { function test_readMem_readInvalidProof_reverts() external {
uint64 addr = 0x100; uint64 addr = 0x100;
uint64 word = 0x11_22_33_44_55_66_77_88; uint64 word = 0x11_22_33_44_55_66_77_88;
bytes32 root; bytes32 root;
...@@ -170,7 +170,7 @@ contract MIPS64Memory_Test is CommonTest { ...@@ -170,7 +170,7 @@ contract MIPS64Memory_Test is CommonTest {
} }
/// @dev Static unit test asserting that writes revert when a misaligned memory address is provided /// @dev Static unit test asserting that writes revert when a misaligned memory address is provided
function test_writeMemInvalidAddress_reverts() external { function test_writeMem_writeMemInvalidAddress_reverts() external {
bytes memory zeroProof; bytes memory zeroProof;
(, zeroProof) = ffi.getCannonMemory64Proof(0x100, 0); (, zeroProof) = ffi.getCannonMemory64Proof(0x100, 0);
vm.expectRevert(InvalidAddress.selector); vm.expectRevert(InvalidAddress.selector);
......
...@@ -391,7 +391,7 @@ contract PreimageOracle_LargePreimageProposals_Test is Test { ...@@ -391,7 +391,7 @@ contract PreimageOracle_LargePreimageProposals_Test is Test {
} }
/// @notice Gas snapshot for `addLeaves` /// @notice Gas snapshot for `addLeaves`
function test_addLeaves_gasSnapshot() public { function test_addLeaves_gasSnapshot_benchmark() public {
// Allocate the preimage data. // Allocate the preimage data.
bytes memory data = new bytes(136 * 500); bytes memory data = new bytes(136 * 500);
for (uint256 i; i < data.length; i++) { for (uint256 i; i < data.length; i++) {
......
...@@ -56,7 +56,7 @@ contract Blueprint_Test is Test { ...@@ -56,7 +56,7 @@ contract Blueprint_Test is Test {
// --- We start with the test cases from ERC-5202 --- // --- We start with the test cases from ERC-5202 ---
// An example (and trivial!) blueprint contract with no data section, whose initcode is just the STOP instruction. // An example (and trivial!) blueprint contract with no data section, whose initcode is just the STOP instruction.
function test_ERC5202_trivialBlueprint_succeeds() public view { function test_trivialBlueprint_erc5202_succeeds() public view {
bytes memory bytecode = hex"FE710000"; bytes memory bytecode = hex"FE710000";
Blueprint.Preamble memory preamble = blueprint.parseBlueprintPreamble(bytecode); Blueprint.Preamble memory preamble = blueprint.parseBlueprintPreamble(bytecode);
...@@ -67,7 +67,7 @@ contract Blueprint_Test is Test { ...@@ -67,7 +67,7 @@ contract Blueprint_Test is Test {
// An example blueprint contract whose initcode is the trivial STOP instruction and whose data // An example blueprint contract whose initcode is the trivial STOP instruction and whose data
// section contains the byte 0xFF repeated seven times. // section contains the byte 0xFF repeated seven times.
function test_ERC5202_blueprintWithDataSection_succeeds() public view { function test_blueprintWithDataSection_erc5202_succeeds() public view {
// Here, 0xFE71 is the magic header, 0x01 means version 0 + 1 length bit, 0x07 encodes the // Here, 0xFE71 is the magic header, 0x01 means version 0 + 1 length bit, 0x07 encodes the
// length in bytes of the data section. These are followed by the data section, and then the // length in bytes of the data section. These are followed by the data section, and then the
// initcode. For illustration, this code with delimiters would be: // initcode. For illustration, this code with delimiters would be:
...@@ -82,7 +82,7 @@ contract Blueprint_Test is Test { ...@@ -82,7 +82,7 @@ contract Blueprint_Test is Test {
// An example blueprint whose initcode is the trivial STOP instruction and whose data section // An example blueprint whose initcode is the trivial STOP instruction and whose data section
// contains the byte 0xFF repeated 256 times. // contains the byte 0xFF repeated 256 times.
function test_ERC5202_blueprintWithLargeDataSection_succeeds() public view { function test_blueprintWithLargeDataSection_erc5205_succeeds() public view {
// Delimited, this would be 0xFE71|02|0100|FF...FF|00 // Delimited, this would be 0xFE71|02|0100|FF...FF|00
bytes memory bytecode = bytes memory bytecode =
hex"FE71020100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00"; hex"FE71020100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00";
......
...@@ -88,7 +88,7 @@ contract TransientContextTest is Test { ...@@ -88,7 +88,7 @@ contract TransientContextTest is Test {
/// @param _slot Slot to test. /// @param _slot Slot to test.
/// @param _value1 Value to write to slot at call depth 0. /// @param _value1 Value to write to slot at call depth 0.
/// @param _value2 Value to write to slot at call depth 1. /// @param _value2 Value to write to slot at call depth 1.
function testFuzz_setGet_twice_sameDepth_succeeds(bytes32 _slot, uint256 _value1, uint256 _value2) public { function testFuzz_setGet_twiceSameDepth_succeeds(bytes32 _slot, uint256 _value1, uint256 _value2) public {
assertEq(TransientContext.callDepth(), 0); assertEq(TransientContext.callDepth(), 0);
testFuzz_set_succeeds(_slot, _value1); testFuzz_set_succeeds(_slot, _value1);
assertEq(TransientContext.get(_slot), _value1); assertEq(TransientContext.get(_slot), _value1);
...@@ -102,7 +102,7 @@ contract TransientContextTest is Test { ...@@ -102,7 +102,7 @@ contract TransientContextTest is Test {
/// @param _slot Slot to test. /// @param _slot Slot to test.
/// @param _value1 Value to write to slot at call depth 0. /// @param _value1 Value to write to slot at call depth 0.
/// @param _value2 Value to write to slot at call depth 1. /// @param _value2 Value to write to slot at call depth 1.
function testFuzz_setGet_twice_differentDepth_succeeds(bytes32 _slot, uint256 _value1, uint256 _value2) public { function testFuzz_setGet_twiceDifferentDepth_succeeds(bytes32 _slot, uint256 _value1, uint256 _value2) public {
assertEq(TransientContext.callDepth(), 0); assertEq(TransientContext.callDepth(), 0);
testFuzz_set_succeeds(_slot, _value1); testFuzz_set_succeeds(_slot, _value1);
assertEq(TransientContext.get(_slot), _value1); assertEq(TransientContext.get(_slot), _value1);
......
...@@ -30,7 +30,7 @@ contract DeployAuthSystemInput_Test is Test { ...@@ -30,7 +30,7 @@ contract DeployAuthSystemInput_Test is Test {
} }
} }
function test_getters_whenNotSet_revert() public { function test_getters_whenNotSet_reverts() public {
vm.expectRevert("DeployAuthSystemInput: threshold not set"); vm.expectRevert("DeployAuthSystemInput: threshold not set");
dasi.threshold(); dasi.threshold();
...@@ -38,7 +38,7 @@ contract DeployAuthSystemInput_Test is Test { ...@@ -38,7 +38,7 @@ contract DeployAuthSystemInput_Test is Test {
dasi.owners(); dasi.owners();
} }
function test_setters_ownerAlreadySet_revert() public { function test_setters_ownerAlreadySet_reverts() public {
dasi.set(dasi.owners.selector, owners); dasi.set(dasi.owners.selector, owners);
vm.expectRevert("DeployAuthSystemInput: owners already set"); vm.expectRevert("DeployAuthSystemInput: owners already set");
...@@ -135,7 +135,7 @@ contract DeployAuthSystem_Test is Test { ...@@ -135,7 +135,7 @@ contract DeployAuthSystem_Test is Test {
daso.checkOutput(); daso.checkOutput();
} }
function test_run_NullInput_reverts() public { function test_run_nullInput_reverts() public {
dasi.set(dasi.owners.selector, defaultOwners); dasi.set(dasi.owners.selector, defaultOwners);
dasi.set(dasi.threshold.selector, defaultThreshold); dasi.set(dasi.threshold.selector, defaultThreshold);
......
...@@ -44,7 +44,7 @@ contract DeployImplementationsInput_Test is Test { ...@@ -44,7 +44,7 @@ contract DeployImplementationsInput_Test is Test {
dii = new DeployImplementationsInput(); dii = new DeployImplementationsInput();
} }
function test_getters_whenNotSet_revert() public { function test_getters_whenNotSet_reverts() public {
vm.expectRevert("DeployImplementationsInput: not set"); vm.expectRevert("DeployImplementationsInput: not set");
dii.withdrawalDelaySeconds(); dii.withdrawalDelaySeconds();
...@@ -157,7 +157,7 @@ contract DeployImplementationsOutput_Test is Test { ...@@ -157,7 +157,7 @@ contract DeployImplementationsOutput_Test is Test {
assertEq(address(disputeGameFactoryImpl), address(dio.disputeGameFactoryImpl()), "950"); assertEq(address(disputeGameFactoryImpl), address(dio.disputeGameFactoryImpl()), "950");
} }
function test_getters_whenNotSet_revert() public { function test_getters_whenNotSet_reverts() public {
bytes memory expectedErr = "DeployUtils: zero address"; bytes memory expectedErr = "DeployUtils: zero address";
vm.expectRevert(expectedErr); vm.expectRevert(expectedErr);
...@@ -335,7 +335,7 @@ contract DeployImplementations_Test is Test { ...@@ -335,7 +335,7 @@ contract DeployImplementations_Test is Test {
assertEq(srDisputeGameFactoryImpl, address(dio.disputeGameFactoryImpl())); assertEq(srDisputeGameFactoryImpl, address(dio.disputeGameFactoryImpl()));
} }
function test_deployAtNonExistentRelease_reverts() public { function test_deploy_atNonExistentRelease_reverts() public {
string memory unknownRelease = "op-contracts/v0.0.0"; string memory unknownRelease = "op-contracts/v0.0.0";
dii.set(dii.release.selector, unknownRelease); dii.set(dii.release.selector, unknownRelease);
...@@ -390,7 +390,7 @@ contract DeployImplementations_Test is Test { ...@@ -390,7 +390,7 @@ contract DeployImplementations_Test is Test {
deployImplementations.deployDisputeGameFactoryImpl(dii, dio); deployImplementations.deployDisputeGameFactoryImpl(dii, dio);
} }
function test_noContractExistsAtRelease_reverts() public { function test_deploy_noContractExistsAtRelease_reverts() public {
string memory unknownRelease = "op-contracts/v1.3.0"; string memory unknownRelease = "op-contracts/v1.3.0";
dii.set(dii.release.selector, unknownRelease); dii.set(dii.release.selector, unknownRelease);
bytes memory expectedErr = bytes memory expectedErr =
......
...@@ -78,7 +78,7 @@ contract DeployOPChainInput_Test is Test { ...@@ -78,7 +78,7 @@ contract DeployOPChainInput_Test is Test {
assertEq(true, doi.allowCustomDisputeParameters(), "1200"); assertEq(true, doi.allowCustomDisputeParameters(), "1200");
} }
function test_getters_whenNotSet_revert() public { function test_getters_whenNotSet_reverts() public {
bytes memory expectedErr = "DeployOPChainInput: not set"; bytes memory expectedErr = "DeployOPChainInput: not set";
vm.expectRevert(expectedErr); vm.expectRevert(expectedErr);
...@@ -182,7 +182,7 @@ contract DeployOPChainOutput_Test is Test { ...@@ -182,7 +182,7 @@ contract DeployOPChainOutput_Test is Test {
// "1600"); // "1600");
} }
function test_getters_whenNotSet_revert() public { function test_getters_whenNotSet_reverts() public {
bytes memory expectedErr = "DeployUtils: zero address"; bytes memory expectedErr = "DeployUtils: zero address";
vm.expectRevert(expectedErr); vm.expectRevert(expectedErr);
...@@ -427,7 +427,7 @@ contract DeployOPChain_Test is DeployOPChain_TestBase { ...@@ -427,7 +427,7 @@ contract DeployOPChain_Test is DeployOPChain_TestBase {
return keccak256(abi.encode(_seed, _i)); return keccak256(abi.encode(_seed, _i));
} }
function testFuzz_run_memory_succeed(bytes32 _seed) public { function testFuzz_run_memory_succeeds(bytes32 _seed) public {
opChainProxyAdminOwner = address(uint160(uint256(hash(_seed, 0)))); opChainProxyAdminOwner = address(uint160(uint256(hash(_seed, 0))));
systemConfigOwner = address(uint160(uint256(hash(_seed, 1)))); systemConfigOwner = address(uint160(uint256(hash(_seed, 1))));
batcher = address(uint160(uint256(hash(_seed, 2)))); batcher = address(uint160(uint256(hash(_seed, 2))));
...@@ -541,7 +541,7 @@ contract DeployOPChain_Test is DeployOPChain_TestBase { ...@@ -541,7 +541,7 @@ contract DeployOPChain_Test is DeployOPChain_TestBase {
deployOPChain.run(doi, doo); deployOPChain.run(doi, doo);
} }
function test_customDisputeGame_customEnabled_doesNotRevert() public { function test_customDisputeGame_customEnabled_succeeds() public {
setDOI(); setDOI();
doi.set(doi.allowCustomDisputeParameters.selector, true); doi.set(doi.allowCustomDisputeParameters.selector, true);
doi.set(doi.disputeSplitDepth.selector, disputeSplitDepth + 1); doi.set(doi.disputeSplitDepth.selector, disputeSplitDepth + 1);
......
...@@ -24,7 +24,7 @@ contract DeploySuperchainInput_Test is Test { ...@@ -24,7 +24,7 @@ contract DeploySuperchainInput_Test is Test {
dsi = new DeploySuperchainInput(); dsi = new DeploySuperchainInput();
} }
function test_getters_whenNotSet_revert() public { function test_getters_whenNotSet_reverts() public {
vm.expectRevert("DeploySuperchainInput: superchainProxyAdminOwner not set"); vm.expectRevert("DeploySuperchainInput: superchainProxyAdminOwner not set");
dsi.superchainProxyAdminOwner(); dsi.superchainProxyAdminOwner();
...@@ -83,7 +83,7 @@ contract DeploySuperchainOutput_Test is Test { ...@@ -83,7 +83,7 @@ contract DeploySuperchainOutput_Test is Test {
assertEq(address(protocolVersionsProxy), address(dso.protocolVersionsProxy()), "500"); assertEq(address(protocolVersionsProxy), address(dso.protocolVersionsProxy()), "500");
} }
function test_getters_whenNotSet_revert() public { function test_getters_whenNotSet_reverts() public {
vm.expectRevert("DeployUtils: zero address"); vm.expectRevert("DeployUtils: zero address");
dso.superchainConfigImpl(); dso.superchainConfigImpl();
...@@ -194,7 +194,7 @@ contract DeploySuperchain_Test is Test { ...@@ -194,7 +194,7 @@ contract DeploySuperchain_Test is Test {
dso.checkOutput(dsi); dso.checkOutput(dsi);
} }
function test_run_NullInput_reverts() public { function test_run_nullInput_reverts() public {
// Set default values for all inputs. // Set default values for all inputs.
dsi.set(dsi.superchainProxyAdminOwner.selector, defaultProxyAdminOwner); dsi.set(dsi.superchainProxyAdminOwner.selector, defaultProxyAdminOwner);
dsi.set(dsi.protocolVersionsOwner.selector, defaultProtocolVersionsOwner); dsi.set(dsi.protocolVersionsOwner.selector, defaultProtocolVersionsOwner);
......
...@@ -42,7 +42,7 @@ contract DeployOwnershipTest is Test, DeployOwnership { ...@@ -42,7 +42,7 @@ contract DeployOwnershipTest is Test, DeployOwnership {
/// @dev Test the example Foundation Safe configurations, against the expected configuration, and /// @dev Test the example Foundation Safe configurations, against the expected configuration, and
/// check that they both have the same configuration. /// check that they both have the same configuration.
function test_exampleFoundationSafes() public { function test_exampleFoundationSafes_configuration_succeeds() public {
Safe upgradeSafe = Safe(payable(mustGetAddress("FoundationUpgradeSafe"))); Safe upgradeSafe = Safe(payable(mustGetAddress("FoundationUpgradeSafe")));
Safe operationsSafe = Safe(payable(mustGetAddress("FoundationOperationsSafe"))); Safe operationsSafe = Safe(payable(mustGetAddress("FoundationOperationsSafe")));
SafeConfig memory exampleFoundationConfig = _getExampleFoundationConfig(); SafeConfig memory exampleFoundationConfig = _getExampleFoundationConfig();
...@@ -57,7 +57,7 @@ contract DeployOwnershipTest is Test, DeployOwnership { ...@@ -57,7 +57,7 @@ contract DeployOwnershipTest is Test, DeployOwnership {
} }
/// @dev Test the example Security Council Safe configuration. /// @dev Test the example Security Council Safe configuration.
function test_exampleSecurityCouncilSafe() public { function test_exampleSecurityCouncilSafe_configuration_succeeds() public {
Safe securityCouncilSafe = Safe(payable(mustGetAddress("SecurityCouncilSafe"))); Safe securityCouncilSafe = Safe(payable(mustGetAddress("SecurityCouncilSafe")));
SecurityCouncilConfig memory exampleSecurityCouncilConfig = _getExampleCouncilConfig(); SecurityCouncilConfig memory exampleSecurityCouncilConfig = _getExampleCouncilConfig();
...@@ -96,7 +96,7 @@ contract DeployOwnershipTest is Test, DeployOwnership { ...@@ -96,7 +96,7 @@ contract DeployOwnershipTest is Test, DeployOwnership {
} }
/// @dev Test the example Guardian Safe configuration. /// @dev Test the example Guardian Safe configuration.
function test_exampleGuardianSafe() public view { function test_exampleGuardianSafe_configuration_succeeds() public view {
Safe guardianSafe = Safe(payable(mustGetAddress("GuardianSafe"))); Safe guardianSafe = Safe(payable(mustGetAddress("GuardianSafe")));
address[] memory owners = new address[](1); address[] memory owners = new address[](1);
owners[0] = mustGetAddress("SecurityCouncilSafe"); owners[0] = mustGetAddress("SecurityCouncilSafe");
......
...@@ -68,7 +68,7 @@ contract LivenessGuard_Getters_Test is LivenessGuard_TestInit { ...@@ -68,7 +68,7 @@ contract LivenessGuard_Getters_Test is LivenessGuard_TestInit {
contract LivenessGuard_CheckTx_TestFails is LivenessGuard_TestInit { contract LivenessGuard_CheckTx_TestFails is LivenessGuard_TestInit {
/// @dev Tests that the checkTransaction function reverts if the caller is not the Safe /// @dev Tests that the checkTransaction function reverts if the caller is not the Safe
function test_checkTransaction_callerIsNotSafe_revert() external { function test_checkTransaction_callerIsNotSafe_reverts() external {
vm.expectRevert("LivenessGuard: only Safe can call this function"); vm.expectRevert("LivenessGuard: only Safe can call this function");
livenessGuard.checkTransaction({ livenessGuard.checkTransaction({
_to: address(0), _to: address(0),
...@@ -123,7 +123,7 @@ contract LivenessGuard_CheckTx_Test is LivenessGuard_TestInit { ...@@ -123,7 +123,7 @@ contract LivenessGuard_CheckTx_Test is LivenessGuard_TestInit {
contract LivenessGuard_CheckAfterExecution_TestFails is LivenessGuard_TestInit { contract LivenessGuard_CheckAfterExecution_TestFails is LivenessGuard_TestInit {
/// @dev Tests that the checkAfterExecution function reverts if the caller is not the Safe /// @dev Tests that the checkAfterExecution function reverts if the caller is not the Safe
function test_checkAfterExecution_callerIsNotSafe_revert() external { function test_checkAfterExecution_callerIsNotSafe_reverts() external {
vm.expectRevert("LivenessGuard: only Safe can call this function"); vm.expectRevert("LivenessGuard: only Safe can call this function");
livenessGuard.checkAfterExecution(bytes32(0), false); livenessGuard.checkAfterExecution(bytes32(0), false);
} }
...@@ -229,7 +229,7 @@ contract LivenessGuard_FuzzOwnerManagement_Test is StdCheats, StdUtils, Liveness ...@@ -229,7 +229,7 @@ contract LivenessGuard_FuzzOwnerManagement_Test is StdCheats, StdUtils, Liveness
/// @dev Tests that the guard correctly manages the lastLive mapping when owners are added, removed, or swapped /// @dev Tests that the guard correctly manages the lastLive mapping when owners are added, removed, or swapped
/// forge-config: ciheavy.fuzz.runs = 8192 /// forge-config: ciheavy.fuzz.runs = 8192
function testFuzz_OwnerManagement_works( function testFuzz_ownerManagement_works(
uint256 initialOwners, uint256 initialOwners,
uint256 threshold, uint256 threshold,
OwnerChange[] memory changes OwnerChange[] memory changes
......
...@@ -488,7 +488,7 @@ contract LivenessModule_RemoveOwnersFuzz_Test is LivenessModule_TestInit { ...@@ -488,7 +488,7 @@ contract LivenessModule_RemoveOwnersFuzz_Test is LivenessModule_TestInit {
} }
/// @dev Tests if removing owners works correctly for various safe configurations and numbeers of live owners /// @dev Tests if removing owners works correctly for various safe configurations and numbeers of live owners
function testFuzz_removeOwners( function testFuzz_removeOwners_works(
uint256 _numOwners, uint256 _numOwners,
uint256 _minOwners, uint256 _minOwners,
uint256 _numLiveOwners, uint256 _numLiveOwners,
......
...@@ -24,7 +24,7 @@ contract DeployVariations_Test is CommonTest { ...@@ -24,7 +24,7 @@ contract DeployVariations_Test is CommonTest {
/// forge-config: ciheavy.fuzz.runs = 512 /// forge-config: ciheavy.fuzz.runs = 512
/// @dev It should be possible to enable Fault Proofs with any mix of CGT and Alt-DA. /// @dev It should be possible to enable Fault Proofs with any mix of CGT and Alt-DA.
function testFuzz_enableFaultProofs(bool _enableCGT, bool _enableAltDa) public virtual { function testFuzz_enableFaultProofs_succeeds(bool _enableCGT, bool _enableAltDa) public virtual {
enableAddOns(_enableCGT, _enableAltDa); enableAddOns(_enableCGT, _enableAltDa);
super.setUp(); super.setUp();
...@@ -32,7 +32,7 @@ contract DeployVariations_Test is CommonTest { ...@@ -32,7 +32,7 @@ contract DeployVariations_Test is CommonTest {
/// forge-config: ciheavy.fuzz.runs = 512 /// forge-config: ciheavy.fuzz.runs = 512
/// @dev It should be possible to enable Fault Proofs and Interop with any mix of CGT and Alt-DA. /// @dev It should be possible to enable Fault Proofs and Interop with any mix of CGT and Alt-DA.
function test_enableInteropAndFaultProofs(bool _enableCGT, bool _enableAltDa) public virtual { function test_enableInteropAndFaultProofs_succeeds(bool _enableCGT, bool _enableAltDa) public virtual {
enableAddOns(_enableCGT, _enableAltDa); enableAddOns(_enableCGT, _enableAltDa);
super.enableInterop(); super.enableInterop();
......
...@@ -47,11 +47,11 @@ contract OptimismMintableERC20_Test is Bridge_Initializer { ...@@ -47,11 +47,11 @@ contract OptimismMintableERC20_Test is Bridge_Initializer {
assertEq(L2Token.balanceOf(alice), 100); assertEq(L2Token.balanceOf(alice), 100);
} }
function test_allowance_permit2_max() external view { function test_allowance_permit2Max_works() external view {
assertEq(L2Token.allowance(alice, L2Token.PERMIT2()), type(uint256).max); assertEq(L2Token.allowance(alice, L2Token.PERMIT2()), type(uint256).max);
} }
function test_permit2_transferFrom() external { function test_permit2_transferFrom_succeeds() external {
vm.prank(address(l2StandardBridge)); vm.prank(address(l2StandardBridge));
L2Token.mint(alice, 100); L2Token.mint(alice, 100);
......
...@@ -952,7 +952,7 @@ contract Specification_Test is CommonTest { ...@@ -952,7 +952,7 @@ contract Specification_Test is CommonTest {
} }
/// @notice Ensures that there's an auth spec for every L1 contract function. /// @notice Ensures that there's an auth spec for every L1 contract function.
function testContractAuth() public { function test_contractAuth_works() public {
string[] memory pathExcludes = new string[](6); string[] memory pathExcludes = new string[](6);
pathExcludes[0] = "src/dispute/interfaces/*"; pathExcludes[0] = "src/dispute/interfaces/*";
pathExcludes[1] = "src/dispute/lib/*"; pathExcludes[1] = "src/dispute/lib/*";
...@@ -1002,7 +1002,7 @@ contract Specification_Test is CommonTest { ...@@ -1002,7 +1002,7 @@ contract Specification_Test is CommonTest {
} }
/// @notice Ensures that the DeputyGuardian is authorized to take all Guardian actions. /// @notice Ensures that the DeputyGuardian is authorized to take all Guardian actions.
function testDeputyGuardianAuth() public view { function test_deputyGuardianAuth_works() public view {
assertEq(specsByRole[Role.DEPUTYGUARDIAN].length, specsByRole[Role.GUARDIAN].length); assertEq(specsByRole[Role.DEPUTYGUARDIAN].length, specsByRole[Role.GUARDIAN].length);
assertEq(specsByRole[Role.DEPUTYGUARDIAN].length, 5); assertEq(specsByRole[Role.DEPUTYGUARDIAN].length, 5);
......
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