Skip to content

Commit

Permalink
Merge pull request #11 from LayerZero-Labs/floating-pragma
Browse files Browse the repository at this point in the history
Floating pragma
  • Loading branch information
cowboyisaac authored Jan 17, 2024
2 parents c321320 + bf4318b commit ccfd0d3
Show file tree
Hide file tree
Showing 85 changed files with 107 additions and 803 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
9 changes: 5 additions & 4 deletions messagelib/contracts/uln/LzExecutor.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 Expand Up @@ -47,7 +47,7 @@ contract LzExecutor is Ownable {
function commitAndExecute(
address _receiveLib,
LzReceiveParam calldata _lzReceiveParam,
NativeDropParam calldata _nativeDropParam
NativeDropParam[] calldata _nativeDropParams
) external payable {
/// 1. check if executable, revert if executed
ExecutionState executionState = endpoint.executable(_lzReceiveParam.origin, _lzReceiveParam.receiver);
Expand Down Expand Up @@ -76,8 +76,9 @@ contract LzExecutor is Ownable {
}

/// 3. native drop
if (_nativeDropParam._amount > 0 && _nativeDropParam._receiver != address(0x0)) {
Transfer.native(_nativeDropParam._receiver, _nativeDropParam._amount);
for (uint256 i = 0; i < _nativeDropParams.length; i++) {
NativeDropParam calldata param = _nativeDropParams[i];
Transfer.native(param._receiver, param._amount);
}

/// 4. try execute, will revert if not executable
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
152 changes: 0 additions & 152 deletions messagelib/contracts/uln/dvn/adapters/CCIP/CCIPDVNAdapter.sol

This file was deleted.

This file was deleted.

Loading

0 comments on commit ccfd0d3

Please sign in to comment.