Skip to content

Commit

Permalink
upgrade solc version v0.8.17
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Oct 13, 2023
1 parent 3e1d31a commit c16b661
Show file tree
Hide file tree
Showing 33 changed files with 43 additions and 47 deletions.
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/LnDefaultBridge.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/LnOppositeBridge.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
4 changes: 2 additions & 2 deletions helix-contract/contracts/ln/base/LnAccessController.sol
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/base/LnBridgeHelper.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/base/LnDefaultBridgeSource.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/base/LnDefaultBridgeTarget.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma solidity ^0.8.17;

import "./LnBridgeHelper.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.17;

pragma solidity >=0.8.10;
import "../base/LnBridgeHelper.sol";

interface ILnDefaultBridgeTarget {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.10;
pragma solidity >=0.8.17;

interface ILnOppositeBridgeSource {
function slash(
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions helix-contract/contracts/ln/messager/AxelarMessager.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/messager/DebugMessager.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions helix-contract/contracts/ln/messager/Eth2ArbSendService.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions helix-contract/contracts/ln/messager/Eth2LineaSendService.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions helix-contract/contracts/ln/messager/LayerZeroMessager.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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)));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;
pragma solidity ^0.8.17;

interface IAxelarGasReceiver {
function payNativeGasForContractCall(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;
pragma solidity ^0.8.17;

interface IAxelarGateway {
function callContract(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma solidity ^0.8.17;

interface ILayerZeroEndpoint {
function send(
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma solidity ^0.8.17;

interface IMailbox {
function requestL2Transaction(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma solidity ^0.8.17;

import "../messager/Eth2ArbReceiveService.sol";

Expand Down
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/test/MockLayerZero.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma solidity ^0.8.17;

import "../messager/interface/ILayerZeroEndpoint.sol";

Expand Down
3 changes: 1 addition & 2 deletions helix-contract/contracts/ln/test/TestToken.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/tool/Create2Deployer.sol
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion helix-contract/contracts/ln/tool/ProxyAdmin.sol
Original file line number Diff line number Diff line change
@@ -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";
Original file line number Diff line number Diff line change
@@ -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";
4 changes: 2 additions & 2 deletions helix-contract/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion zksync-deployer/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const config: HardhatUserConfig = {
zkSyncTestnet,
},
solidity: {
version: "0.8.10",
version: "0.8.17",
},
};

Expand Down

0 comments on commit c16b661

Please sign in to comment.