diff --git a/helix-contract/contracts/ln/LnDefaultBridge.sol b/helix-contract/contracts/ln/LnDefaultBridge.sol index 266a1a2a..ab56a387 100644 --- a/helix-contract/contracts/ln/LnDefaultBridge.sol +++ b/helix-contract/contracts/ln/LnDefaultBridge.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@zeppelin-solidity/contracts/proxy/utils/Initializable.sol"; import "./base/LnAccessController.sol"; diff --git a/helix-contract/contracts/ln/LnOppositeBridge.sol b/helix-contract/contracts/ln/LnOppositeBridge.sol index 8bdfb6ca..3c959cbd 100644 --- a/helix-contract/contracts/ln/LnOppositeBridge.sol +++ b/helix-contract/contracts/ln/LnOppositeBridge.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@zeppelin-solidity/contracts/proxy/utils/Initializable.sol"; import "./base/LnAccessController.sol"; diff --git a/helix-contract/contracts/ln/base/LnAccessController.sol b/helix-contract/contracts/ln/base/LnAccessController.sol index d21c6cfa..8f2cb263 100644 --- a/helix-contract/contracts/ln/base/LnAccessController.sol +++ b/helix-contract/contracts/ln/base/LnAccessController.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; /// @title LnAccessController /// @notice LnAccessController is a contract to control the access permission @@ -34,7 +34,7 @@ contract LnAccessController { operator = _operator; } - function authoriseAppCaller(address appAddress, bool enable) onlyOperator external { + function authoriseAppCaller(address appAddress, bool enable) onlyDao external { callerWhiteList[appAddress] = enable; } diff --git a/helix-contract/contracts/ln/base/LnBridgeHelper.sol b/helix-contract/contracts/ln/base/LnBridgeHelper.sol index d7fb4662..76fad68b 100644 --- a/helix-contract/contracts/ln/base/LnBridgeHelper.sol +++ b/helix-contract/contracts/ln/base/LnBridgeHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@zeppelin-solidity/contracts/token/ERC20/IERC20.sol"; diff --git a/helix-contract/contracts/ln/base/LnDefaultBridgeSource.sol b/helix-contract/contracts/ln/base/LnDefaultBridgeSource.sol index 702a2eb4..0419cf45 100644 --- a/helix-contract/contracts/ln/base/LnDefaultBridgeSource.sol +++ b/helix-contract/contracts/ln/base/LnDefaultBridgeSource.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@zeppelin-solidity/contracts/security/Pausable.sol"; import "./LnBridgeHelper.sol"; diff --git a/helix-contract/contracts/ln/base/LnDefaultBridgeTarget.sol b/helix-contract/contracts/ln/base/LnDefaultBridgeTarget.sol index 634cd6d9..dc569d72 100644 --- a/helix-contract/contracts/ln/base/LnDefaultBridgeTarget.sol +++ b/helix-contract/contracts/ln/base/LnDefaultBridgeTarget.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "./LnBridgeHelper.sol"; diff --git a/helix-contract/contracts/ln/base/LnOppositeBridgeSource.sol b/helix-contract/contracts/ln/base/LnOppositeBridgeSource.sol index 5e6597d7..dcba7de7 100644 --- a/helix-contract/contracts/ln/base/LnOppositeBridgeSource.sol +++ b/helix-contract/contracts/ln/base/LnOppositeBridgeSource.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@zeppelin-solidity/contracts/security/Pausable.sol"; import "./LnBridgeHelper.sol"; diff --git a/helix-contract/contracts/ln/base/LnOppositeBridgeTarget.sol b/helix-contract/contracts/ln/base/LnOppositeBridgeTarget.sol index 2cabc71f..e616c500 100644 --- a/helix-contract/contracts/ln/base/LnOppositeBridgeTarget.sol +++ b/helix-contract/contracts/ln/base/LnOppositeBridgeTarget.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "../interface/ILnOppositeBridgeSource.sol"; import "./LnBridgeHelper.sol"; diff --git a/helix-contract/contracts/ln/interface/ILnDefaultBridgeTarget.sol b/helix-contract/contracts/ln/interface/ILnDefaultBridgeTarget.sol index a3958e08..b6258847 100644 --- a/helix-contract/contracts/ln/interface/ILnDefaultBridgeTarget.sol +++ b/helix-contract/contracts/ln/interface/ILnDefaultBridgeTarget.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT +pragma solidity >=0.8.17; -pragma solidity >=0.8.10; import "../base/LnBridgeHelper.sol"; interface ILnDefaultBridgeTarget { diff --git a/helix-contract/contracts/ln/interface/ILnOppositeBridgeSource.sol b/helix-contract/contracts/ln/interface/ILnOppositeBridgeSource.sol index 77cf67aa..00881ecb 100644 --- a/helix-contract/contracts/ln/interface/ILnOppositeBridgeSource.sol +++ b/helix-contract/contracts/ln/interface/ILnOppositeBridgeSource.sol @@ -1,6 +1,5 @@ // SPDX-License-Identifier: MIT - -pragma solidity >=0.8.10; +pragma solidity >=0.8.17; interface ILnOppositeBridgeSource { function slash( diff --git a/helix-contract/contracts/ln/interface/ILowLevelMessager.sol b/helix-contract/contracts/ln/interface/ILowLevelMessager.sol index 7b959402..c79fad74 100644 --- a/helix-contract/contracts/ln/interface/ILowLevelMessager.sol +++ b/helix-contract/contracts/ln/interface/ILowLevelMessager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; interface ILowLevelMessageSender { function registerRemoteReceiver(uint256 remoteChainId, address remoteBridge) external; diff --git a/helix-contract/contracts/ln/messager/AxelarMessager.sol b/helix-contract/contracts/ln/messager/AxelarMessager.sol index 61d6ec1b..27fa9fbe 100644 --- a/helix-contract/contracts/ln/messager/AxelarMessager.sol +++ b/helix-contract/contracts/ln/messager/AxelarMessager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import { StringToAddress, AddressToString } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/libs/AddressString.sol'; import "../interface/ILowLevelMessager.sol"; @@ -56,7 +56,7 @@ contract AxelarMessager is LnAccessController { emit CallResult(_sourceChain, _sourceAddress, success); } - function setRemoteMessager(uint256 _appRemoteChainId, string calldata _remoteChainName, address _remoteMessager) onlyOperator external { + function setRemoteMessager(uint256 _appRemoteChainId, string calldata _remoteChainName, address _remoteMessager) onlyDao external { remoteMessagers[_appRemoteChainId] = RemoteMessager(_remoteChainName, _remoteMessager); trustedRemotes[_remoteChainName] = _remoteMessager; } diff --git a/helix-contract/contracts/ln/messager/DebugMessager.sol b/helix-contract/contracts/ln/messager/DebugMessager.sol index e30da0c0..42447323 100644 --- a/helix-contract/contracts/ln/messager/DebugMessager.sol +++ b/helix-contract/contracts/ln/messager/DebugMessager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "../base/LnBridgeHelper.sol"; import "../interface/ILnDefaultBridgeTarget.sol"; diff --git a/helix-contract/contracts/ln/messager/Eth2ArbReceiveService.sol b/helix-contract/contracts/ln/messager/Eth2ArbReceiveService.sol index 29b8560e..25cc3542 100644 --- a/helix-contract/contracts/ln/messager/Eth2ArbReceiveService.sol +++ b/helix-contract/contracts/ln/messager/Eth2ArbReceiveService.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@arbitrum/nitro-contracts/src/libraries/AddressAliasHelper.sol"; import "../base/LnAccessController.sol"; @@ -22,7 +22,7 @@ contract Eth2ArbReceiveService is ILowLevelMessageReceiver, LnAccessController { REMOTE_CHAINID = _remoteChainId; } - function setRemoteMessager(address _remoteMessager) onlyOperator external { + function setRemoteMessager(address _remoteMessager) onlyDao external { remoteMessagerAlias = AddressAliasHelper.applyL1ToL2Alias(_remoteMessager); } diff --git a/helix-contract/contracts/ln/messager/Eth2ArbSendService.sol b/helix-contract/contracts/ln/messager/Eth2ArbSendService.sol index 2aca06ae..d35e39b7 100644 --- a/helix-contract/contracts/ln/messager/Eth2ArbSendService.sol +++ b/helix-contract/contracts/ln/messager/Eth2ArbSendService.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@arbitrum/nitro-contracts/src/bridge/IInbox.sol"; import "../base/LnAccessController.sol"; @@ -18,7 +18,7 @@ contract Eth2ArbSendService is ILowLevelMessageSender, LnAccessController { REMOTE_CHAINID = _remoteChainId; } - function setRemoteMessager(address _remoteMessager) onlyOperator external { + function setRemoteMessager(address _remoteMessager) onlyDao external { remoteMessager = _remoteMessager; } diff --git a/helix-contract/contracts/ln/messager/Eth2LineaReceiveService.sol b/helix-contract/contracts/ln/messager/Eth2LineaReceiveService.sol index f91a8971..cbad876a 100644 --- a/helix-contract/contracts/ln/messager/Eth2LineaReceiveService.sol +++ b/helix-contract/contracts/ln/messager/Eth2LineaReceiveService.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "./interface/ILineaMessageService.sol"; import "../base/LnAccessController.sol"; @@ -25,7 +25,7 @@ contract Eth2LineaReceiveService is ILowLevelMessageReceiver, LnAccessController REMOTE_CHAINID = _remoteChainId; } - function setRemoteMessager(address _remoteMessager) onlyOperator external { + function setRemoteMessager(address _remoteMessager) onlyDao external { remoteMessager = _remoteMessager; } diff --git a/helix-contract/contracts/ln/messager/Eth2LineaSendService.sol b/helix-contract/contracts/ln/messager/Eth2LineaSendService.sol index caa18cbc..ea925b69 100644 --- a/helix-contract/contracts/ln/messager/Eth2LineaSendService.sol +++ b/helix-contract/contracts/ln/messager/Eth2LineaSendService.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "./interface/ILineaMessageService.sol"; import "../base/LnAccessController.sol"; @@ -19,7 +19,7 @@ contract Eth2LineaSendService is ILowLevelMessageSender, LnAccessController { REMOTE_CHAINID = _remoteChainId; } - function setRemoteMessager(address _remoteMessager) onlyOperator external { + function setRemoteMessager(address _remoteMessager) onlyDao external { remoteMessager = _remoteMessager; } diff --git a/helix-contract/contracts/ln/messager/Eth2ZkSyncReceiveService.sol b/helix-contract/contracts/ln/messager/Eth2ZkSyncReceiveService.sol index cecd7345..66fc42ce 100644 --- a/helix-contract/contracts/ln/messager/Eth2ZkSyncReceiveService.sol +++ b/helix-contract/contracts/ln/messager/Eth2ZkSyncReceiveService.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "./interface/IZksyncMailbox.sol"; import "../base/LnAccessController.sol"; @@ -25,7 +25,7 @@ contract Eth2ZkSyncReceiveService is ILowLevelMessageReceiver, LnAccessControlle REMOTE_CHAINID = _remoteChainId; } - function setRemoteMessager(address _remoteMessager) onlyOperator external { + function setRemoteMessager(address _remoteMessager) onlyDao external { remoteMessagerAlias = address(uint160(_remoteMessager) + offset); } diff --git a/helix-contract/contracts/ln/messager/Eth2ZkSyncSendService.sol b/helix-contract/contracts/ln/messager/Eth2ZkSyncSendService.sol index b2a8d916..032ef912 100644 --- a/helix-contract/contracts/ln/messager/Eth2ZkSyncSendService.sol +++ b/helix-contract/contracts/ln/messager/Eth2ZkSyncSendService.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "./interface/IZksyncMailbox.sol"; import "../base/LnAccessController.sol"; @@ -19,7 +19,7 @@ contract Eth2ZkSyncSendService is ILowLevelMessageSender, LnAccessController { REMOTE_CHAINID = _remoteChainId; } - function setRemoteMessager(address _remoteMessager) onlyOperator external { + function setRemoteMessager(address _remoteMessager) onlyDao external { remoteMessager = _remoteMessager; } diff --git a/helix-contract/contracts/ln/messager/LayerZeroMessager.sol b/helix-contract/contracts/ln/messager/LayerZeroMessager.sol index 80e2a397..9f204809 100644 --- a/helix-contract/contracts/ln/messager/LayerZeroMessager.sol +++ b/helix-contract/contracts/ln/messager/LayerZeroMessager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "./interface/ILayerZeroEndpoint.sol"; import "../interface/ILowLevelMessager.sol"; @@ -37,7 +37,7 @@ contract LayerZeroMessager is LnAccessController { _; } - function setRemoteMessager(uint256 _appRemoteChainId, uint16 _lzRemoteChainId, address _remoteMessager) onlyOperator external { + function setRemoteMessager(uint256 _appRemoteChainId, uint16 _lzRemoteChainId, address _remoteMessager) onlyDao external { remoteMessagers[_appRemoteChainId] = RemoteMessager(_lzRemoteChainId, _remoteMessager); trustedRemotes[_lzRemoteChainId] = keccak256(abi.encodePacked(_remoteMessager, address(this))); } diff --git a/helix-contract/contracts/ln/messager/interface/IAxelarGasReceiver.sol b/helix-contract/contracts/ln/messager/interface/IAxelarGasReceiver.sol index 93db727b..0c66d785 100644 --- a/helix-contract/contracts/ln/messager/interface/IAxelarGasReceiver.sol +++ b/helix-contract/contracts/ln/messager/interface/IAxelarGasReceiver.sol @@ -1,6 +1,5 @@ // SPDX-License-Identifier: MIT - -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; interface IAxelarGasReceiver { function payNativeGasForContractCall( diff --git a/helix-contract/contracts/ln/messager/interface/IAxelarGateway.sol b/helix-contract/contracts/ln/messager/interface/IAxelarGateway.sol index dfa5cb97..95b38152 100644 --- a/helix-contract/contracts/ln/messager/interface/IAxelarGateway.sol +++ b/helix-contract/contracts/ln/messager/interface/IAxelarGateway.sol @@ -1,6 +1,5 @@ // SPDX-License-Identifier: MIT - -pragma solidity ^0.8.9; +pragma solidity ^0.8.17; interface IAxelarGateway { function callContract( diff --git a/helix-contract/contracts/ln/messager/interface/ILayerZeroEndpoint.sol b/helix-contract/contracts/ln/messager/interface/ILayerZeroEndpoint.sol index ff124d8b..1918ba8d 100644 --- a/helix-contract/contracts/ln/messager/interface/ILayerZeroEndpoint.sol +++ b/helix-contract/contracts/ln/messager/interface/ILayerZeroEndpoint.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; interface ILayerZeroEndpoint { function send( diff --git a/helix-contract/contracts/ln/messager/interface/ILineaMessageService.sol b/helix-contract/contracts/ln/messager/interface/ILineaMessageService.sol index 090038fc..ded01c65 100644 --- a/helix-contract/contracts/ln/messager/interface/ILineaMessageService.sol +++ b/helix-contract/contracts/ln/messager/interface/ILineaMessageService.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; interface ILineaMessageService { function sendMessage(address _to, uint256 _fee, bytes calldata _calldata) external payable; diff --git a/helix-contract/contracts/ln/messager/interface/IZksyncMailbox.sol b/helix-contract/contracts/ln/messager/interface/IZksyncMailbox.sol index 2264bf6d..29c3765a 100644 --- a/helix-contract/contracts/ln/messager/interface/IZksyncMailbox.sol +++ b/helix-contract/contracts/ln/messager/interface/IZksyncMailbox.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; interface IMailbox { function requestL2Transaction( diff --git a/helix-contract/contracts/ln/test/MockEth2ArbReceiveService.sol b/helix-contract/contracts/ln/test/MockEth2ArbReceiveService.sol index 44de548b..9b2439cf 100644 --- a/helix-contract/contracts/ln/test/MockEth2ArbReceiveService.sol +++ b/helix-contract/contracts/ln/test/MockEth2ArbReceiveService.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "../messager/Eth2ArbReceiveService.sol"; diff --git a/helix-contract/contracts/ln/test/MockLayerZero.sol b/helix-contract/contracts/ln/test/MockLayerZero.sol index e10de74b..d6e6cd46 100644 --- a/helix-contract/contracts/ln/test/MockLayerZero.sol +++ b/helix-contract/contracts/ln/test/MockLayerZero.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "../messager/interface/ILayerZeroEndpoint.sol"; diff --git a/helix-contract/contracts/ln/test/TestToken.sol b/helix-contract/contracts/ln/test/TestToken.sol index 4ffd51c4..c444876c 100644 --- a/helix-contract/contracts/ln/test/TestToken.sol +++ b/helix-contract/contracts/ln/test/TestToken.sol @@ -1,6 +1,5 @@ - // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@zeppelin-solidity/contracts/token/ERC20/IERC20.sol"; import "@zeppelin-solidity/contracts/utils/math/SafeMath.sol"; diff --git a/helix-contract/contracts/ln/tool/Create2Deployer.sol b/helix-contract/contracts/ln/tool/Create2Deployer.sol index 3e65118c..39f9ae19 100644 --- a/helix-contract/contracts/ln/tool/Create2Deployer.sol +++ b/helix-contract/contracts/ln/tool/Create2Deployer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; contract Create2Deployer { event Deployed(address addr, uint256 salt); diff --git a/helix-contract/contracts/ln/tool/ProxyAdmin.sol b/helix-contract/contracts/ln/tool/ProxyAdmin.sol index 8df6b07b..013b8913 100644 --- a/helix-contract/contracts/ln/tool/ProxyAdmin.sol +++ b/helix-contract/contracts/ln/tool/ProxyAdmin.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@zeppelin-solidity/contracts/proxy/transparent/ProxyAdmin.sol"; diff --git a/helix-contract/contracts/ln/tool/TransparentUpgradeableProxy.sol b/helix-contract/contracts/ln/tool/TransparentUpgradeableProxy.sol index 9f0fe26f..e2f58e45 100644 --- a/helix-contract/contracts/ln/tool/TransparentUpgradeableProxy.sol +++ b/helix-contract/contracts/ln/tool/TransparentUpgradeableProxy.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.10; +pragma solidity ^0.8.17; import "@zeppelin-solidity/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; diff --git a/helix-contract/hardhat.config.js b/helix-contract/hardhat.config.js index ae40a8ab..ccc9e2ef 100644 --- a/helix-contract/hardhat.config.js +++ b/helix-contract/hardhat.config.js @@ -20,9 +20,9 @@ module.exports = { solidity: { compilers: [ { - version: "0.8.10", + version: "0.8.17", settings: { - evmVersion: "istanbul", + evmVersion: "london", optimizer: { enabled: true, runs: 200 diff --git a/zksync-deployer/hardhat.config.ts b/zksync-deployer/hardhat.config.ts index 2c6287ac..de4bb9cf 100644 --- a/zksync-deployer/hardhat.config.ts +++ b/zksync-deployer/hardhat.config.ts @@ -39,7 +39,7 @@ const config: HardhatUserConfig = { zkSyncTestnet, }, solidity: { - version: "0.8.10", + version: "0.8.17", }, };