Skip to content

Commit

Permalink
update pragma to ^0.8.20
Browse files Browse the repository at this point in the history
  • Loading branch information
carmenjiawenc committed Jan 17, 2024
1 parent 5679050 commit bf4318b
Show file tree
Hide file tree
Showing 75 changed files with 87 additions and 76 deletions.
2 changes: 1 addition & 1 deletion messagelib/contracts/Executor.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { ReentrancyGuardUpgradeable } from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import { Proxied } from "hardhat-deploy/solc_0.8/proxy/Proxied.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/ExecutorFeeLib.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/MessageLibBase.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

/// @dev simply a container of endpoint address and local eid
abstract contract MessageLibBase {
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/PriceFeed.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import { Proxied } from "hardhat-deploy/solc_0.8/proxy/Proxied.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/ReceiveLibBaseE2.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/SendLibBase.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Transfer } from "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/Transfer.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/SendLibBaseE2.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/Treasury.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/Worker.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Pausable } from "@openzeppelin/contracts/security/Pausable.sol";
import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/libs/SafeCall.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

/// @dev copied from https://github.com/nomad-xyz/ExcessivelySafeCall/blob/main/src/ExcessivelySafeCall.sol.
library SafeCall {
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/ReceiveUlnBase.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/SendUlnBase.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Packet } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol";
import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/UlnBase.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/dvn/DVN.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { ILayerZeroUltraLightNodeV2 } from "@layerzerolabs/lz-evm-v1-0.7/contracts/interfaces/ILayerZeroUltraLightNodeV2.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/dvn/DVNFeeLib.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Transfer } from "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/Transfer.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/dvn/MultiSig.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/libs/DVNOptions.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { BytesLib } from "solidity-bytes-utils/contracts/BytesLib.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/libs/UlnOptions.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/uln301/AddressSizeConfig.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/uln301/ReceiveLibBaseE1.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
import { ILayerZeroEndpoint } from "@layerzerolabs/lz-evm-v1-0.7/contracts/interfaces/ILayerZeroEndpoint.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/uln301/ReceiveUln301.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/uln301/SendLibBaseE1.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Packet } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol";
import { AddressCast } from "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/uln301/SendUln301.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Packet } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol";

Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/uln301/TreasuryFeeHandler.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/uln302/ReceiveUln302.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol";
import { SetConfigParam } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/contracts/uln/uln302/SendUln302.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Packet } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol";
import { SetConfigParam } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol";
Expand Down
4 changes: 2 additions & 2 deletions messagelib/contracts/upgradeable/WorkerUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
Expand Down Expand Up @@ -182,5 +182,5 @@ abstract contract WorkerUpgradeable is Initializable, AccessControlUpgradeable,
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[45] private __gap;
uint256[47] private __gap;
}
2 changes: 1 addition & 1 deletion messagelib/test/mocks/ReceiveLibMock.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { SetConfigParam } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol";
import { IMessageLib, MessageLibType } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLib.sol";
Expand Down
2 changes: 1 addition & 1 deletion messagelib/test/mocks/SendLibMock.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { SetConfigParam } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol";
import { MessagingFee } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/OApp.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

// @dev Import the 'MessagingFee' so it's exposed to OApp implementers
// solhint-disable-next-line no-unused-import
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/OAppCore.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IOAppCore, ILayerZeroEndpointV2 } from "./interfaces/IOAppCore.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/OAppReceiver.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { ILayerZeroReceiver, Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol";
import { OAppCore } from "./OAppCore.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/OAppSender.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { MessagingParams, MessagingFee, MessagingReceipt } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/examples/OmniCounter.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { ILayerZeroEndpointV2, MessagingFee, MessagingReceipt, Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
import { ILayerZeroComposer } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroComposer.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/examples/OmniCounterPreCrime.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { PreCrime, PreCrimePeer } from "../../precrime/PreCrime.sol";
import { InboundPacket } from "../../precrime/libs/Packet.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/interfaces/IOAppComposer.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { ILayerZeroComposer } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroComposer.sol";

Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/interfaces/IOAppCore.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";

Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/interfaces/IOAppMsgInspector.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

/**
* @title IOAppMsgInspector
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/interfaces/IOAppOptionsType3.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

/**
* @dev Struct representing enforced option parameters.
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/libs/OAppOptionsType3.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IOAppOptionsType3, EnforcedOptionParam } from "../interfaces/IOAppOptionsType3.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oapp/libs/OptionsBuilder.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { BytesLib } from "solidity-bytes-utils/contracts/BytesLib.sol";
import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oft/OFT.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { OFTCore } from "./OFTCore.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oft/OFTAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { IERC20Metadata, IERC20 } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
Expand Down
4 changes: 2 additions & 2 deletions oapp/contracts/oft/OFTCore.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { OApp, Origin } from "../oapp/OApp.sol";
import { OAppOptionsType3 } from "../oapp/libs/OAppOptionsType3.sol";
Expand Down Expand Up @@ -314,7 +314,7 @@ abstract contract OFTCore is IOFT, OApp, OAppPreCrimeSimulator, OAppOptionsType3
}

/**
* @dev Internal function to check if peer is considered 'trusted' by the OApp.
* @dev Check if the peer is considered 'trusted' by the OApp.
* @param _eid The endpoint ID to check.
* @param _peer The peer to check.
* @return Whether the peer passed is considered 'trusted' by the OApp.
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oft/OFTPrecrime.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

// import { IOApp } from "../../interfaces/IOApp.sol";
// import { IOFT } from "./interfaces/IOFT.sol";
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oft/interfaces/IOFT.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

import { MessagingReceipt, MessagingFee } from "../../oapp/OAppSender.sol";

Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oft/libs/OFTComposeMsgCodec.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

library OFTComposeMsgCodec {
// Offset constants for decoding composed messages
Expand Down
2 changes: 1 addition & 1 deletion oapp/contracts/oft/libs/OFTMsgCodec.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;
pragma solidity ^0.8.20;

library OFTMsgCodec {
// Offset constants for encoding and decoding OFT messages
Expand Down
Loading

0 comments on commit bf4318b

Please sign in to comment.