From d6e8407c5ea0c5335bccd4761b3a3a9b53696f30 Mon Sep 17 00:00:00 2001 From: byshape Date: Tue, 9 Jul 2024 17:07:23 +0100 Subject: [PATCH] Clean up `ResolverMock` --- .gas-snapshot | 20 ++++++++++---------- contracts/mocks/ResolverMock.sol | 6 ------ 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index 85ec894..3666caf 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -57,16 +57,16 @@ IntegrationResolverMockTest:test_MockRescueFundsDst() (gas: 156496) IntegrationResolverMockTest:test_MockRescueFundsSrc() (gas: 379602) IntegrationResolverMockTest:test_MockWithdrawDst() (gas: 178381) IntegrationResolverMockTest:test_MockWithdrawToSrc() (gas: 352052) -MerkleStorageInvalidatorIntTest:test_MultipleFillsFillAllExtra() (gas: 921352) -MerkleStorageInvalidatorIntTest:test_MultipleFillsFillAllTwoFills() (gas: 920021) -MerkleStorageInvalidatorIntTest:test_MultipleFillsFillFirst() (gas: 704348) -MerkleStorageInvalidatorIntTest:test_MultipleFillsFillFirstTwoFills() (gas: 930370) -MerkleStorageInvalidatorIntTest:test_MultipleFillsFillLast() (gas: 704074) -MerkleStorageInvalidatorIntTest:test_MultipleFillsNoDeploymentWithoutValidation() (gas: 298889) -MerkleStorageInvalidatorIntTest:test_MultipleFillsNoSecondDeploymentWithTheSameIndex() (gas: 776093) -MerkleStorageInvalidatorIntTest:test_MultipleFillsOddDivision() (gas: 437424) -MerkleStorageInvalidatorIntTest:test_MultipleFillsOneFill() (gas: 704326) -MerkleStorageInvalidatorIntTest:test_MultipleFillsTwoFills() (gas: 918929) +MerkleStorageInvalidatorIntTest:test_MultipleFillsFillAllExtra() (gas: 921492) +MerkleStorageInvalidatorIntTest:test_MultipleFillsFillAllTwoFills() (gas: 920173) +MerkleStorageInvalidatorIntTest:test_MultipleFillsFillFirst() (gas: 704406) +MerkleStorageInvalidatorIntTest:test_MultipleFillsFillFirstTwoFills() (gas: 930326) +MerkleStorageInvalidatorIntTest:test_MultipleFillsFillLast() (gas: 704142) +MerkleStorageInvalidatorIntTest:test_MultipleFillsNoDeploymentWithoutValidation() (gas: 298851) +MerkleStorageInvalidatorIntTest:test_MultipleFillsNoSecondDeploymentWithTheSameIndex() (gas: 776050) +MerkleStorageInvalidatorIntTest:test_MultipleFillsOddDivision() (gas: 437381) +MerkleStorageInvalidatorIntTest:test_MultipleFillsOneFill() (gas: 704285) +MerkleStorageInvalidatorIntTest:test_MultipleFillsTwoFills() (gas: 918885) TimelocksLibTest:test_NoTimelocksOverflow() (gas: 128740) TimelocksLibTest:test_getStartTimestamps() (gas: 16180) TimelocksLibTest:test_setDeployedAt() (gas: 5731) \ No newline at end of file diff --git a/contracts/mocks/ResolverMock.sol b/contracts/mocks/ResolverMock.sol index 5430237..d785f53 100644 --- a/contracts/mocks/ResolverMock.sol +++ b/contracts/mocks/ResolverMock.sol @@ -2,14 +2,11 @@ pragma solidity 0.8.23; -import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; import { Ownable } from "openzeppelin-contracts/access/Ownable.sol"; import { IOrderMixin } from "limit-order-protocol/interfaces/IOrderMixin.sol"; import { TakerTraits } from "limit-order-protocol/libraries/TakerTraitsLib.sol"; -import { IWETH } from "solidity-utils/interfaces/IWETH.sol"; import { RevertReasonForwarder } from "solidity-utils/libraries/RevertReasonForwarder.sol"; -import { SafeERC20 } from "solidity-utils/libraries/SafeERC20.sol"; import { IBaseEscrow } from "../interfaces/IBaseEscrow.sol"; import { IEscrowFactory } from "../interfaces/IEscrowFactory.sol"; @@ -20,9 +17,6 @@ import { Timelocks } from "../libraries/TimelocksLib.sol"; * @title Sample implementation of a Resolver contract for cross-chain swap. */ contract ResolverMock is IResolverMock, Ownable { - using SafeERC20 for IERC20; - using SafeERC20 for IWETH; - IEscrowFactory private immutable _FACTORY; IOrderMixin private immutable _LOP;