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

fix(ctb): clear most linting warnings (#3024)

Clears out a majority of linting warnings. Remaining warnings are
already being cleared as part of other open PRs.
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent eb0405cb
---
'@eth-optimism/contracts-bedrock': patch
---
Clears most contract linting warnings
......@@ -10,6 +10,9 @@
"modifier-name-mixedcase": "error",
"ordering": "warn",
"avoid-low-level-calls": "off",
"no-inline-assembly": "off",
"no-empty-blocks": "off",
"not-rely-on-time": "off",
"event-name-camelcase": "off",
"reason-string": "off",
"avoid-tx-origin": "off",
......
......@@ -63,26 +63,31 @@ contract L2OutputOracle is OwnableUpgradeable, Semver {
/**
* @notice The interval in L2 blocks at which checkpoints must be submitted.
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable SUBMISSION_INTERVAL;
/**
* @notice The number of blocks in the chain before the first block in this contract.
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable HISTORICAL_TOTAL_BLOCKS;
/**
* @notice The number of the first L2 block recorded in this contract.
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable STARTING_BLOCK_NUMBER;
/**
* @notice The timestamp of the first L2 block recorded in this contract.
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable STARTING_TIMESTAMP;
/**
* @notice The time between L2 blocks in seconds.
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable L2_BLOCK_TIME;
/**
......
......@@ -56,11 +56,13 @@ contract OptimismPortal is Initializable, ResourceMetering, Semver {
/**
* @notice Minimum time (in seconds) that must elapse before a withdrawal can be finalized.
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable FINALIZATION_PERIOD_SECONDS;
/**
* @notice Address of the L2OutputOracle.
*/
// solhint-disable-next-line var-name-mixedcase
L2OutputOracle public immutable L2_ORACLE;
/**
......
......@@ -67,6 +67,7 @@ abstract contract ResourceMetering is Initializable {
* @notice Sets initial resource parameter values. This function must either be called by the
* initializer function of an upgradeable child contract.
*/
// solhint-disable-next-line func-name-mixedcase
function __ResourceMetering_init() internal onlyInitializing {
params = ResourceParams({
prevBaseFee: INITIAL_BASE_FEE,
......
......@@ -35,6 +35,7 @@ contract L1BlockNumber is Semver {
/**
* @notice Returns the L1 block number.
*/
// solhint-disable-next-line no-complex-fallback
fallback() external payable {
uint256 l1BlockNumber = getL1BlockNumber();
assembly {
......
......@@ -2,9 +2,9 @@
pragma solidity ^0.8.9;
/**
* @title iL1ChugSplashDeployer
* @title IL1ChugSplashDeployer
*/
interface iL1ChugSplashDeployer {
interface IL1ChugSplashDeployer {
function isUpgrading() external view returns (bool);
}
......@@ -58,7 +58,7 @@ contract L1ChugSplashProxy {
// L1ChugSplashDeployer contract and Solidity will throw errors if we do a normal call and
// it turns out that it isn't the right type of contract.
(bool success, bytes memory returndata) = owner.staticcall(
abi.encodeWithSelector(iL1ChugSplashDeployer.isUpgrading.selector)
abi.encodeWithSelector(IL1ChugSplashDeployer.isUpgrading.selector)
);
// If the call was unsuccessful then we assume that there's no "isUpgrading" method and we
......
......@@ -40,6 +40,7 @@ contract ResolvedDelegateProxy {
/**
* @notice Fallback, performs a delegatecall to the resolved implementation address.
*/
// solhint-disable-next-line no-complex-fallback
fallback() external payable {
address target = addressManager[address(this)].getAddress(
(implementationName[address(this)])
......
......@@ -22,7 +22,7 @@ import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable
import { ResolvedDelegateProxy } from "../legacy/ResolvedDelegateProxy.sol";
import { AddressManager } from "../legacy/AddressManager.sol";
import { L1ChugSplashProxy } from "../legacy/L1ChugSplashProxy.sol";
import { iL1ChugSplashDeployer } from "../legacy/L1ChugSplashProxy.sol";
import { IL1ChugSplashDeployer } from "../legacy/L1ChugSplashProxy.sol";
contract CommonTest is Test {
address alice = address(128);
......@@ -341,7 +341,7 @@ contract Bridge_Initializer is Messenger_Initializer {
L1ChugSplashProxy proxy = new L1ChugSplashProxy(multisig);
vm.mockCall(
multisig,
abi.encodeWithSelector(iL1ChugSplashDeployer.isUpgrading.selector),
abi.encodeWithSelector(IL1ChugSplashDeployer.isUpgrading.selector),
abi.encode(true)
);
vm.startPrank(multisig);
......
......@@ -309,6 +309,7 @@ abstract contract CrossDomainMessenger is
* detailed information about what this block list can and
* cannot be used for.
*/
// solhint-disable-next-line func-name-mixedcase
function __CrossDomainMessenger_init(
address _otherMessenger,
address[] memory _blockedSystemAddresses
......
......@@ -9,16 +9,19 @@ contract Semver {
/**
* @notice Contract version number (major).
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable MAJOR_VERSION;
/**
* @notice Contract version number (minor).
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable MINOR_VERSION;
/**
* @notice Contract version number (patch).
*/
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable PATCH_VERSION;
/**
......
......@@ -368,6 +368,7 @@ abstract contract StandardBridge is Initializable {
* @param _messenger Address of CrossDomainMessenger on this network.
* @param _otherBridge Address of the other StandardBridge contract.
*/
// solhint-disable-next-line func-name-mixedcase
function __StandardBridge_init(address payable _messenger, address payable _otherBridge)
internal
onlyInitializing
......
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