Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] 4.8 - remove duplicated initialize from contracts #417

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions contracts/contracts/LineaRollup.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.26;

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import { L1MessageService } from "./messageService/l1/L1MessageService.sol";
import { ZkEvmV2 } from "./ZkEvmV2.sol";
Expand All @@ -14,14 +13,7 @@ import { Utils } from "./lib/Utils.sol";
* @author ConsenSys Software Inc.
* @custom:security-contact [email protected]
*/
contract LineaRollup is
Initializable,
AccessControlUpgradeable,
ZkEvmV2,
L1MessageService,
PermissionsManager,
ILineaRollup
{
contract LineaRollup is AccessControlUpgradeable, ZkEvmV2, L1MessageService, PermissionsManager, ILineaRollup {
using Utils for *;

/// @notice This is the ABI version and not the reinitialize version.
Expand Down
3 changes: 1 addition & 2 deletions contracts/contracts/ZkEvmV2.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.26;

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import { L1MessageServiceV1 } from "./messageService/l1/v1/L1MessageServiceV1.sol";
import { IZkEvmV2 } from "./interfaces/l1/IZkEvmV2.sol";
Expand All @@ -11,7 +10,7 @@ import { IPlonkVerifier } from "./interfaces/l1/IPlonkVerifier.sol";
* @author ConsenSys Software Inc.
* @custom:security-contact [email protected]
*/
abstract contract ZkEvmV2 is Initializable, AccessControlUpgradeable, L1MessageServiceV1, IZkEvmV2 {
abstract contract ZkEvmV2 is AccessControlUpgradeable, L1MessageServiceV1, IZkEvmV2 {
uint256 internal constant MODULO_R = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");

Expand Down
3 changes: 1 addition & 2 deletions contracts/contracts/lib/PauseManager.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.8.19 <=0.8.26;

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import { IPauseManager } from "../interfaces/IPauseManager.sol";

Expand All @@ -10,7 +9,7 @@ import { IPauseManager } from "../interfaces/IPauseManager.sol";
* @author ConsenSys Software Inc.
* @custom:security-contact [email protected]
*/
abstract contract PauseManager is Initializable, IPauseManager, AccessControlUpgradeable {
abstract contract PauseManager is IPauseManager, AccessControlUpgradeable {
/// @notice This is used to pause all pausable functions.
bytes32 public constant PAUSE_ALL_ROLE = keccak256("PAUSE_ALL_ROLE");

Expand Down
3 changes: 1 addition & 2 deletions contracts/contracts/lib/PermissionsManager.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.8.19 <=0.8.26;

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import { IGenericErrors } from "../interfaces/IGenericErrors.sol";
import { IPermissionsManager } from "../interfaces/IPermissionsManager.sol";
Expand All @@ -11,7 +10,7 @@ import { IPermissionsManager } from "../interfaces/IPermissionsManager.sol";
* @author ConsenSys Software Inc.
* @custom:security-contact [email protected]
*/
abstract contract PermissionsManager is Initializable, AccessControlUpgradeable, IPermissionsManager, IGenericErrors {
abstract contract PermissionsManager is AccessControlUpgradeable, IPermissionsManager, IGenericErrors {
/**
* @notice Sets permissions for a list of addresses and their roles.
* @param _roleAddresses The list of addresses and roles to assign permissions to.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.26;

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { LineaRollupPauseManager } from "../../../lib/LineaRollupPauseManager.sol";
import { RateLimiter } from "../../lib/RateLimiter.sol";
import { L1MessageManagerV1 } from "./L1MessageManagerV1.sol";
Expand All @@ -16,7 +15,6 @@ import { MessageHashing } from "../../lib/MessageHashing.sol";
* @custom:security-contact [email protected]
*/
abstract contract L1MessageServiceV1 is
Initializable,
RateLimiter,
L1MessageManagerV1,
TransientStorageReentrancyGuardUpgradeable,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.19;

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { ReentrancyGuardUpgradeable } from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import { IMessageService } from "../../../interfaces/IMessageService.sol";
import { IL2MessageServiceV1 } from "../../../interfaces/l2/IL2MessageServiceV1.sol";
Expand All @@ -16,7 +15,6 @@ import { MessageHashing } from "../../lib/MessageHashing.sol";
* @custom:security-contact [email protected]
*/
abstract contract L2MessageServiceV1 is
Initializable,
RateLimiter,
L2MessageManagerV1,
ReentrancyGuardUpgradeable,
Expand Down
3 changes: 1 addition & 2 deletions contracts/contracts/messageService/lib/RateLimiter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.8.19 <=0.8.26;

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import { IRateLimiter } from "../../interfaces/IRateLimiter.sol";

Expand All @@ -11,7 +10,7 @@ import { IRateLimiter } from "../../interfaces/IRateLimiter.sol";
* @notice You can use this control numeric limits over a period using timestamp.
* @custom:security-contact [email protected]
*/
contract RateLimiter is Initializable, IRateLimiter, AccessControlUpgradeable {
contract RateLimiter is IRateLimiter, AccessControlUpgradeable {
bytes32 public constant RATE_LIMIT_SETTER_ROLE = keccak256("RATE_LIMIT_SETTER_ROLE");
bytes32 public constant USED_RATE_LIMIT_RESETTER_ROLE = keccak256("USED_RATE_LIMIT_RESETTER_ROLE");

Expand Down
3 changes: 0 additions & 3 deletions contracts/contracts/tokenBridge/TokenBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { SafeERC20Upgradeable } from "@openzeppelin/contracts-upgradeable/token/
import { BeaconProxy } from "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol";
import { ReentrancyGuardUpgradeable } from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

import { BridgedToken } from "./BridgedToken.sol";
import { MessageServiceBase } from "../messageService/MessageServiceBase.sol";

Expand All @@ -30,7 +28,6 @@ import { Utils } from "../lib/Utils.sol";
*/
contract TokenBridge is
ITokenBridge,
Initializable,
ReentrancyGuardUpgradeable,
AccessControlUpgradeable,
MessageServiceBase,
Expand Down
Loading