From 2e0da7f448fb842115caf0199cb7c3df0b48ffef Mon Sep 17 00:00:00 2001 From: smol-ninja Date: Thu, 7 Mar 2024 17:15:08 +0000 Subject: [PATCH] refactor: order imports alphabetically (#301) --- src/SablierV2MerkleLockupFactory.sol | 8 ++++---- src/SablierV2MerkleLockupLL.sol | 2 +- src/SablierV2MerkleLockupLT.sol | 4 ++-- src/types/DataTypes.sol | 3 +-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/SablierV2MerkleLockupFactory.sol b/src/SablierV2MerkleLockupFactory.sol index f6fc3318..6b50c53e 100644 --- a/src/SablierV2MerkleLockupFactory.sol +++ b/src/SablierV2MerkleLockupFactory.sol @@ -2,16 +2,16 @@ pragma solidity >=0.8.22; import { UD60x18, ud } from "@prb/math/src/UD60x18.sol"; -import { LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; -import { ISablierV2LockupTranched } from "@sablier/v2-core/src/interfaces/ISablierV2LockupTranched.sol"; import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol"; +import { ISablierV2LockupTranched } from "@sablier/v2-core/src/interfaces/ISablierV2LockupTranched.sol"; +import { LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; -import { SablierV2MerkleLockupLL } from "./SablierV2MerkleLockupLL.sol"; -import { SablierV2MerkleLockupLT } from "./SablierV2MerkleLockupLT.sol"; import { ISablierV2MerkleLockupFactory } from "./interfaces/ISablierV2MerkleLockupFactory.sol"; import { ISablierV2MerkleLockupLL } from "./interfaces/ISablierV2MerkleLockupLL.sol"; import { ISablierV2MerkleLockupLT } from "./interfaces/ISablierV2MerkleLockupLT.sol"; import { Errors } from "./libraries/Errors.sol"; +import { SablierV2MerkleLockupLL } from "./SablierV2MerkleLockupLL.sol"; +import { SablierV2MerkleLockupLT } from "./SablierV2MerkleLockupLT.sol"; import { MerkleLockup, MerkleLockupLT } from "./types/DataTypes.sol"; /// @title SablierV2MerkleLockupFactory diff --git a/src/SablierV2MerkleLockupLL.sol b/src/SablierV2MerkleLockupLL.sol index 3046612c..6214875e 100644 --- a/src/SablierV2MerkleLockupLL.sol +++ b/src/SablierV2MerkleLockupLL.sol @@ -4,9 +4,9 @@ pragma solidity >=0.8.22; import { BitMaps } from "@openzeppelin/contracts/utils/structs/BitMaps.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import { ud } from "@prb/math/src/UD60x18.sol"; import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol"; import { Broker, LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; -import { ud } from "@prb/math/src/UD60x18.sol"; import { SablierV2MerkleLockup } from "./abstracts/SablierV2MerkleLockup.sol"; import { ISablierV2MerkleLockupLL } from "./interfaces/ISablierV2MerkleLockupLL.sol"; diff --git a/src/SablierV2MerkleLockupLT.sol b/src/SablierV2MerkleLockupLT.sol index 11f680df..5d6f79dc 100644 --- a/src/SablierV2MerkleLockupLT.sol +++ b/src/SablierV2MerkleLockupLT.sol @@ -4,9 +4,9 @@ pragma solidity >=0.8.22; import { BitMaps } from "@openzeppelin/contracts/utils/structs/BitMaps.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import { ud, UD60x18 } from "@prb/math/src/UD60x18.sol"; import { ISablierV2LockupTranched } from "@sablier/v2-core/src/interfaces/ISablierV2LockupTranched.sol"; import { Broker, LockupTranched } from "@sablier/v2-core/src/types/DataTypes.sol"; -import { ud, UD60x18 } from "@prb/math/src/UD60x18.sol"; import { SablierV2MerkleLockup } from "./abstracts/SablierV2MerkleLockup.sol"; import { ISablierV2MerkleLockupLT } from "./interfaces/ISablierV2MerkleLockupLT.sol"; @@ -49,7 +49,7 @@ contract SablierV2MerkleLockupLT is // Since Solidity lacks a syntax for copying arrays directly from memory to storage, // a manual approach is necessary. See https://github.com/ethereum/solidity/issues/12783. uint256 count = tranchesWithPercentages.length; - for (uint256 i = 0; i < count; i++) { + for (uint256 i = 0; i < count; ++i) { _tranchesWithPercentages.push(tranchesWithPercentages[i]); } diff --git a/src/types/DataTypes.sol b/src/types/DataTypes.sol index 7763de88..ef95009c 100644 --- a/src/types/DataTypes.sol +++ b/src/types/DataTypes.sol @@ -2,11 +2,10 @@ pragma solidity >=0.8.22; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import { UD2x18 } from "@prb/math/src/UD2x18.sol"; import { ISablierV2Lockup } from "@sablier/v2-core/src/interfaces/ISablierV2Lockup.sol"; import { Broker, LockupDynamic, LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol"; -import { UD2x18 } from "@prb/math/src/UD2x18.sol"; - library Batch { /// @notice A struct encapsulating the lockup contract's address and the stream ids to cancel. struct CancelMultiple {