Skip to content

Commit

Permalink
make solhint
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmorphl2 committed May 15, 2024
1 parent a198171 commit 30df2b2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 33 deletions.
1 change: 0 additions & 1 deletion contracts/contracts/test/L1ERC721Gateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {ERC721TokenReceiver} from "@rari-capital/solmate/src/tokens/ERC721.sol";

import {AddressAliasHelper} from "../libraries/common/AddressAliasHelper.sol";
import {ICrossDomainMessenger} from "../libraries/ICrossDomainMessenger.sol";
import {L2ERC721Gateway} from "../l2/gateways/L2ERC721Gateway.sol";
import {IL2ERC721Gateway} from "../l2/gateways/IL2ERC721Gateway.sol";
import {IL1ERC721Gateway} from "../l1/gateways/IL1ERC721Gateway.sol";
import {L1ERC721Gateway} from "../l1/gateways/L1ERC721Gateway.sol";
Expand Down
18 changes: 9 additions & 9 deletions contracts/contracts/test/base/CommonTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ import {Types} from "../../libraries/common/Types.sol";
import {EmptyContract} from "../../misc/EmptyContract.sol";

contract CommonTest is DSTestPlus, MockTree {
address immutable NON_ZERO_ADDRESS = address(1);
address public immutable NON_ZERO_ADDRESS = address(1);

ProxyAdmin proxyAdmin;
EmptyContract emptyContract;
ProxyAdmin public proxyAdmin;
EmptyContract public emptyContract;

address alice = address(128);
address bob = address(256);
address multisig = address(512);
address public alice = address(128);
address public bob = address(256);
address public multisig = address(512);

FFIInterface ffi;
FFIInterface public ffi;

bytes32 PROXY_OWNER_KEY =
bytes32 public PROXY_OWNER_KEY =
0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
bytes32 PROXY_IMPLEMENTATION_KEY =
bytes32 public PROXY_IMPLEMENTATION_KEY =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

uint256 public finalizationPeriodSeconds = 2;
Expand Down
20 changes: 10 additions & 10 deletions contracts/contracts/test/base/L1GatewayBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,36 @@ import {Predeploys} from "../../libraries/constants/Predeploys.sol";

contract L1GatewayBaseTest is L1MessageBaseTest {
// L1GatewayRouter config
L1GatewayRouter l1GatewayRouter;
L1GatewayRouter public l1GatewayRouter;

// L1ETHGateway config
L1ETHGateway l1ETHGateway;
L1ETHGateway public l1ETHGateway;

uint256 internal constant extraValue = 1e17;

// L1StandardERC20Gateway config
L1StandardERC20Gateway l1StandardERC20Gateway;
L1StandardERC20Gateway public l1StandardERC20Gateway;

// L1CustomERC20Gateway config
L1CustomERC20Gateway l1CustomERC20Gateway;
L1CustomERC20Gateway public l1CustomERC20Gateway;

bool internal revertOnReceive;

// MorphStandardERC20 config
MorphStandardERC20 template;
MorphStandardERC20 public template;

// MorphStandardERC20Factory config
MorphStandardERC20Factory factory;
MorphStandardERC20Factory public factory;

// L1ERC721Gateway config
L1ERC721Gateway l1ERC721Gateway;
L1ERC721Gateway public l1ERC721Gateway;

// L1ERC1155Gateway config
L1ERC1155Gateway l1ERC1155Gateway;
L1ERC1155Gateway public l1ERC1155Gateway;

// L1WETHGateway config
L1WETHGateway l1WETHGateway;
address l2Messenger = Predeploys.L2_CROSS_DOMAIN_MESSENGER;
L1WETHGateway public l1WETHGateway;
address public l2Messenger = Predeploys.L2_CROSS_DOMAIN_MESSENGER;

receive() external payable {
if (revertOnReceive) {
Expand Down
18 changes: 8 additions & 10 deletions contracts/contracts/test/base/L1MessageBase.t.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.24;

import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

import {CommonTest} from "./CommonTest.t.sol";
import {Predeploys} from "../../libraries/constants/Predeploys.sol";
import {Whitelist} from "../../libraries/common/Whitelist.sol";
import {IL1CrossDomainMessenger} from "../../l1/L1CrossDomainMessenger.sol";
import {L1CrossDomainMessenger} from "../../l1/L1CrossDomainMessenger.sol";
import {L1MessageQueueWithGasPriceOracle} from "../../l1/rollup/L1MessageQueueWithGasPriceOracle.sol";
import {L1Staking} from "../../l1/staking/L1Staking.sol";
Expand All @@ -16,8 +14,8 @@ import {MockZkEvmVerifier} from "../../mock/MockZkEvmVerifier.sol";

contract L1MessageBaseTest is CommonTest {
// Staking config
L1Staking l1Staking;
L1Staking l1StakingImpl;
L1Staking public l1Staking;
L1Staking public l1StakingImpl;

uint256 public STAKING_VALUE = 1e18; // 1 eth
uint256 public LOCK_BLOCKS = 3;
Expand All @@ -26,19 +24,19 @@ contract L1MessageBaseTest is CommonTest {
uint32 public defaultGasLimitRemove = 10000000;

// Rollup config
Rollup rollup;
Rollup rollupImpl;
MockZkEvmVerifier verifier = new MockZkEvmVerifier();
Rollup public rollup;
Rollup public rollupImpl;
MockZkEvmVerifier public verifier = new MockZkEvmVerifier();

uint256 public proofWindow = 100;
uint256 public maxNumTxInChunk = 10;
uint64 public layer2ChainID = 53077;

// whitelist config
Whitelist whitelistChecker;
Whitelist public whitelistChecker;

// L1MessageQueueWithGasPriceOracle config
L1MessageQueueWithGasPriceOracle l1MessageQueueWithGasPriceOracle;
L1MessageQueueWithGasPriceOracle public l1MessageQueueWithGasPriceOracle;
uint256 public l1MessageQueueMaxGasLimit = 100000000;
uint32 public defaultGasLimit = 1000000;

Expand Down
3 changes: 1 addition & 2 deletions contracts/contracts/test/base/L2MessageBase.t.sol
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.24;

import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

import {CommonTest} from "./CommonTest.t.sol";
import {Predeploys} from "../../libraries/constants/Predeploys.sol";
import {L2CrossDomainMessenger} from "../../l2/L2CrossDomainMessenger.sol";
import {L2ToL1MessagePasser} from "../../l2/system/L2ToL1MessagePasser.sol";
import {GasPriceOracle} from "../../l2/system/GasPriceOracle.sol";
import {EmptyContract} from "../../misc/EmptyContract.sol";

contract L2MessageBaseTest is CommonTest {
// L2ToL1MessagePasser config
Expand Down
2 changes: 1 addition & 1 deletion contracts/contracts/test/base/L2StakingBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity =0.8.24;

import "forge-std/console2.sol";
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

import {Predeploys} from "../../libraries/constants/Predeploys.sol";
import {Types} from "../../libraries/common/Types.sol";
Expand Down

0 comments on commit 30df2b2

Please sign in to comment.