From 9321173fe74d00e368d9f536d2c577e0c14d1d15 Mon Sep 17 00:00:00 2001 From: Leonardo Massazza Date: Fri, 4 Aug 2023 19:49:27 +0100 Subject: [PATCH] Remove unused imports (#1746) --- .../contracts/interfaces/IMarketConfigurationModule.sol | 2 -- .../perps-market/contracts/interfaces/IPerpsMarketModule.sol | 2 -- markets/perps-market/contracts/mocks/FeeCollectorMock.sol | 1 - markets/perps-market/contracts/modules/AsyncOrderModule.sol | 1 - .../contracts/modules/AsyncOrderSettlementModule.sol | 5 ----- .../contracts/modules/MarketConfigurationModule.sol | 2 -- markets/perps-market/contracts/modules/PerpsMarketModule.sol | 1 - markets/perps-market/contracts/storage/AsyncOrder.sol | 1 - markets/perps-market/contracts/storage/PerpsAccount.sol | 1 - markets/perps-market/contracts/storage/PerpsMarket.sol | 3 --- markets/perps-market/contracts/storage/Position.sol | 3 --- 11 files changed, 22 deletions(-) diff --git a/markets/perps-market/contracts/interfaces/IMarketConfigurationModule.sol b/markets/perps-market/contracts/interfaces/IMarketConfigurationModule.sol index b86e6ea2af..17997d77c6 100644 --- a/markets/perps-market/contracts/interfaces/IMarketConfigurationModule.sol +++ b/markets/perps-market/contracts/interfaces/IMarketConfigurationModule.sol @@ -2,8 +2,6 @@ pragma solidity >=0.8.11 <0.9.0; import {SettlementStrategy} from "../storage/SettlementStrategy.sol"; -import {PerpsMarketConfiguration} from "../storage/PerpsMarketConfiguration.sol"; -import {OrderFee} from "../storage/OrderFee.sol"; /** * @title Module for updating configuration in relation to async order modules. diff --git a/markets/perps-market/contracts/interfaces/IPerpsMarketModule.sol b/markets/perps-market/contracts/interfaces/IPerpsMarketModule.sol index 1041767681..c50666862d 100644 --- a/markets/perps-market/contracts/interfaces/IPerpsMarketModule.sol +++ b/markets/perps-market/contracts/interfaces/IPerpsMarketModule.sol @@ -1,8 +1,6 @@ //SPDX-License-Identifier: MIT pragma solidity >=0.8.11 <0.9.0; -import {AsyncOrder} from "../storage/AsyncOrder.sol"; - /** * @title Perps market module */ diff --git a/markets/perps-market/contracts/mocks/FeeCollectorMock.sol b/markets/perps-market/contracts/mocks/FeeCollectorMock.sol index 7418edca37..545e2b3faf 100644 --- a/markets/perps-market/contracts/mocks/FeeCollectorMock.sol +++ b/markets/perps-market/contracts/mocks/FeeCollectorMock.sol @@ -1,7 +1,6 @@ //SPDX-License-Identifier: MIT pragma solidity >=0.8.11 <0.9.0; -import "@synthetixio/core-modules/contracts/interfaces/ITokenModule.sol"; import "../interfaces/external/IFeeCollector.sol"; contract FeeCollectorMock is IFeeCollector { diff --git a/markets/perps-market/contracts/modules/AsyncOrderModule.sol b/markets/perps-market/contracts/modules/AsyncOrderModule.sol index 430e8e8e48..84af91bf50 100644 --- a/markets/perps-market/contracts/modules/AsyncOrderModule.sol +++ b/markets/perps-market/contracts/modules/AsyncOrderModule.sol @@ -6,7 +6,6 @@ import {DecimalMath} from "@synthetixio/core-contracts/contracts/utils/DecimalMa import {Account} from "@synthetixio/main/contracts/storage/Account.sol"; import {AccountRBAC} from "@synthetixio/main/contracts/storage/AccountRBAC.sol"; import {IAsyncOrderModule} from "../interfaces/IAsyncOrderModule.sol"; -import {MathUtil} from "../utils/MathUtil.sol"; import {PerpsMarket} from "../storage/PerpsMarket.sol"; import {AsyncOrder} from "../storage/AsyncOrder.sol"; import {PerpsPrice} from "../storage/PerpsPrice.sol"; diff --git a/markets/perps-market/contracts/modules/AsyncOrderSettlementModule.sol b/markets/perps-market/contracts/modules/AsyncOrderSettlementModule.sol index 6d773086fe..57c157c7d5 100644 --- a/markets/perps-market/contracts/modules/AsyncOrderSettlementModule.sol +++ b/markets/perps-market/contracts/modules/AsyncOrderSettlementModule.sol @@ -4,10 +4,7 @@ pragma solidity >=0.8.11 <0.9.0; import {IAsyncOrderSettlementModule} from "../interfaces/IAsyncOrderSettlementModule.sol"; import {SafeCastU256, SafeCastI256} from "@synthetixio/core-contracts/contracts/utils/SafeCast.sol"; import {DecimalMath} from "@synthetixio/core-contracts/contracts/utils/DecimalMath.sol"; -import {Account} from "@synthetixio/main/contracts/storage/Account.sol"; -import {AccountRBAC} from "@synthetixio/main/contracts/storage/AccountRBAC.sol"; import {IPythVerifier} from "../interfaces/external/IPythVerifier.sol"; -import {IAsyncOrderModule} from "../interfaces/IAsyncOrderModule.sol"; import {PerpsAccount, SNX_USD_MARKET_ID} from "../storage/PerpsAccount.sol"; import {MathUtil} from "../utils/MathUtil.sol"; import {PerpsMarket} from "../storage/PerpsMarket.sol"; @@ -15,7 +12,6 @@ import {AsyncOrder} from "../storage/AsyncOrder.sol"; import {Position} from "../storage/Position.sol"; import {PerpsPrice} from "../storage/PerpsPrice.sol"; import {GlobalPerpsMarket} from "../storage/GlobalPerpsMarket.sol"; -import {PerpsMarketConfiguration} from "../storage/PerpsMarketConfiguration.sol"; import {SettlementStrategy} from "../storage/SettlementStrategy.sol"; import {PerpsMarketFactory} from "../storage/PerpsMarketFactory.sol"; import {GlobalPerpsMarketConfiguration} from "../storage/GlobalPerpsMarketConfiguration.sol"; @@ -33,7 +29,6 @@ contract AsyncOrderSettlementModule is IAsyncOrderSettlementModule, IMarketEvent using PerpsMarketFactory for PerpsMarketFactory.Data; using GlobalPerpsMarket for GlobalPerpsMarket.Data; using GlobalPerpsMarketConfiguration for GlobalPerpsMarketConfiguration.Data; - using PerpsMarketConfiguration for PerpsMarketConfiguration.Data; using Position for Position.Data; using SafeCastU256 for uint256; using SafeCastI256 for int256; diff --git a/markets/perps-market/contracts/modules/MarketConfigurationModule.sol b/markets/perps-market/contracts/modules/MarketConfigurationModule.sol index 320e348429..15bd4bb1ee 100644 --- a/markets/perps-market/contracts/modules/MarketConfigurationModule.sol +++ b/markets/perps-market/contracts/modules/MarketConfigurationModule.sol @@ -5,9 +5,7 @@ import {OwnableStorage} from "@synthetixio/core-contracts/contracts/ownership/Ow import {IMarketConfigurationModule} from "../interfaces/IMarketConfigurationModule.sol"; import {SettlementStrategy} from "../storage/SettlementStrategy.sol"; import {PerpsMarketConfiguration} from "../storage/PerpsMarketConfiguration.sol"; -import {PerpsMarket} from "../storage/PerpsMarket.sol"; import {PerpsPrice} from "../storage/PerpsPrice.sol"; -import {OrderFee} from "../storage/OrderFee.sol"; /** * @title Module for updating configuration in relation to async order modules. diff --git a/markets/perps-market/contracts/modules/PerpsMarketModule.sol b/markets/perps-market/contracts/modules/PerpsMarketModule.sol index 5755766c8f..c8d60b6636 100644 --- a/markets/perps-market/contracts/modules/PerpsMarketModule.sol +++ b/markets/perps-market/contracts/modules/PerpsMarketModule.sol @@ -6,7 +6,6 @@ import {PerpsMarketConfiguration} from "../storage/PerpsMarketConfiguration.sol" import {PerpsPrice} from "../storage/PerpsPrice.sol"; import {AsyncOrder} from "../storage/AsyncOrder.sol"; import {IPerpsMarketModule} from "../interfaces/IPerpsMarketModule.sol"; -import {AddressError} from "@synthetixio/core-contracts/contracts/errors/AddressError.sol"; contract PerpsMarketModule is IPerpsMarketModule { using PerpsMarket for PerpsMarket.Data; diff --git a/markets/perps-market/contracts/storage/AsyncOrder.sol b/markets/perps-market/contracts/storage/AsyncOrder.sol index 0fb6dd1e95..ddfb1f2601 100644 --- a/markets/perps-market/contracts/storage/AsyncOrder.sol +++ b/markets/perps-market/contracts/storage/AsyncOrder.sol @@ -3,7 +3,6 @@ pragma solidity >=0.8.11 <0.9.0; import {DecimalMath} from "@synthetixio/core-contracts/contracts/utils/DecimalMath.sol"; import {SafeCastI256, SafeCastU256, SafeCastI128} from "@synthetixio/core-contracts/contracts/utils/SafeCast.sol"; -import {IAsyncOrderModule} from "../interfaces/IAsyncOrderModule.sol"; import {SettlementStrategy} from "./SettlementStrategy.sol"; import {Position} from "./Position.sol"; import {PerpsMarketConfiguration} from "./PerpsMarketConfiguration.sol"; diff --git a/markets/perps-market/contracts/storage/PerpsAccount.sol b/markets/perps-market/contracts/storage/PerpsAccount.sol index 6e79ef29e7..0c7bbd9fa2 100644 --- a/markets/perps-market/contracts/storage/PerpsAccount.sol +++ b/markets/perps-market/contracts/storage/PerpsAccount.sol @@ -9,7 +9,6 @@ import {Position} from "./Position.sol"; import {PerpsMarket} from "./PerpsMarket.sol"; import {MathUtil} from "../utils/MathUtil.sol"; import {PerpsPrice} from "./PerpsPrice.sol"; -import {AsyncOrder} from "./AsyncOrder.sol"; import {PerpsMarketFactory} from "./PerpsMarketFactory.sol"; import {GlobalPerpsMarket} from "./GlobalPerpsMarket.sol"; import {GlobalPerpsMarketConfiguration} from "./GlobalPerpsMarketConfiguration.sol"; diff --git a/markets/perps-market/contracts/storage/PerpsMarket.sol b/markets/perps-market/contracts/storage/PerpsMarket.sol index 696bfa1c4b..dc5934c15e 100644 --- a/markets/perps-market/contracts/storage/PerpsMarket.sol +++ b/markets/perps-market/contracts/storage/PerpsMarket.sol @@ -3,13 +3,10 @@ pragma solidity >=0.8.11 <0.9.0; import {DecimalMath} from "@synthetixio/core-contracts/contracts/utils/DecimalMath.sol"; import {SafeCastU256, SafeCastI256, SafeCastU128} from "@synthetixio/core-contracts/contracts/utils/SafeCast.sol"; -import {AccessError} from "@synthetixio/core-contracts/contracts/errors/AccessError.sol"; -import {PerpsAccount} from "./PerpsAccount.sol"; import {Position} from "./Position.sol"; import {AsyncOrder} from "./AsyncOrder.sol"; import {PerpsMarketConfiguration} from "./PerpsMarketConfiguration.sol"; import {MathUtil} from "../utils/MathUtil.sol"; -import {OrderFee} from "./OrderFee.sol"; import {PerpsPrice} from "./PerpsPrice.sol"; /** diff --git a/markets/perps-market/contracts/storage/Position.sol b/markets/perps-market/contracts/storage/Position.sol index 61df4de0d9..43c2900176 100644 --- a/markets/perps-market/contracts/storage/Position.sol +++ b/markets/perps-market/contracts/storage/Position.sol @@ -4,8 +4,6 @@ pragma solidity >=0.8.11 <0.9.0; import {SafeCastI256, SafeCastU256, SafeCastI128, SafeCastU128} from "@synthetixio/core-contracts/contracts/utils/SafeCast.sol"; import {DecimalMath} from "@synthetixio/core-contracts/contracts/utils/DecimalMath.sol"; import {PerpsMarket} from "./PerpsMarket.sol"; -import {PerpsPrice} from "./PerpsPrice.sol"; -import {PerpsMarketConfiguration} from "./PerpsMarketConfiguration.sol"; import {MathUtil} from "../utils/MathUtil.sol"; library Position { @@ -17,7 +15,6 @@ library Position { using DecimalMath for uint256; using DecimalMath for int128; using PerpsMarket for PerpsMarket.Data; - using PerpsMarketConfiguration for PerpsMarketConfiguration.Data; struct Data { uint128 marketId;