From 43ed00a6711f726a21023a26d504594a7cb93009 Mon Sep 17 00:00:00 2001 From: byshape Date: Wed, 10 Jul 2024 15:38:03 +0100 Subject: [PATCH 1/3] Unify import style --- contracts/BaseEscrow.sol | 2 +- contracts/BaseEscrowFactory.sol | 6 +++--- contracts/Escrow.sol | 2 +- contracts/EscrowDst.sol | 2 +- contracts/EscrowFactory.sol | 2 +- contracts/EscrowSrc.sol | 2 +- contracts/MerkleStorageInvalidator.sol | 4 ++-- contracts/mocks/ResolverMock.sol | 2 +- contracts/zkSync/EscrowDstZkSync.sol | 4 ++-- contracts/zkSync/EscrowFactoryZkSync.sol | 20 +++++++++---------- contracts/zkSync/EscrowSrcZkSync.sol | 4 ++-- contracts/zkSync/EscrowZkSync.sol | 6 +++--- remappings.txt | 1 - test/integration/EscrowFactory.t.sol | 4 ++-- .../MerkleStorageInvalidator.t.sol | 6 +++--- test/integration/ResolverMock.t.sol | 10 +++++----- test/libraries/TimelocksLib.t.sol | 6 +++--- test/unit/Escrow.t.sol | 10 +++++----- test/unit/EscrowFactory.t.sol | 8 ++++---- test/unit/MerkleStorageInvalidator.t.sol | 2 +- test/utils/BaseSetup.sol | 14 ++++++------- test/utils/libraries/TimelocksSettersLib.sol | 2 +- test/utils/mocks/TimelocksLibMock.sol | 2 +- 23 files changed, 60 insertions(+), 61 deletions(-) diff --git a/contracts/BaseEscrow.sol b/contracts/BaseEscrow.sol index fe5a142..24284b3 100644 --- a/contracts/BaseEscrow.sol +++ b/contracts/BaseEscrow.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; +import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import { AddressLib, Address } from "solidity-utils/libraries/AddressLib.sol"; import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; diff --git a/contracts/BaseEscrowFactory.sol b/contracts/BaseEscrowFactory.sol index fc87487..93401f1 100644 --- a/contracts/BaseEscrowFactory.sol +++ b/contracts/BaseEscrowFactory.sol @@ -2,9 +2,9 @@ pragma solidity 0.8.23; -import { Clones } from "openzeppelin-contracts/proxy/Clones.sol"; -import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; -import { Create2 } from "openzeppelin-contracts/utils/Create2.sol"; +import { Clones } from "openzeppelin-contracts/contracts/proxy/Clones.sol"; +import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import { Create2 } from "openzeppelin-contracts/contracts/utils/Create2.sol"; import { Address, AddressLib } from "solidity-utils/libraries/AddressLib.sol"; import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; diff --git a/contracts/Escrow.sol b/contracts/Escrow.sol index 6fa7809..78cefaa 100644 --- a/contracts/Escrow.sol +++ b/contracts/Escrow.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { Create2 } from "openzeppelin-contracts/utils/Create2.sol"; +import { Create2 } from "openzeppelin-contracts/contracts/utils/Create2.sol"; import { ImmutablesLib } from "./libraries/ImmutablesLib.sol"; import { ProxyHashLib } from "./libraries/ProxyHashLib.sol"; diff --git a/contracts/EscrowDst.sol b/contracts/EscrowDst.sol index 5174703..13efe57 100644 --- a/contracts/EscrowDst.sol +++ b/contracts/EscrowDst.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; +import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; import { AddressLib, Address } from "solidity-utils/libraries/AddressLib.sol"; diff --git a/contracts/EscrowFactory.sol b/contracts/EscrowFactory.sol index 055d0c5..a5e95ec 100644 --- a/contracts/EscrowFactory.sol +++ b/contracts/EscrowFactory.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; +import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import { BaseExtension } from "limit-order-settlement/extensions/BaseExtension.sol"; import { ResolverValidationExtension } from "limit-order-settlement/extensions/ResolverValidationExtension.sol"; diff --git a/contracts/EscrowSrc.sol b/contracts/EscrowSrc.sol index 5b00e06..b55a05e 100644 --- a/contracts/EscrowSrc.sol +++ b/contracts/EscrowSrc.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; +import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; import { AddressLib, Address } from "solidity-utils/libraries/AddressLib.sol"; diff --git a/contracts/MerkleStorageInvalidator.sol b/contracts/MerkleStorageInvalidator.sol index d9868c2..237d58b 100644 --- a/contracts/MerkleStorageInvalidator.sol +++ b/contracts/MerkleStorageInvalidator.sol @@ -4,9 +4,9 @@ pragma solidity 0.8.23; import { IOrderMixin } from "limit-order-protocol/interfaces/IOrderMixin.sol"; import { ITakerInteraction } from "limit-order-protocol/interfaces/ITakerInteraction.sol"; -import { MerkleProof } from "openzeppelin-contracts/utils/cryptography/MerkleProof.sol"; +import { MerkleProof } from "openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; -import { IMerkleStorageInvalidator } from "contracts/interfaces/IMerkleStorageInvalidator.sol"; +import { IMerkleStorageInvalidator } from "./interfaces/IMerkleStorageInvalidator.sol"; /** * @title Merkle Storage Invalidator contract diff --git a/contracts/mocks/ResolverMock.sol b/contracts/mocks/ResolverMock.sol index d785f53..52cceb8 100644 --- a/contracts/mocks/ResolverMock.sol +++ b/contracts/mocks/ResolverMock.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { Ownable } from "openzeppelin-contracts/access/Ownable.sol"; +import { Ownable } from "openzeppelin-contracts/contracts/access/Ownable.sol"; import { IOrderMixin } from "limit-order-protocol/interfaces/IOrderMixin.sol"; import { TakerTraits } from "limit-order-protocol/libraries/TakerTraitsLib.sol"; diff --git a/contracts/zkSync/EscrowDstZkSync.sol b/contracts/zkSync/EscrowDstZkSync.sol index 04b4624..69384b7 100644 --- a/contracts/zkSync/EscrowDstZkSync.sol +++ b/contracts/zkSync/EscrowDstZkSync.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.23; -import { Escrow, EscrowDst } from "contracts/EscrowDst.sol"; -import { EscrowZkSync } from "contracts/zkSync/EscrowZkSync.sol"; +import { Escrow, EscrowDst } from "../EscrowDst.sol"; +import { EscrowZkSync } from "./EscrowZkSync.sol"; contract EscrowDstZkSync is EscrowDst, EscrowZkSync { constructor(uint32 rescueDelay) EscrowDst(rescueDelay) EscrowZkSync() {} diff --git a/contracts/zkSync/EscrowFactoryZkSync.sol b/contracts/zkSync/EscrowFactoryZkSync.sol index 62d6781..94efb5a 100644 --- a/contracts/zkSync/EscrowFactoryZkSync.sol +++ b/contracts/zkSync/EscrowFactoryZkSync.sol @@ -2,19 +2,19 @@ pragma solidity 0.8.23; -import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; +import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import { BaseExtension } from "limit-order-settlement/extensions/BaseExtension.sol"; import { ResolverValidationExtension } from "limit-order-settlement/extensions/ResolverValidationExtension.sol"; -import { BaseEscrowFactory } from "contracts/BaseEscrowFactory.sol"; -import { MerkleStorageInvalidator } from "contracts/MerkleStorageInvalidator.sol"; -import { IBaseEscrow } from "contracts/interfaces/IBaseEscrow.sol"; -import { ImmutablesLib } from "contracts/libraries/ImmutablesLib.sol"; +import { BaseEscrowFactory } from "../BaseEscrowFactory.sol"; +import { MerkleStorageInvalidator } from "../MerkleStorageInvalidator.sol"; +import { IBaseEscrow } from "../interfaces/IBaseEscrow.sol"; +import { ImmutablesLib } from "../libraries/ImmutablesLib.sol"; -import { EscrowDstZkSync } from "contracts/zkSync/EscrowDstZkSync.sol"; -import { EscrowSrcZkSync } from "contracts/zkSync/EscrowSrcZkSync.sol"; -import { MinimalProxyZkSync } from "contracts/zkSync/MinimalProxyZkSync.sol"; -import { ZkSyncLib } from "contracts/zkSync/ZkSyncLib.sol"; +import { EscrowDstZkSync } from "./EscrowDstZkSync.sol"; +import { EscrowSrcZkSync } from "./EscrowSrcZkSync.sol"; +import { MinimalProxyZkSync } from "./MinimalProxyZkSync.sol"; +import { ZkSyncLib } from "./ZkSyncLib.sol"; /** * @title Escrow Factory contract @@ -33,7 +33,7 @@ contract EscrowFactoryZkSync is BaseEscrowFactory { address owner, uint32 rescueDelaySrc, uint32 rescueDelayDst - ) + ) BaseExtension(limitOrderProtocol) ResolverValidationExtension(feeToken, accessToken, owner) MerkleStorageInvalidator(limitOrderProtocol) { diff --git a/contracts/zkSync/EscrowSrcZkSync.sol b/contracts/zkSync/EscrowSrcZkSync.sol index 947f136..4c8c054 100644 --- a/contracts/zkSync/EscrowSrcZkSync.sol +++ b/contracts/zkSync/EscrowSrcZkSync.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.23; -import { Escrow, EscrowSrc } from "contracts/EscrowSrc.sol"; -import { EscrowZkSync } from "contracts/zkSync/EscrowZkSync.sol"; +import { Escrow, EscrowSrc } from "../EscrowSrc.sol"; +import { EscrowZkSync } from "./EscrowZkSync.sol"; contract EscrowSrcZkSync is EscrowSrc, EscrowZkSync { constructor(uint32 rescueDelay) EscrowSrc(rescueDelay) EscrowZkSync() {} diff --git a/contracts/zkSync/EscrowZkSync.sol b/contracts/zkSync/EscrowZkSync.sol index b88d77e..950c6b4 100644 --- a/contracts/zkSync/EscrowZkSync.sol +++ b/contracts/zkSync/EscrowZkSync.sol @@ -2,10 +2,10 @@ pragma solidity 0.8.23; -import { BaseEscrow } from "contracts/BaseEscrow.sol"; +import { BaseEscrow } from "../BaseEscrow.sol"; -import { ImmutablesLib } from "contracts/libraries/ImmutablesLib.sol"; -import { ZkSyncLib } from "contracts/zkSync/ZkSyncLib.sol"; +import { ImmutablesLib } from "../libraries/ImmutablesLib.sol"; +import { ZkSyncLib } from "./ZkSyncLib.sol"; abstract contract EscrowZkSync is BaseEscrow { using ImmutablesLib for Immutables; diff --git a/remappings.txt b/remappings.txt index 9ab37bb..ef64d6b 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,4 +1,3 @@ @1inch/limit-order-protocol-contract/=lib/limit-order-protocol/ @1inch/limit-order-settlement/=lib/limit-order-settlement/ @1inch/solidity-utils/=lib/solidity-utils/ -openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/ diff --git a/test/integration/EscrowFactory.t.sol b/test/integration/EscrowFactory.t.sol index aaf7b39..4a098b8 100644 --- a/test/integration/EscrowFactory.t.sol +++ b/test/integration/EscrowFactory.t.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.23; -import { IEscrowFactory } from "contracts/interfaces/IEscrowFactory.sol"; -import { IBaseEscrow } from "contracts/interfaces/IBaseEscrow.sol"; +import { IEscrowFactory } from "../../contracts/interfaces/IEscrowFactory.sol"; +import { IBaseEscrow } from "../../contracts/interfaces/IBaseEscrow.sol"; import { Address, AddressLib, BaseSetup, IOrderMixin, TakerTraits } from "../utils/BaseSetup.sol"; diff --git a/test/integration/MerkleStorageInvalidator.t.sol b/test/integration/MerkleStorageInvalidator.t.sol index dad8305..6cc492e 100644 --- a/test/integration/MerkleStorageInvalidator.t.sol +++ b/test/integration/MerkleStorageInvalidator.t.sol @@ -3,9 +3,9 @@ pragma solidity 0.8.23; import { Merkle } from "murky/src/Merkle.sol"; -import { IBaseEscrow } from "contracts/interfaces/IBaseEscrow.sol"; -import { IEscrowFactory } from "contracts/interfaces/IEscrowFactory.sol"; -import { IMerkleStorageInvalidator } from "contracts/interfaces/IMerkleStorageInvalidator.sol"; +import { IBaseEscrow } from "../../contracts/interfaces/IBaseEscrow.sol"; +import { IEscrowFactory } from "../../contracts/interfaces/IEscrowFactory.sol"; +import { IMerkleStorageInvalidator } from "../../contracts/interfaces/IMerkleStorageInvalidator.sol"; import { BaseSetup, EscrowSrc, IOrderMixin, TakerTraits } from "../utils/BaseSetup.sol"; diff --git a/test/integration/ResolverMock.t.sol b/test/integration/ResolverMock.t.sol index 5cc39d7..79c41dd 100644 --- a/test/integration/ResolverMock.t.sol +++ b/test/integration/ResolverMock.t.sol @@ -2,11 +2,11 @@ pragma solidity 0.8.23; -import { IBaseEscrow } from "contracts/interfaces/IBaseEscrow.sol"; -import { IEscrowDst } from "contracts/interfaces/IEscrowDst.sol"; -import { IEscrowSrc } from "contracts/interfaces/IEscrowSrc.sol"; -import { Timelocks } from "contracts/libraries/TimelocksLib.sol"; -import { IResolverMock, ResolverMock } from "contracts/mocks/ResolverMock.sol"; +import { IBaseEscrow } from "../../contracts/interfaces/IBaseEscrow.sol"; +import { IEscrowDst } from "../../contracts/interfaces/IEscrowDst.sol"; +import { IEscrowSrc } from "../../contracts/interfaces/IEscrowSrc.sol"; +import { Timelocks } from "../../contracts/libraries/TimelocksLib.sol"; +import { IResolverMock, ResolverMock } from "../../contracts/mocks/ResolverMock.sol"; import { BaseSetup, IOrderMixin, TakerTraits } from "../utils/BaseSetup.sol"; contract IntegrationResolverMockTest is BaseSetup { diff --git a/test/libraries/TimelocksLib.t.sol b/test/libraries/TimelocksLib.t.sol index 8d593da..1a23af5 100644 --- a/test/libraries/TimelocksLib.t.sol +++ b/test/libraries/TimelocksLib.t.sol @@ -3,10 +3,10 @@ pragma solidity 0.8.23; import { stdError } from "forge-std/StdError.sol"; -import { IBaseEscrow } from "contracts/interfaces/IBaseEscrow.sol"; -import { IEscrowDst } from "contracts/interfaces/IEscrowDst.sol"; +import { IBaseEscrow } from "../../contracts/interfaces/IBaseEscrow.sol"; +import { IEscrowDst } from "../../contracts/interfaces/IEscrowDst.sol"; -import { Timelocks } from "contracts/libraries/TimelocksLib.sol"; +import { Timelocks } from "../../contracts/libraries/TimelocksLib.sol"; import { TimelocksSettersLib } from "../utils/libraries/TimelocksSettersLib.sol"; import { BaseSetup } from "../utils/BaseSetup.sol"; diff --git a/test/unit/Escrow.t.sol b/test/unit/Escrow.t.sol index d09aa60..e74f102 100644 --- a/test/unit/Escrow.t.sol +++ b/test/unit/Escrow.t.sol @@ -3,11 +3,11 @@ pragma solidity 0.8.23; import { Address } from "solidity-utils/libraries/AddressLib.sol"; -import { IBaseEscrow } from "contracts/interfaces/IBaseEscrow.sol"; -import { IEscrowFactory } from "contracts/interfaces/IEscrowFactory.sol"; -import { IEscrowSrc } from "contracts/interfaces/IEscrowSrc.sol"; -import { IEscrowDst } from "contracts/interfaces/IEscrowDst.sol"; -import { NoReceiveCaller } from "contracts/mocks/NoReceiveCaller.sol"; +import { IBaseEscrow } from "../../contracts/interfaces/IBaseEscrow.sol"; +import { IEscrowFactory } from "../../contracts/interfaces/IEscrowFactory.sol"; +import { IEscrowSrc } from "../../contracts/interfaces/IEscrowSrc.sol"; +import { IEscrowDst } from "../../contracts/interfaces/IEscrowDst.sol"; +import { NoReceiveCaller } from "../../contracts/mocks/NoReceiveCaller.sol"; import { BaseSetup, IOrderMixin } from "../utils/BaseSetup.sol"; diff --git a/test/unit/EscrowFactory.t.sol b/test/unit/EscrowFactory.t.sol index 709415b..4fdfdb2 100644 --- a/test/unit/EscrowFactory.t.sol +++ b/test/unit/EscrowFactory.t.sol @@ -4,10 +4,10 @@ pragma solidity 0.8.23; import { ResolverValidationExtension } from "limit-order-settlement/extensions/ResolverValidationExtension.sol"; import { Merkle } from "murky/src/Merkle.sol"; -import { EscrowDst } from "contracts/EscrowDst.sol"; -import { IEscrowFactory } from "contracts/interfaces/IEscrowFactory.sol"; -import { IBaseEscrow } from "contracts/interfaces/IBaseEscrow.sol"; -import { Timelocks, TimelocksLib } from "contracts/libraries/TimelocksLib.sol"; +import { EscrowDst } from "../../contracts/EscrowDst.sol"; +import { IEscrowFactory } from "../../contracts/interfaces/IEscrowFactory.sol"; +import { IBaseEscrow } from "../../contracts/interfaces/IBaseEscrow.sol"; +import { Timelocks, TimelocksLib } from "../../contracts/libraries/TimelocksLib.sol"; import { Address, AddressLib, BaseSetup, EscrowSrc, IOrderMixin } from "../utils/BaseSetup.sol"; diff --git a/test/unit/MerkleStorageInvalidator.t.sol b/test/unit/MerkleStorageInvalidator.t.sol index 91ec84e..5d43db9 100644 --- a/test/unit/MerkleStorageInvalidator.t.sol +++ b/test/unit/MerkleStorageInvalidator.t.sol @@ -5,7 +5,7 @@ import { Merkle } from "murky/src/Merkle.sol"; import { ITakerInteraction } from "limit-order-protocol/interfaces/ITakerInteraction.sol"; -import { IMerkleStorageInvalidator } from "contracts/interfaces/IMerkleStorageInvalidator.sol"; +import { IMerkleStorageInvalidator } from "../../contracts/interfaces/IMerkleStorageInvalidator.sol"; import { Address, BaseSetup, IOrderMixin, MakerTraits } from "../utils/BaseSetup.sol"; diff --git a/test/utils/BaseSetup.sol b/test/utils/BaseSetup.sol index 55a2db3..e155dca 100644 --- a/test/utils/BaseSetup.sol +++ b/test/utils/BaseSetup.sol @@ -13,13 +13,13 @@ import { Address, AddressLib } from "solidity-utils/libraries/AddressLib.sol"; import { TokenCustomDecimalsMock } from "solidity-utils/mocks/TokenCustomDecimalsMock.sol"; import { TokenMock } from "solidity-utils/mocks/TokenMock.sol"; -import { EscrowDst } from "contracts/EscrowDst.sol"; -import { EscrowSrc } from "contracts/EscrowSrc.sol"; -import { BaseEscrowFactory } from "contracts/BaseEscrowFactory.sol"; -import { EscrowFactory } from "contracts/EscrowFactory.sol"; -import { ERC20True } from "contracts/mocks/ERC20True.sol"; -import { IBaseEscrow } from "contracts/interfaces/IBaseEscrow.sol"; -import { EscrowFactoryZkSync } from "contracts/zkSync/EscrowFactoryZkSync.sol"; +import { EscrowDst } from "../../contracts/EscrowDst.sol"; +import { EscrowSrc } from "../../contracts/EscrowSrc.sol"; +import { BaseEscrowFactory } from "../../contracts/BaseEscrowFactory.sol"; +import { EscrowFactory } from "../../contracts/EscrowFactory.sol"; +import { ERC20True } from "../../contracts/mocks/ERC20True.sol"; +import { IBaseEscrow } from "../../contracts/interfaces/IBaseEscrow.sol"; +import { EscrowFactoryZkSync } from "../../contracts/zkSync/EscrowFactoryZkSync.sol"; import { Timelocks, TimelocksSettersLib } from "./libraries/TimelocksSettersLib.sol"; diff --git a/test/utils/libraries/TimelocksSettersLib.sol b/test/utils/libraries/TimelocksSettersLib.sol index 1a3e204..0271c6f 100644 --- a/test/utils/libraries/TimelocksSettersLib.sol +++ b/test/utils/libraries/TimelocksSettersLib.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { Timelocks, TimelocksLib } from "contracts/libraries/TimelocksLib.sol"; +import { Timelocks, TimelocksLib } from "../../../contracts/libraries/TimelocksLib.sol"; /** * @title Library with setters for Timelocks. diff --git a/test/utils/mocks/TimelocksLibMock.sol b/test/utils/mocks/TimelocksLibMock.sol index e80b2f7..7a3b4de 100644 --- a/test/utils/mocks/TimelocksLibMock.sol +++ b/test/utils/mocks/TimelocksLibMock.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { Timelocks, TimelocksLib } from "contracts/libraries/TimelocksLib.sol"; +import { Timelocks, TimelocksLib } from "../../../contracts/libraries/TimelocksLib.sol"; contract TimelocksLibMock { using TimelocksLib for Timelocks; From 7488214780b36c1bc6e64cfe4dfdb675db63c343 Mon Sep 17 00:00:00 2001 From: Mikhail Melnik Date: Thu, 11 Jul 2024 17:48:31 +0200 Subject: [PATCH 2/3] fix imports --- contracts/BaseEscrow.sol | 4 ++-- contracts/BaseEscrowFactory.sol | 10 +++++----- contracts/EscrowDst.sol | 4 ++-- contracts/EscrowFactory.sol | 6 +++--- contracts/EscrowSrc.sol | 4 ++-- contracts/MerkleStorageInvalidator.sol | 4 ++-- contracts/interfaces/IBaseEscrow.sol | 2 +- contracts/interfaces/IEscrowFactory.sol | 2 +- contracts/interfaces/IResolverMock.sol | 4 ++-- contracts/mocks/ResolverMock.sol | 4 ++-- contracts/zkSync/EscrowFactoryZkSync.sol | 4 ++-- test/unit/MerkleStorageInvalidator.t.sol | 2 +- test/utils/BaseSetup.sol | 18 +++++++++--------- 13 files changed, 34 insertions(+), 34 deletions(-) diff --git a/contracts/BaseEscrow.sol b/contracts/BaseEscrow.sol index 24284b3..df85286 100644 --- a/contracts/BaseEscrow.sol +++ b/contracts/BaseEscrow.sol @@ -3,8 +3,8 @@ pragma solidity 0.8.23; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import { AddressLib, Address } from "solidity-utils/libraries/AddressLib.sol"; -import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; +import { AddressLib, Address } from "solidity-utils/contracts/libraries/AddressLib.sol"; +import { SafeERC20 } from "solidity-utils/contracts/libraries/SafeERC20.sol"; import { ImmutablesLib } from "./libraries/ImmutablesLib.sol"; import { Timelocks, TimelocksLib } from "./libraries/TimelocksLib.sol"; diff --git a/contracts/BaseEscrowFactory.sol b/contracts/BaseEscrowFactory.sol index 93401f1..8f2fed5 100644 --- a/contracts/BaseEscrowFactory.sol +++ b/contracts/BaseEscrowFactory.sol @@ -5,12 +5,12 @@ pragma solidity 0.8.23; import { Clones } from "openzeppelin-contracts/contracts/proxy/Clones.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import { Create2 } from "openzeppelin-contracts/contracts/utils/Create2.sol"; -import { Address, AddressLib } from "solidity-utils/libraries/AddressLib.sol"; -import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; +import { Address, AddressLib } from "solidity-utils/contracts/libraries/AddressLib.sol"; +import { SafeERC20 } from "solidity-utils/contracts/libraries/SafeERC20.sol"; -import { IOrderMixin } from "limit-order-protocol/interfaces/IOrderMixin.sol"; -import { MakerTraitsLib } from "limit-order-protocol/libraries/MakerTraitsLib.sol"; -import { ResolverValidationExtension } from "limit-order-settlement/extensions/ResolverValidationExtension.sol"; +import { IOrderMixin } from "limit-order-protocol/contracts/interfaces/IOrderMixin.sol"; +import { MakerTraitsLib } from "limit-order-protocol/contracts/libraries/MakerTraitsLib.sol"; +import { ResolverValidationExtension } from "limit-order-settlement/contracts/extensions/ResolverValidationExtension.sol"; import { ImmutablesLib } from "./libraries/ImmutablesLib.sol"; import { Timelocks, TimelocksLib } from "./libraries/TimelocksLib.sol"; diff --git a/contracts/EscrowDst.sol b/contracts/EscrowDst.sol index 13efe57..5abd37f 100644 --- a/contracts/EscrowDst.sol +++ b/contracts/EscrowDst.sol @@ -3,8 +3,8 @@ pragma solidity 0.8.23; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; -import { AddressLib, Address } from "solidity-utils/libraries/AddressLib.sol"; +import { SafeERC20 } from "solidity-utils/contracts/libraries/SafeERC20.sol"; +import { AddressLib, Address } from "solidity-utils/contracts/libraries/AddressLib.sol"; import { Timelocks, TimelocksLib } from "./libraries/TimelocksLib.sol"; diff --git a/contracts/EscrowFactory.sol b/contracts/EscrowFactory.sol index a5e95ec..b71e62b 100644 --- a/contracts/EscrowFactory.sol +++ b/contracts/EscrowFactory.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.23; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import { BaseExtension } from "limit-order-settlement/extensions/BaseExtension.sol"; -import { ResolverValidationExtension } from "limit-order-settlement/extensions/ResolverValidationExtension.sol"; +import { BaseExtension } from "limit-order-settlement/contracts/extensions/BaseExtension.sol"; +import { ResolverValidationExtension } from "limit-order-settlement/contracts/extensions/ResolverValidationExtension.sol"; import { ProxyHashLib } from "./libraries/ProxyHashLib.sol"; @@ -27,7 +27,7 @@ contract EscrowFactory is BaseEscrowFactory { address owner, uint32 rescueDelaySrc, uint32 rescueDelayDst - ) + ) BaseExtension(limitOrderProtocol) ResolverValidationExtension(feeToken, accessToken, owner) MerkleStorageInvalidator(limitOrderProtocol) { diff --git a/contracts/EscrowSrc.sol b/contracts/EscrowSrc.sol index b55a05e..df78cbe 100644 --- a/contracts/EscrowSrc.sol +++ b/contracts/EscrowSrc.sol @@ -3,8 +3,8 @@ pragma solidity 0.8.23; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; -import { AddressLib, Address } from "solidity-utils/libraries/AddressLib.sol"; +import { SafeERC20 } from "solidity-utils/contracts/libraries/SafeERC20.sol"; +import { AddressLib, Address } from "solidity-utils/contracts/libraries/AddressLib.sol"; import { Timelocks, TimelocksLib } from "./libraries/TimelocksLib.sol"; import { ImmutablesLib } from "./libraries/ImmutablesLib.sol"; diff --git a/contracts/MerkleStorageInvalidator.sol b/contracts/MerkleStorageInvalidator.sol index 237d58b..1f0f332 100644 --- a/contracts/MerkleStorageInvalidator.sol +++ b/contracts/MerkleStorageInvalidator.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.23; -import { IOrderMixin } from "limit-order-protocol/interfaces/IOrderMixin.sol"; -import { ITakerInteraction } from "limit-order-protocol/interfaces/ITakerInteraction.sol"; +import { IOrderMixin } from "limit-order-protocol/contracts/interfaces/IOrderMixin.sol"; +import { ITakerInteraction } from "limit-order-protocol/contracts/interfaces/ITakerInteraction.sol"; import { MerkleProof } from "openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; import { IMerkleStorageInvalidator } from "./interfaces/IMerkleStorageInvalidator.sol"; diff --git a/contracts/interfaces/IBaseEscrow.sol b/contracts/interfaces/IBaseEscrow.sol index e1d9992..0e49513 100644 --- a/contracts/interfaces/IBaseEscrow.sol +++ b/contracts/interfaces/IBaseEscrow.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.0; -import { Address } from "solidity-utils/libraries/AddressLib.sol"; +import { Address } from "solidity-utils/contracts/libraries/AddressLib.sol"; import { Timelocks } from "../libraries/TimelocksLib.sol"; diff --git a/contracts/interfaces/IEscrowFactory.sol b/contracts/interfaces/IEscrowFactory.sol index e061907..8db71e3 100644 --- a/contracts/interfaces/IEscrowFactory.sol +++ b/contracts/interfaces/IEscrowFactory.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.0; -import { Address } from "solidity-utils/libraries/AddressLib.sol"; +import { Address } from "solidity-utils/contracts/libraries/AddressLib.sol"; import { Timelocks } from "../libraries/TimelocksLib.sol"; diff --git a/contracts/interfaces/IResolverMock.sol b/contracts/interfaces/IResolverMock.sol index 03897cf..4fbf5e8 100644 --- a/contracts/interfaces/IResolverMock.sol +++ b/contracts/interfaces/IResolverMock.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.23; -import { IOrderMixin } from "limit-order-protocol/interfaces/IOrderMixin.sol"; -import { TakerTraits } from "limit-order-protocol/libraries/TakerTraitsLib.sol"; +import { IOrderMixin } from "limit-order-protocol/contracts/interfaces/IOrderMixin.sol"; +import { TakerTraits } from "limit-order-protocol/contracts/libraries/TakerTraitsLib.sol"; import { IBaseEscrow } from "../interfaces/IBaseEscrow.sol"; diff --git a/contracts/mocks/ResolverMock.sol b/contracts/mocks/ResolverMock.sol index 52cceb8..99b17b1 100644 --- a/contracts/mocks/ResolverMock.sol +++ b/contracts/mocks/ResolverMock.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.23; import { Ownable } from "openzeppelin-contracts/contracts/access/Ownable.sol"; -import { IOrderMixin } from "limit-order-protocol/interfaces/IOrderMixin.sol"; -import { TakerTraits } from "limit-order-protocol/libraries/TakerTraitsLib.sol"; +import { IOrderMixin } from "limit-order-protocol/contracts/interfaces/IOrderMixin.sol"; +import { TakerTraits } from "limit-order-protocol/contracts/libraries/TakerTraitsLib.sol"; import { RevertReasonForwarder } from "solidity-utils/libraries/RevertReasonForwarder.sol"; import { IBaseEscrow } from "../interfaces/IBaseEscrow.sol"; diff --git a/contracts/zkSync/EscrowFactoryZkSync.sol b/contracts/zkSync/EscrowFactoryZkSync.sol index 94efb5a..b04b9d6 100644 --- a/contracts/zkSync/EscrowFactoryZkSync.sol +++ b/contracts/zkSync/EscrowFactoryZkSync.sol @@ -3,8 +3,8 @@ pragma solidity 0.8.23; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import { BaseExtension } from "limit-order-settlement/extensions/BaseExtension.sol"; -import { ResolverValidationExtension } from "limit-order-settlement/extensions/ResolverValidationExtension.sol"; +import { BaseExtension } from "limit-order-settlement/contracts/extensions/BaseExtension.sol"; +import { ResolverValidationExtension } from "limit-order-settlement/contracts/extensions/ResolverValidationExtension.sol"; import { BaseEscrowFactory } from "../BaseEscrowFactory.sol"; import { MerkleStorageInvalidator } from "../MerkleStorageInvalidator.sol"; diff --git a/test/unit/MerkleStorageInvalidator.t.sol b/test/unit/MerkleStorageInvalidator.t.sol index 5d43db9..900b023 100644 --- a/test/unit/MerkleStorageInvalidator.t.sol +++ b/test/unit/MerkleStorageInvalidator.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.23; import { Merkle } from "murky/src/Merkle.sol"; -import { ITakerInteraction } from "limit-order-protocol/interfaces/ITakerInteraction.sol"; +import { ITakerInteraction } from "limit-order-protocol/contracts/interfaces/ITakerInteraction.sol"; import { IMerkleStorageInvalidator } from "../../contracts/interfaces/IMerkleStorageInvalidator.sol"; diff --git a/test/utils/BaseSetup.sol b/test/utils/BaseSetup.sol index e155dca..798bb3e 100644 --- a/test/utils/BaseSetup.sol +++ b/test/utils/BaseSetup.sol @@ -3,15 +3,15 @@ pragma solidity 0.8.23; import { Test } from "forge-std/Test.sol"; -import { IWETH, LimitOrderProtocol } from "limit-order-protocol/LimitOrderProtocol.sol"; -import { IOrderMixin } from "limit-order-protocol/interfaces/IOrderMixin.sol"; -import { MakerTraits, MakerTraitsLib } from "limit-order-protocol/libraries/MakerTraitsLib.sol"; -import { TakerTraits } from "limit-order-protocol/libraries/TakerTraitsLib.sol"; -import { WrappedTokenMock } from "limit-order-protocol/mocks/WrappedTokenMock.sol"; -import { IFeeBank } from "limit-order-settlement/interfaces/IFeeBank.sol"; -import { Address, AddressLib } from "solidity-utils/libraries/AddressLib.sol"; -import { TokenCustomDecimalsMock } from "solidity-utils/mocks/TokenCustomDecimalsMock.sol"; -import { TokenMock } from "solidity-utils/mocks/TokenMock.sol"; +import { IWETH, LimitOrderProtocol } from "limit-order-protocol/contracts/LimitOrderProtocol.sol"; +import { IOrderMixin } from "limit-order-protocol/contracts/interfaces/IOrderMixin.sol"; +import { MakerTraits, MakerTraitsLib } from "limit-order-protocol/contracts/libraries/MakerTraitsLib.sol"; +import { TakerTraits } from "limit-order-protocol/contracts/libraries/TakerTraitsLib.sol"; +import { WrappedTokenMock } from "limit-order-protocol/contracts/mocks/WrappedTokenMock.sol"; +import { IFeeBank } from "limit-order-settlement/contracts/interfaces/IFeeBank.sol"; +import { Address, AddressLib } from "solidity-utils/contracts/libraries/AddressLib.sol"; +import { TokenCustomDecimalsMock } from "solidity-utils/contracts/mocks/TokenCustomDecimalsMock.sol"; +import { TokenMock } from "solidity-utils/contracts/mocks/TokenMock.sol"; import { EscrowDst } from "../../contracts/EscrowDst.sol"; import { EscrowSrc } from "../../contracts/EscrowSrc.sol"; From 334193a813f7bdeca8cf5e20bac772a451935f0a Mon Sep 17 00:00:00 2001 From: Mikhail Melnik Date: Thu, 11 Jul 2024 18:13:12 +0200 Subject: [PATCH 3/3] fix --- contracts/mocks/NoReceiveCaller.sol | 2 +- contracts/mocks/ResolverMock.sol | 2 +- remappings.txt | 3 +++ test/unit/Escrow.t.sol | 2 +- test/unit/EscrowFactory.t.sol | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/contracts/mocks/NoReceiveCaller.sol b/contracts/mocks/NoReceiveCaller.sol index 44c2a97..6e7aa85 100644 --- a/contracts/mocks/NoReceiveCaller.sol +++ b/contracts/mocks/NoReceiveCaller.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.23; -import { RevertReasonForwarder } from "solidity-utils/libraries/RevertReasonForwarder.sol"; +import { RevertReasonForwarder } from "solidity-utils/contracts/libraries/RevertReasonForwarder.sol"; contract NoReceiveCaller { function arbitraryCall(address target, bytes calldata arguments) external { diff --git a/contracts/mocks/ResolverMock.sol b/contracts/mocks/ResolverMock.sol index 99b17b1..029d15f 100644 --- a/contracts/mocks/ResolverMock.sol +++ b/contracts/mocks/ResolverMock.sol @@ -6,7 +6,7 @@ import { Ownable } from "openzeppelin-contracts/contracts/access/Ownable.sol"; import { IOrderMixin } from "limit-order-protocol/contracts/interfaces/IOrderMixin.sol"; import { TakerTraits } from "limit-order-protocol/contracts/libraries/TakerTraitsLib.sol"; -import { RevertReasonForwarder } from "solidity-utils/libraries/RevertReasonForwarder.sol"; +import { RevertReasonForwarder } from "solidity-utils/contracts/libraries/RevertReasonForwarder.sol"; import { IBaseEscrow } from "../interfaces/IBaseEscrow.sol"; import { IEscrowFactory } from "../interfaces/IEscrowFactory.sol"; diff --git a/remappings.txt b/remappings.txt index ef64d6b..4080c6f 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,3 +1,6 @@ @1inch/limit-order-protocol-contract/=lib/limit-order-protocol/ @1inch/limit-order-settlement/=lib/limit-order-settlement/ @1inch/solidity-utils/=lib/solidity-utils/ +solidity-utils/=lib/solidity-utils/ +limit-order-protocol/=lib/limit-order-protocol/ +limit-order-settlement/=lib/limit-order-settlement/ diff --git a/test/unit/Escrow.t.sol b/test/unit/Escrow.t.sol index e74f102..6754028 100644 --- a/test/unit/Escrow.t.sol +++ b/test/unit/Escrow.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.23; -import { Address } from "solidity-utils/libraries/AddressLib.sol"; +import { Address } from "solidity-utils/contracts/libraries/AddressLib.sol"; import { IBaseEscrow } from "../../contracts/interfaces/IBaseEscrow.sol"; import { IEscrowFactory } from "../../contracts/interfaces/IEscrowFactory.sol"; diff --git a/test/unit/EscrowFactory.t.sol b/test/unit/EscrowFactory.t.sol index 4fdfdb2..ad195c4 100644 --- a/test/unit/EscrowFactory.t.sol +++ b/test/unit/EscrowFactory.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.23; -import { ResolverValidationExtension } from "limit-order-settlement/extensions/ResolverValidationExtension.sol"; +import { ResolverValidationExtension } from "limit-order-settlement/contracts/extensions/ResolverValidationExtension.sol"; import { Merkle } from "murky/src/Merkle.sol"; import { EscrowDst } from "../../contracts/EscrowDst.sol";