diff --git a/ethereum/contracts/bridge/L1ERC20Bridge.sol b/ethereum/contracts/bridge/L1ERC20Bridge.sol index 5077aa839..c0b4726e1 100644 --- a/ethereum/contracts/bridge/L1ERC20Bridge.sol +++ b/ethereum/contracts/bridge/L1ERC20Bridge.sol @@ -2,21 +2,24 @@ pragma solidity 0.8.20; -import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; - -import "./interfaces/IL1BridgeLegacy.sol"; -import "./interfaces/IL1Bridge.sol"; -import "./interfaces/IL2Bridge.sol"; -import "./interfaces/IL2ERC20Bridge.sol"; - -import "./libraries/BridgeInitializationHelper.sol"; - -import "../zksync/interfaces/IZkSync.sol"; -import "../common/libraries/UnsafeBytes.sol"; -import "../common/libraries/L2ContractHelper.sol"; -import "../common/ReentrancyGuard.sol"; -import "../vendor/AddressAliasHelper.sol"; +import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +import {IL1BridgeLegacy} from "./interfaces/IL1BridgeLegacy.sol"; +import {IL1Bridge} from "./interfaces/IL1Bridge.sol"; +import {IL2Bridge} from "./interfaces/IL2Bridge.sol"; +import {IL2ERC20Bridge} from "./interfaces/IL2ERC20Bridge.sol"; + +import {BridgeInitializationHelper} from "./libraries/BridgeInitializationHelper.sol"; + +import {IZkSync} from "../zksync/interfaces/IZkSync.sol"; +import {TxStatus} from "../zksync/interfaces/IMailbox.sol"; +import {L2Message} from "../zksync/Storage.sol"; +import {UnsafeBytes} from "../common/libraries/UnsafeBytes.sol"; +import {L2ContractHelper} from "../common/libraries/L2ContractHelper.sol"; +import {ReentrancyGuard} from "../common/ReentrancyGuard.sol"; +import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev diff --git a/ethereum/contracts/bridge/L1WethBridge.sol b/ethereum/contracts/bridge/L1WethBridge.sol index 6d2839458..2bbbbc58b 100644 --- a/ethereum/contracts/bridge/L1WethBridge.sol +++ b/ethereum/contracts/bridge/L1WethBridge.sol @@ -2,21 +2,25 @@ pragma solidity 0.8.20; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "./interfaces/IL1Bridge.sol"; -import "./interfaces/IL2WethBridge.sol"; -import "./interfaces/IL2Bridge.sol"; -import "./interfaces/IWETH9.sol"; -import "../zksync/interfaces/IZkSync.sol"; +import {IL1Bridge} from "./interfaces/IL1Bridge.sol"; +import {IL2WethBridge} from "./interfaces/IL2WethBridge.sol"; +import {IL2Bridge} from "./interfaces/IL2Bridge.sol"; +import {IWETH9} from "./interfaces/IWETH9.sol"; +import {IZkSync} from "../zksync/interfaces/IZkSync.sol"; -import "./libraries/BridgeInitializationHelper.sol"; +import {BridgeInitializationHelper} from "./libraries/BridgeInitializationHelper.sol"; -import "../common/libraries/UnsafeBytes.sol"; -import "../common/ReentrancyGuard.sol"; -import "../common/libraries/L2ContractHelper.sol"; +import {IMailbox} from "../zksync/interfaces/IMailbox.sol"; +import {L2Message} from "../zksync/Storage.sol"; + +import {UnsafeBytes} from "../common/libraries/UnsafeBytes.sol"; +import {ReentrancyGuard} from "../common/ReentrancyGuard.sol"; +import {L2ContractHelper} from "../common/libraries/L2ContractHelper.sol"; import {L2_ETH_TOKEN_SYSTEM_CONTRACT_ADDR} from "../common/L2ContractAddresses.sol"; -import "../vendor/AddressAliasHelper.sol"; +import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev diff --git a/ethereum/contracts/dev-contracts/test/L1ERC20BridgeTest.sol b/ethereum/contracts/dev-contracts/test/L1ERC20BridgeTest.sol index dea0275d3..500343e17 100644 --- a/ethereum/contracts/dev-contracts/test/L1ERC20BridgeTest.sol +++ b/ethereum/contracts/dev-contracts/test/L1ERC20BridgeTest.sol @@ -3,6 +3,8 @@ pragma solidity 0.8.20; import "../../bridge/L1ERC20Bridge.sol"; +import {IMailbox} from "../../zksync/interfaces/IMailbox.sol"; + /// @author Matter Labs contract L1ERC20BridgeTest is L1ERC20Bridge { diff --git a/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol b/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol index 71e57badc..47ab18a3d 100644 --- a/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol +++ b/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol @@ -2,11 +2,12 @@ pragma solidity 0.8.20; -import "../zksync/facets/Base.sol"; -import "../zksync/interfaces/IMailbox.sol"; -import "../zksync/interfaces/IVerifier.sol"; -import "../common/libraries/L2ContractHelper.sol"; -import "../zksync/libraries/TransactionValidator.sol"; +import {Base} from "../zksync/facets/Base.sol"; +import {IMailbox} from "../zksync/interfaces/IMailbox.sol"; +import {VerifierParams} from "../zksync/Storage.sol"; +import {IVerifier} from "../zksync/interfaces/IVerifier.sol"; +import {L2ContractHelper} from "../common/libraries/L2ContractHelper.sol"; +import {TransactionValidator} from "../zksync/libraries/TransactionValidator.sol"; import {SYSTEM_UPGRADE_L2_TX_TYPE, MAX_NEW_FACTORY_DEPS, MAX_ALLOWED_PROTOCOL_VERSION_DELTA} from "../zksync/Config.sol"; /// @author Matter Labs diff --git a/ethereum/contracts/upgrades/DefaultUpgrade.sol b/ethereum/contracts/upgrades/DefaultUpgrade.sol index cd2bdd29f..df453ec7a 100644 --- a/ethereum/contracts/upgrades/DefaultUpgrade.sol +++ b/ethereum/contracts/upgrades/DefaultUpgrade.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.20; -import "../zksync/libraries/Diamond.sol"; -import "./BaseZkSyncUpgrade.sol"; +import {Diamond} from "../zksync/libraries/Diamond.sol"; +import {BaseZkSyncUpgrade} from "./BaseZkSyncUpgrade.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev diff --git a/ethereum/contracts/zksync/Storage.sol b/ethereum/contracts/zksync/Storage.sol index 1af0eaa86..10da44a0e 100644 --- a/ethereum/contracts/zksync/Storage.sol +++ b/ethereum/contracts/zksync/Storage.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.20; -import "./../zksync/interfaces/IVerifier.sol"; -import "./libraries/PriorityQueue.sol"; +import {IVerifier} from "./../zksync/interfaces/IVerifier.sol"; +import {PriorityQueue} from "./libraries/PriorityQueue.sol"; /// @notice Indicates whether an upgrade is initiated and if yes what type /// @param None Upgrade is NOT initiated diff --git a/ethereum/contracts/zksync/ValidatorTimelock.sol b/ethereum/contracts/zksync/ValidatorTimelock.sol index c33b099bc..cdd9ac0ed 100644 --- a/ethereum/contracts/zksync/ValidatorTimelock.sol +++ b/ethereum/contracts/zksync/ValidatorTimelock.sol @@ -2,9 +2,9 @@ pragma solidity 0.8.20; -import "@openzeppelin/contracts/access/Ownable2Step.sol"; -import "./libraries/LibMap.sol"; -import "./interfaces/IExecutor.sol"; +import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; +import {LibMap} from "./libraries/LibMap.sol"; +import {IExecutor} from "./interfaces/IExecutor.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev diff --git a/ethereum/contracts/zksync/libraries/Diamond.sol b/ethereum/contracts/zksync/libraries/Diamond.sol index 5d2540851..a3038b373 100644 --- a/ethereum/contracts/zksync/libraries/Diamond.sol +++ b/ethereum/contracts/zksync/libraries/Diamond.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.20; -import "@openzeppelin/contracts/utils/math/SafeCast.sol"; -import "../../common/libraries/UncheckedMath.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {UncheckedMath} from "../../common/libraries/UncheckedMath.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev diff --git a/ethereum/contracts/zksync/libraries/Merkle.sol b/ethereum/contracts/zksync/libraries/Merkle.sol index 57c1e0970..b212595a0 100644 --- a/ethereum/contracts/zksync/libraries/Merkle.sol +++ b/ethereum/contracts/zksync/libraries/Merkle.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.20; -import "../../common/libraries/UncheckedMath.sol"; +import {UncheckedMath} from "../../common/libraries/UncheckedMath.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev diff --git a/zksync/contracts/bridge/L2ERC20Bridge.sol b/zksync/contracts/bridge/L2ERC20Bridge.sol index b044160fb..ec229ab53 100644 --- a/zksync/contracts/bridge/L2ERC20Bridge.sol +++ b/zksync/contracts/bridge/L2ERC20Bridge.sol @@ -2,15 +2,15 @@ pragma solidity 0.8.20; -import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; -import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; +import {BeaconProxy} from "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; +import {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; -import "./interfaces/IL1Bridge.sol"; -import "./interfaces/IL2Bridge.sol"; -import "./interfaces/IL2StandardToken.sol"; +import {IL1Bridge} from "./interfaces/IL1Bridge.sol"; +import {IL2Bridge} from "./interfaces/IL2Bridge.sol"; +import {IL2Bridge} from "./interfaces/IL2StandardToken.sol"; -import "./L2StandardERC20.sol"; -import "../vendor/AddressAliasHelper.sol"; +import {L2StandardERC20} from "./L2StandardERC20.sol"; +import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol"; import {L2ContractHelper, DEPLOYER_SYSTEM_CONTRACT, IContractDeployer} from "../L2ContractHelper.sol"; import {SystemContractsCaller} from "../SystemContractsCaller.sol"; diff --git a/zksync/contracts/bridge/L2StandardERC20.sol b/zksync/contracts/bridge/L2StandardERC20.sol index d95f397f3..99dc2351e 100644 --- a/zksync/contracts/bridge/L2StandardERC20.sol +++ b/zksync/contracts/bridge/L2StandardERC20.sol @@ -2,11 +2,11 @@ pragma solidity 0.8.20; -import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; -import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; -import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol"; +import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; +import {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; +import {ERC1967Upgrade} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol"; -import "./interfaces/IL2StandardToken.sol"; +import {IL2StandardToken} from "./interfaces/IL2StandardToken.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev diff --git a/zksync/contracts/bridge/L2Weth.sol b/zksync/contracts/bridge/L2Weth.sol index ef72b8cfa..294eaeff2 100644 --- a/zksync/contracts/bridge/L2Weth.sol +++ b/zksync/contracts/bridge/L2Weth.sol @@ -2,10 +2,10 @@ pragma solidity 0.8.20; -import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; +import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; -import "./interfaces/IL2Weth.sol"; -import "./interfaces/IL2StandardToken.sol"; +import {IL2Weth} from "./interfaces/IL2Weth.sol"; +import {IL2StandardToken} from "./interfaces/IL2StandardToken.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev diff --git a/zksync/contracts/bridge/L2WethBridge.sol b/zksync/contracts/bridge/L2WethBridge.sol index fbc943d8a..5049d073b 100644 --- a/zksync/contracts/bridge/L2WethBridge.sol +++ b/zksync/contracts/bridge/L2WethBridge.sol @@ -2,14 +2,14 @@ pragma solidity 0.8.20; -import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; -import "./interfaces/IL2Bridge.sol"; -import "./interfaces/IL2Weth.sol"; -import "./interfaces/IL2StandardToken.sol"; +import {IL2Bridge} from "./interfaces/IL2Bridge.sol"; +import {IL2Weth} from "./interfaces/IL2Weth.sol"; +import {IL2StandardToken} from "./interfaces/IL2StandardToken.sol"; import {L2_ETH_ADDRESS} from "../L2ContractHelper.sol"; -import "../vendor/AddressAliasHelper.sol"; +import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev