diff --git a/contracts/persistent/external-positions/ExternalPositionProxy.sol b/contracts/persistent/external-positions/ExternalPositionProxy.sol index ba3dcff18..0e56733cd 100644 --- a/contracts/persistent/external-positions/ExternalPositionProxy.sol +++ b/contracts/persistent/external-positions/ExternalPositionProxy.sol @@ -10,7 +10,7 @@ pragma solidity 0.6.12; import "../vault/interfaces/IExternalPositionVault.sol"; -import "./IExternalPosition.sol"; +import "./IExternalPositionLibCore.sol"; import "./IExternalPositionProxy.sol"; /// @title ExternalPositionProxy Contract @@ -49,12 +49,13 @@ contract ExternalPositionProxy is IExternalPositionProxy { /// @notice Delegates call to IExternalPosition.receiveCallFromVault /// @param _data The bytes data variable to be decoded at the External Position - function receiveCallFromVault(bytes calldata _data) external { + function receiveCallFromVault(bytes calldata _data) external override { require(msg.sender == getVaultProxy(), "receiveCallFromVault: Only the vault can make this call"); address contractLogic = IExternalPositionVault(getVaultProxy()).getExternalPositionLibForType(getExternalPositionType()); - (bool success, bytes memory returnData) = - contractLogic.delegatecall(abi.encodeWithSelector(IExternalPosition.receiveCallFromVault.selector, _data)); + (bool success, bytes memory returnData) = contractLogic.delegatecall( + abi.encodeWithSelector(IExternalPositionLibCore.receiveCallFromVault.selector, _data) + ); require(success, string(returnData)); } diff --git a/contracts/persistent/external-positions/IExternalPositionLibCore.sol b/contracts/persistent/external-positions/IExternalPositionLibCore.sol new file mode 100644 index 000000000..396c65fb7 --- /dev/null +++ b/contracts/persistent/external-positions/IExternalPositionLibCore.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-3.0 + +/* + This file is part of the Enzyme Protocol. + (c) Enzyme Council + For the full license information, please view the LICENSE + file that was distributed with this source code. +*/ + +pragma solidity >=0.6.0 <0.9.0; + +/// @title IExternalPositionLibCore interface +/// @author Enzyme Council +/// @notice An interface for core required functions of an IExternalPositionLib instance +interface IExternalPositionLibCore { + function receiveCallFromVault(bytes memory _data) external; +} diff --git a/contracts/persistent/external-positions/IExternalPositionProxy.sol b/contracts/persistent/external-positions/IExternalPositionProxy.sol index d1b0c7e05..e1e933339 100644 --- a/contracts/persistent/external-positions/IExternalPositionProxy.sol +++ b/contracts/persistent/external-positions/IExternalPositionProxy.sol @@ -13,7 +13,9 @@ pragma solidity >=0.6.0 <0.9.0; /// @author Enzyme Council /// @notice An interface for publicly accessible functions on the ExternalPositionProxy interface IExternalPositionProxy { - function getExternalPositionType() external view returns (uint256); + function getExternalPositionType() external view returns (uint256 typeId_); - function getVaultProxy() external view returns (address); + function getVaultProxy() external view returns (address vaultProxy_); + + function receiveCallFromVault(bytes memory _data) external; } diff --git a/contracts/release/core/fund/comptroller/ComptrollerLib.sol b/contracts/release/core/fund/comptroller/ComptrollerLib.sol index 5798e9325..744e0d3b2 100644 --- a/contracts/release/core/fund/comptroller/ComptrollerLib.sol +++ b/contracts/release/core/fund/comptroller/ComptrollerLib.sol @@ -15,10 +15,10 @@ import {SafeMath} from "openzeppelin-solc-0.6/math/SafeMath.sol"; import {ERC20} from "openzeppelin-solc-0.6/token/ERC20/ERC20.sol"; import {SafeERC20} from "openzeppelin-solc-0.6/token/ERC20/SafeERC20.sol"; import {IDispatcher} from "../../../../persistent/dispatcher/IDispatcher.sol"; -import {IExternalPosition} from "../../../../persistent/external-positions/IExternalPosition.sol"; import {IBeaconProxyFactory} from "../../../../utils/0.6.12/beacon-proxy/IBeaconProxyFactory.sol"; import {AddressArrayLib} from "../../../../utils/0.6.12/AddressArrayLib.sol"; import {IExtension} from "../../../extensions/IExtension.sol"; +import {IExternalPosition} from "../../../extensions/external-position-manager/IExternalPosition.sol"; import {IFeeManager} from "../../../extensions/fee-manager/IFeeManager.sol"; import {IPolicyManager} from "../../../extensions/policy-manager/IPolicyManager.sol"; import {GasRelayRecipientMixin} from "../../../infrastructure/gas-relayer/GasRelayRecipientMixin.sol"; diff --git a/contracts/release/core/fund/vault/VaultLib.sol b/contracts/release/core/fund/vault/VaultLib.sol index d282d769e..64833109e 100644 --- a/contracts/release/core/fund/vault/VaultLib.sol +++ b/contracts/release/core/fund/vault/VaultLib.sol @@ -16,10 +16,10 @@ import {ERC20Burnable} from "openzeppelin-solc-0.6/token/ERC20/ERC20Burnable.sol import {SafeERC20} from "openzeppelin-solc-0.6/token/ERC20/SafeERC20.sol"; import {IWETH} from "../../../../external-interfaces/IWETH.sol"; import {IDispatcher} from "../../../../persistent/dispatcher/IDispatcher.sol"; -import {IExternalPosition} from "../../../../persistent/external-positions/IExternalPosition.sol"; import {IProtocolFeeReserve1} from "../../../../persistent/protocol-fee-reserve/interfaces/IProtocolFeeReserve1.sol"; import {VaultLibBase2} from "../../../../persistent/vault/VaultLibBase2.sol"; import {AddressArrayLib} from "../../../../utils/0.6.12/AddressArrayLib.sol"; +import {IExternalPosition} from "../../../extensions/external-position-manager/IExternalPosition.sol"; import {GasRelayRecipientMixin} from "../../../infrastructure/gas-relayer/GasRelayRecipientMixin.sol"; import {IProtocolFeeTracker} from "../../../infrastructure/protocol-fees/IProtocolFeeTracker.sol"; import {IExternalPositionManager} from "../../../extensions/external-position-manager/IExternalPositionManager.sol"; diff --git a/contracts/release/extensions/external-position-manager/ExternalPositionManager.sol b/contracts/release/extensions/external-position-manager/ExternalPositionManager.sol index c9b33e9f5..6fbb3e598 100644 --- a/contracts/release/extensions/external-position-manager/ExternalPositionManager.sol +++ b/contracts/release/extensions/external-position-manager/ExternalPositionManager.sol @@ -11,15 +11,15 @@ pragma solidity 0.6.12; -import {IExternalPosition} from "../../../persistent/external-positions/IExternalPosition.sol"; import {IExternalPositionFactory} from "../../../persistent/external-positions/IExternalPositionFactory.sol"; import {IExternalPositionProxy} from "../../../persistent/external-positions/IExternalPositionProxy.sol"; import {IVault} from "../../core/fund/vault/IVault.sol"; import {IPolicyManager} from "../policy-manager/IPolicyManager.sol"; import {ExtensionBase} from "../utils/ExtensionBase.sol"; import {PermissionedVaultActionMixin} from "../utils/PermissionedVaultActionMixin.sol"; -import {IExternalPositionParser} from "./external-positions/IExternalPositionParser.sol"; +import {IExternalPosition} from "./IExternalPosition.sol"; import {IExternalPositionManager} from "./IExternalPositionManager.sol"; +import {IExternalPositionParser} from "./IExternalPositionParser.sol"; /// @title ExternalPositionManager /// @author Enzyme Council diff --git a/contracts/persistent/external-positions/IExternalPosition.sol b/contracts/release/extensions/external-position-manager/IExternalPosition.sol similarity index 55% rename from contracts/persistent/external-positions/IExternalPosition.sol rename to contracts/release/extensions/external-position-manager/IExternalPosition.sol index 088f52fba..afdc8902b 100644 --- a/contracts/persistent/external-positions/IExternalPosition.sol +++ b/contracts/release/extensions/external-position-manager/IExternalPosition.sol @@ -9,14 +9,14 @@ pragma solidity >=0.6.0 <0.9.0; +import {IExternalPositionLibCore} from "../../../persistent/external-positions/IExternalPositionLibCore.sol"; + /// @title IExternalPosition Contract /// @author Enzyme Council -interface IExternalPosition { - function getDebtAssets() external returns (address[] memory, uint256[] memory); - - function getManagedAssets() external returns (address[] memory, uint256[] memory); +interface IExternalPosition is IExternalPositionLibCore { + function getDebtAssets() external returns (address[] memory assets_, uint256[] memory amounts_); - function init(bytes memory) external; + function getManagedAssets() external returns (address[] memory assets_, uint256[] memory amounts_); - function receiveCallFromVault(bytes memory) external; + function init(bytes memory _data) external; } diff --git a/contracts/release/extensions/external-position-manager/IExternalPositionManager.sol b/contracts/release/extensions/external-position-manager/IExternalPositionManager.sol index 43170e707..984d5a6dd 100644 --- a/contracts/release/extensions/external-position-manager/IExternalPositionManager.sol +++ b/contracts/release/extensions/external-position-manager/IExternalPositionManager.sol @@ -27,5 +27,5 @@ interface IExternalPositionManager { ReactivateExternalPosition } - function getExternalPositionLibForType(uint256) external view returns (address); + function getExternalPositionLibForType(uint256 _typeId) external view returns (address lib_); } diff --git a/contracts/release/extensions/external-position-manager/external-positions/IExternalPositionParser.sol b/contracts/release/extensions/external-position-manager/IExternalPositionParser.sol similarity index 100% rename from contracts/release/extensions/external-position-manager/external-positions/IExternalPositionParser.sol rename to contracts/release/extensions/external-position-manager/IExternalPositionParser.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/AaveDebtPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/AaveDebtPositionLib.sol index 367c3fdce..16e417b25 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/AaveDebtPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/AaveDebtPositionLib.sol @@ -16,10 +16,9 @@ import {IAaveV2LendingPool} from "../../../../../external-interfaces/IAaveV2Lend import {IAaveV2LendingPoolAddressProvider} from "../../../../../external-interfaces/IAaveV2LendingPoolAddressProvider.sol"; import {IAaveV2ProtocolDataProvider} from "../../../../../external-interfaces/IAaveV2ProtocolDataProvider.sol"; -import {AaveDebtPositionLibBase1} from - "../../../../../persistent/external-positions/aave-v2-debt/AaveDebtPositionLibBase1.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; import {AssetHelpers} from "../../../../../utils/0.6.12/AssetHelpers.sol"; +import {AaveDebtPositionLibBase1} from "./bases/AaveDebtPositionLibBase1.sol"; import {AaveDebtPositionDataDecoder} from "./AaveDebtPositionDataDecoder.sol"; import {IAaveDebtPosition} from "./IAaveDebtPosition.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/AaveDebtPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/AaveDebtPositionParser.sol index f1dce88eb..3c1cdd7cc 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/AaveDebtPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/AaveDebtPositionParser.sol @@ -11,7 +11,7 @@ import {ERC20} from "openzeppelin-solc-0.6/token/ERC20/ERC20.sol"; import {IValueInterpreter} from "../../../../infrastructure/value-interpreter/IValueInterpreter.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {AaveDebtPositionDataDecoder} from "./AaveDebtPositionDataDecoder.sol"; import {IAaveDebtPosition} from "./IAaveDebtPosition.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/IAaveDebtPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/IAaveDebtPosition.sol index b715a2423..32e512056 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/IAaveDebtPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/IAaveDebtPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/persistent/external-positions/aave-v2-debt/AaveDebtPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/bases/AaveDebtPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/aave-v2-debt/AaveDebtPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/aave-v2-debt/bases/AaveDebtPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/AaveV3DebtPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/AaveV3DebtPositionLib.sol index 652b127b4..cfc047bf9 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/AaveV3DebtPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/AaveV3DebtPositionLib.sol @@ -15,10 +15,9 @@ import {IAaveAToken} from "../../../../../external-interfaces/IAaveAToken.sol"; import {IAaveV3Pool} from "../../../../../external-interfaces/IAaveV3Pool.sol"; import {IAaveV3PoolAddressProvider} from "../../../../../external-interfaces/IAaveV3PoolAddressProvider.sol"; import {IAaveV3ProtocolDataProvider} from "../../../../../external-interfaces/IAaveV3ProtocolDataProvider.sol"; -import {AaveV3DebtPositionLibBase1} from - "../../../../../persistent/external-positions/aave-v3-debt/AaveV3DebtPositionLibBase1.sol"; import {AddressArrayLib} from "../../../../../utils/0.8.19/AddressArrayLib.sol"; import {AssetHelpers} from "../../../../../utils/0.8.19/AssetHelpers.sol"; +import {AaveV3DebtPositionLibBase1} from "./bases/AaveV3DebtPositionLibBase1.sol"; import {AaveV3DebtPositionDataDecoder} from "./AaveV3DebtPositionDataDecoder.sol"; import {IAaveV3DebtPosition} from "./IAaveV3DebtPosition.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/AaveV3DebtPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/AaveV3DebtPositionParser.sol index c8d186ca2..3abf52d38 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/AaveV3DebtPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/AaveV3DebtPositionParser.sol @@ -13,7 +13,7 @@ import {ERC20} from "openzeppelin-solc-0.8/token/ERC20/ERC20.sol"; import {IAaveAToken} from "../../../../../external-interfaces/IAaveAToken.sol"; import {AddOnlyAddressListOwnerConsumerMixin} from "../../../../../persistent/address-list-registry/address-list-owners/utils/0.8.19/AddOnlyAddressListOwnerConsumerMixin.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {AaveV3DebtPositionDataDecoder} from "./AaveV3DebtPositionDataDecoder.sol"; import {IAaveV3DebtPosition} from "./IAaveV3DebtPosition.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/IAaveV3DebtPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/IAaveV3DebtPosition.sol index 146860c2c..545199afc 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/IAaveV3DebtPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/IAaveV3DebtPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity 0.8.19; diff --git a/contracts/persistent/external-positions/aave-v3-debt/AaveV3DebtPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/bases/AaveV3DebtPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/aave-v3-debt/AaveV3DebtPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/aave-v3-debt/bases/AaveV3DebtPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/ArbitraryLoanPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/ArbitraryLoanPositionLib.sol index f9aa20a91..fc6c5e7a7 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/ArbitraryLoanPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/ArbitraryLoanPositionLib.sol @@ -14,12 +14,11 @@ import {ERC20} from "openzeppelin-solc-0.6/token/ERC20/ERC20.sol"; import {SafeERC20} from "openzeppelin-solc-0.6/token/ERC20/SafeERC20.sol"; import {SafeCast} from "openzeppelin-solc-0.6/utils/SafeCast.sol"; import {IWETH} from "../../../../../external-interfaces/IWETH.sol"; -import {ArbitraryLoanPositionLibBase1} from - "../../../../../persistent/external-positions/arbitrary-loan/ArbitraryLoanPositionLibBase1.sol"; import {IExternalPositionProxy} from "../../../../../persistent/external-positions/IExternalPositionProxy.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; import {AssetHelpers} from "../../../../../utils/0.6.12/AssetHelpers.sol"; import {MathHelpers} from "../../../../../utils/0.6.12/MathHelpers.sol"; +import {ArbitraryLoanPositionLibBase1} from "./bases/ArbitraryLoanPositionLibBase1.sol"; import {IArbitraryLoanAccountingModule} from "./modules/IArbitraryLoanAccountingModule.sol"; import {IArbitraryLoanPosition} from "./IArbitraryLoanPosition.sol"; import {ArbitraryLoanPositionDataDecoder} from "./ArbitraryLoanPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/ArbitraryLoanPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/ArbitraryLoanPositionParser.sol index a21c35f19..762189130 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/ArbitraryLoanPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/ArbitraryLoanPositionParser.sol @@ -11,7 +11,7 @@ import {ERC20} from "openzeppelin-solc-0.6/token/ERC20/ERC20.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {IArbitraryLoanPosition} from "./IArbitraryLoanPosition.sol"; import {ArbitraryLoanPositionDataDecoder} from "./ArbitraryLoanPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/IArbitraryLoanPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/IArbitraryLoanPosition.sol index 16b12fab4..af1140290 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/IArbitraryLoanPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/IArbitraryLoanPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/persistent/external-positions/arbitrary-loan/ArbitraryLoanPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/bases/ArbitraryLoanPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/arbitrary-loan/ArbitraryLoanPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/bases/ArbitraryLoanPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/modules/ArbitraryLoanTotalNominalDeltaOracleModule.sol b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/modules/ArbitraryLoanTotalNominalDeltaOracleModule.sol index d1b415d15..4e0265eae 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/modules/ArbitraryLoanTotalNominalDeltaOracleModule.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/arbitrary-loan/modules/ArbitraryLoanTotalNominalDeltaOracleModule.sol @@ -14,8 +14,8 @@ pragma experimental ABIEncoderV2; import {SafeMath} from "openzeppelin-solc-0.6/math/SafeMath.sol"; import {SignedSafeMath} from "openzeppelin-solc-0.6/math/SignedSafeMath.sol"; -import {IArbitraryLoanAccountingModule} from "./IArbitraryLoanAccountingModule.sol"; import {IArbitraryValueOracle} from "../../../../../../persistent/arbitrary-value-oracles/IArbitraryValueOracle.sol"; +import {IArbitraryLoanAccountingModule} from "./IArbitraryLoanAccountingModule.sol"; /// @title ArbitraryLoanTotalNominalDeltaOracleModule Contract /// @author Enzyme Council diff --git a/contracts/release/extensions/external-position-manager/external-positions/compound-debt/CompoundDebtPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/compound-debt/CompoundDebtPositionLib.sol index 16813057e..0640230b6 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/compound-debt/CompoundDebtPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/compound-debt/CompoundDebtPositionLib.sol @@ -16,9 +16,8 @@ import {ICERC20} from "../../../../../external-interfaces/ICERC20.sol"; import {ICEther} from "../../../../../external-interfaces/ICEther.sol"; import {ICompoundComptroller} from "../../../../../external-interfaces/ICompoundComptroller.sol"; import {IWETH} from "../../../../../external-interfaces/IWETH.sol"; -import {CompoundDebtPositionLibBase1} from - "../../../../../persistent/external-positions/compound-debt/CompoundDebtPositionLibBase1.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; +import {CompoundDebtPositionLibBase1} from "./bases/CompoundDebtPositionLibBase1.sol"; import {ICompoundDebtPosition} from "./ICompoundDebtPosition.sol"; /// @title CompoundDebtPositionLib Contract diff --git a/contracts/release/extensions/external-position-manager/external-positions/compound-debt/CompoundDebtPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/compound-debt/CompoundDebtPositionParser.sol index 649cf5263..27848e923 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/compound-debt/CompoundDebtPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/compound-debt/CompoundDebtPositionParser.sol @@ -12,7 +12,7 @@ import {ICERC20} from "../../../../../external-interfaces/ICERC20.sol"; import {CompoundPriceFeed} from "../../../../infrastructure/price-feeds/derivatives/feeds/CompoundPriceFeed.sol"; import {IValueInterpreter} from "../../../../infrastructure/value-interpreter/IValueInterpreter.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {ICompoundDebtPosition} from "./ICompoundDebtPosition.sol"; pragma solidity 0.6.12; diff --git a/contracts/release/extensions/external-position-manager/external-positions/compound-debt/ICompoundDebtPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/compound-debt/ICompoundDebtPosition.sol index a74b06bf6..aad59ab46 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/compound-debt/ICompoundDebtPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/compound-debt/ICompoundDebtPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/persistent/external-positions/compound-debt/CompoundDebtPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/compound-debt/bases/CompoundDebtPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/compound-debt/CompoundDebtPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/compound-debt/bases/CompoundDebtPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/convex-voting/ConvexVotingPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/convex-voting/ConvexVotingPositionParser.sol index 82bff878a..306101c59 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/convex-voting/ConvexVotingPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/convex-voting/ConvexVotingPositionParser.sol @@ -9,7 +9,7 @@ file that was distributed with this source code. */ -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {ConvexVotingPositionDataDecoder} from "./ConvexVotingPositionDataDecoder.sol"; import {IConvexVotingPosition} from "./IConvexVotingPosition.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/convex-voting/IConvexVotingPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/convex-voting/IConvexVotingPosition.sol index ffde72583..064bce333 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/convex-voting/IConvexVotingPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/convex-voting/IConvexVotingPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/IKilnStakingPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/IKilnStakingPosition.sol index 8240dc453..5c2a02a57 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/IKilnStakingPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/IKilnStakingPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/KilnStakingPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/KilnStakingPositionLib.sol index 17d06831a..7c4331fdf 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/KilnStakingPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/KilnStakingPositionLib.sol @@ -12,10 +12,9 @@ pragma solidity 0.8.19; import {ERC20} from "openzeppelin-solc-0.8/token/ERC20/ERC20.sol"; import {SafeERC20} from "openzeppelin-solc-0.8/token/ERC20/utils/SafeERC20.sol"; import {Math} from "openzeppelin-solc-0.8/utils/math/Math.sol"; -import {KilnStakingPositionLibBase2} from - "../../../../../persistent/external-positions/kiln-staking/KilnStakingPositionLibBase2.sol"; import {IKilnStakingContract} from "../../../../../external-interfaces/IKilnStakingContract.sol"; import {IWETH} from "../../../../../external-interfaces/IWETH.sol"; +import {KilnStakingPositionLibBase2} from "./bases/KilnStakingPositionLibBase2.sol"; import {IKilnStakingPosition} from "./IKilnStakingPosition.sol"; import {KilnStakingPositionDataDecoder} from "./KilnStakingPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/KilnStakingPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/KilnStakingPositionParser.sol index 397c3139f..29130d431 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/KilnStakingPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/KilnStakingPositionParser.sol @@ -10,7 +10,7 @@ */ import {IAddressListRegistry} from "../../../../../persistent/address-list-registry/IAddressListRegistry.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {IKilnStakingPosition} from "./IKilnStakingPosition.sol"; import {KilnStakingPositionDataDecoder} from "./KilnStakingPositionDataDecoder.sol"; diff --git a/contracts/persistent/external-positions/kiln-staking/KilnStakingPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/bases/KilnStakingPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/kiln-staking/KilnStakingPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/kiln-staking/bases/KilnStakingPositionLibBase1.sol diff --git a/contracts/persistent/external-positions/kiln-staking/KilnStakingPositionLibBase2.sol b/contracts/release/extensions/external-position-manager/external-positions/kiln-staking/bases/KilnStakingPositionLibBase2.sol similarity index 100% rename from contracts/persistent/external-positions/kiln-staking/KilnStakingPositionLibBase2.sol rename to contracts/release/extensions/external-position-manager/external-positions/kiln-staking/bases/KilnStakingPositionLibBase2.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/ILidoWithdrawalsPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/ILidoWithdrawalsPosition.sol index 2ae678032..ffac1a1ac 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/ILidoWithdrawalsPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/ILidoWithdrawalsPosition.sol @@ -7,9 +7,8 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; -import {LidoWithdrawalsPositionLibBase1} from - "../../../../../persistent/external-positions/lido-withdrawals/LidoWithdrawalsPositionLibBase1.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; +import {LidoWithdrawalsPositionLibBase1} from "./bases/LidoWithdrawalsPositionLibBase1.sol"; pragma solidity 0.8.19; diff --git a/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/LidoWithdrawalsPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/LidoWithdrawalsPositionLib.sol index 9d53f0b71..cb062d492 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/LidoWithdrawalsPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/LidoWithdrawalsPositionLib.sol @@ -11,8 +11,7 @@ pragma solidity 0.8.19; import {ERC20} from "openzeppelin-solc-0.8/token/ERC20/ERC20.sol"; import {ILidoWithdrawalQueue} from "../../../../../external-interfaces/ILidoWithdrawalQueue.sol"; -import {LidoWithdrawalsPositionLibBase1} from - "../../../../../persistent/external-positions/lido-withdrawals/LidoWithdrawalsPositionLibBase1.sol"; +import {LidoWithdrawalsPositionLibBase1} from "./bases/LidoWithdrawalsPositionLibBase1.sol"; import {ILidoWithdrawalsPosition} from "./ILidoWithdrawalsPosition.sol"; import {LidoWithdrawalsPositionDataDecoder} from "./LidoWithdrawalsPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/LidoWithdrawalsPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/LidoWithdrawalsPositionParser.sol index 256ca70bb..60a7f0208 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/LidoWithdrawalsPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/LidoWithdrawalsPositionParser.sol @@ -9,7 +9,7 @@ file that was distributed with this source code. */ -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {ILidoWithdrawalsPosition} from "./ILidoWithdrawalsPosition.sol"; import {LidoWithdrawalsPositionDataDecoder} from "./LidoWithdrawalsPositionDataDecoder.sol"; diff --git a/contracts/persistent/external-positions/lido-withdrawals/LidoWithdrawalsPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/bases/LidoWithdrawalsPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/lido-withdrawals/LidoWithdrawalsPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/lido-withdrawals/bases/LidoWithdrawalsPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/liquity-debt/ILiquityDebtPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/liquity-debt/ILiquityDebtPosition.sol index 28193cb7c..054e70c2d 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/liquity-debt/ILiquityDebtPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/liquity-debt/ILiquityDebtPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/release/extensions/external-position-manager/external-positions/liquity-debt/LiquityDebtPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/liquity-debt/LiquityDebtPositionParser.sol index 63fabe3e5..a21fb430f 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/liquity-debt/LiquityDebtPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/liquity-debt/LiquityDebtPositionParser.sol @@ -10,7 +10,7 @@ */ import {ILiquityTroveManager} from "../../../../../external-interfaces/ILiquityTroveManager.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {ILiquityDebtPosition} from "./ILiquityDebtPosition.sol"; import {LiquityDebtPositionDataDecoder} from "./LiquityDebtPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/IMapleLiquidityPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/IMapleLiquidityPosition.sol index f40a3b6f4..23af5ad41 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/IMapleLiquidityPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/IMapleLiquidityPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionLib.sol index 6fb2001eb..63d82e8c5 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionLib.sol @@ -17,15 +17,13 @@ import {IMapleV1Pool} from "../../../../../external-interfaces/IMapleV1Pool.sol" import {IMapleV2Pool} from "../../../../../external-interfaces/IMapleV2Pool.sol"; import {IMapleV2PoolManager} from "../../../../../external-interfaces/IMapleV2PoolManager.sol"; import {IMapleV2WithdrawalManager} from "../../../../../external-interfaces/IMapleV2WithdrawalManager.sol"; -import {MapleLiquidityPositionLibBase2} from - "../../../../../persistent/external-positions/maple-liquidity/MapleLiquidityPositionLibBase2.sol"; -import {MapleV1ToV2PoolMapper} from - "../../../../../persistent/external-positions/maple-liquidity/MapleV1ToV2PoolMapper.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; import {AssetHelpers} from "../../../../../utils/0.6.12/AssetHelpers.sol"; import {Uint256ArrayLib} from "../../../../../utils/0.6.12/Uint256ArrayLib.sol"; +import {MapleLiquidityPositionLibBase2} from "./bases/MapleLiquidityPositionLibBase2.sol"; import {IMapleLiquidityPosition} from "./IMapleLiquidityPosition.sol"; import {MapleLiquidityPositionDataDecoder} from "./MapleLiquidityPositionDataDecoder.sol"; +import {MapleV1ToV2PoolMapper} from "./MapleV1ToV2PoolMapper.sol"; /// @title MapleLiquidityPositionLib Contract /// @author Enzyme Council diff --git a/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionParser.sol index fc9c8834d..ee62cf20b 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionParser.sol @@ -14,7 +14,7 @@ import {IMapleV2Globals} from "../../../../../external-interfaces/IMapleV2Global import {IMapleV2Pool} from "../../../../../external-interfaces/IMapleV2Pool.sol"; import {IMapleV2PoolManager} from "../../../../../external-interfaces/IMapleV2PoolManager.sol"; import {IMapleV2ProxyFactory} from "../../../../../external-interfaces/IMapleV2ProxyFactory.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {IMapleLiquidityPosition} from "./IMapleLiquidityPosition.sol"; import {MapleLiquidityPositionDataDecoder} from "./MapleLiquidityPositionDataDecoder.sol"; diff --git a/contracts/persistent/external-positions/maple-liquidity/MapleV1ToV2PoolMapper.sol b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleV1ToV2PoolMapper.sol similarity index 95% rename from contracts/persistent/external-positions/maple-liquidity/MapleV1ToV2PoolMapper.sol rename to contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleV1ToV2PoolMapper.sol index cf70fb194..4f4c15d82 100644 --- a/contracts/persistent/external-positions/maple-liquidity/MapleV1ToV2PoolMapper.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/MapleV1ToV2PoolMapper.sol @@ -11,9 +11,8 @@ pragma solidity 0.6.12; -import - "../../../release/extensions/external-position-manager/external-positions/maple-liquidity/MapleLiquidityPositionLib.sol"; -import "../../dispatcher/IDispatcher.sol"; +import {IDispatcher} from "../../../../../persistent/dispatcher/IDispatcher.sol"; +import {MapleLiquidityPositionLib} from "./MapleLiquidityPositionLib.sol"; /// @title MapleV1ToV2PoolMapper Contract /// @author Enzyme Council diff --git a/contracts/persistent/external-positions/maple-liquidity/MapleLiquidityPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/bases/MapleLiquidityPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/maple-liquidity/MapleLiquidityPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/bases/MapleLiquidityPositionLibBase1.sol diff --git a/contracts/persistent/external-positions/maple-liquidity/MapleLiquidityPositionLibBase2.sol b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/bases/MapleLiquidityPositionLibBase2.sol similarity index 93% rename from contracts/persistent/external-positions/maple-liquidity/MapleLiquidityPositionLibBase2.sol rename to contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/bases/MapleLiquidityPositionLibBase2.sol index 8436b8339..2aca5059d 100644 --- a/contracts/persistent/external-positions/maple-liquidity/MapleLiquidityPositionLibBase2.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/maple-liquidity/bases/MapleLiquidityPositionLibBase2.sol @@ -11,7 +11,7 @@ pragma solidity 0.6.12; -import "./MapleLiquidityPositionLibBase1.sol"; +import {MapleLiquidityPositionLibBase1} from "./MapleLiquidityPositionLibBase1.sol"; /// @title MapleLiquidityPositionLibBase2 Contract /// @author Enzyme Council diff --git a/contracts/release/extensions/external-position-manager/external-positions/notional-v2/INotionalV2Position.sol b/contracts/release/extensions/external-position-manager/external-positions/notional-v2/INotionalV2Position.sol index 5a1a56e55..d400a297b 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/notional-v2/INotionalV2Position.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/notional-v2/INotionalV2Position.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/release/extensions/external-position-manager/external-positions/notional-v2/NotionalV2PositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/notional-v2/NotionalV2PositionParser.sol index f25747643..0da8bb432 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/notional-v2/NotionalV2PositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/notional-v2/NotionalV2PositionParser.sol @@ -13,7 +13,7 @@ pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import {INotionalV2Router} from "../../../../../external-interfaces/INotionalV2Router.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {INotionalV2Position} from "./INotionalV2Position.sol"; import {NotionalV2PositionDataDecoder} from "./NotionalV2PositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/ISolvV2BondBuyerPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/ISolvV2BondBuyerPosition.sol index b3c20f6ff..fdab74401 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/ISolvV2BondBuyerPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/ISolvV2BondBuyerPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; pragma experimental ABIEncoderV2; diff --git a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionLib.sol index 31cbb00a2..7bd323a86 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionLib.sol @@ -17,11 +17,10 @@ import {ISolvV2BondPool} from "../../../../../external-interfaces/ISolvV2BondPoo import {ISolvV2BondVoucher} from "../../../../../external-interfaces/ISolvV2BondVoucher.sol"; import {ISolvV2InitialConvertibleOfferingMarket} from "../../../../../external-interfaces/ISolvV2InitialConvertibleOfferingMarket.sol"; -import {SolvV2BondBuyerPositionLibBase1} from - "../../../../../persistent/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionLibBase1.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; import {AssetHelpers} from "../../../../../utils/0.6.12/AssetHelpers.sol"; import {Uint256ArrayLib} from "../../../../../utils/0.6.12/Uint256ArrayLib.sol"; +import {SolvV2BondBuyerPositionLibBase1} from "./bases/SolvV2BondBuyerPositionLibBase1.sol"; import {ISolvV2BondBuyerPosition} from "./ISolvV2BondBuyerPosition.sol"; import {SolvV2BondBuyerPositionDataDecoder} from "./SolvV2BondBuyerPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionParser.sol index 3f953323c..641b6dc11 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionParser.sol @@ -12,7 +12,7 @@ import {ISolvV2BondPool} from "../../../../../external-interfaces/ISolvV2BondPoo import {ISolvV2BondVoucher} from "../../../../../external-interfaces/ISolvV2BondVoucher.sol"; import {ISolvV2InitialConvertibleOfferingMarket} from "../../../../../external-interfaces/ISolvV2InitialConvertibleOfferingMarket.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {ISolvV2BondBuyerPosition} from "./ISolvV2BondBuyerPosition.sol"; import {SolvV2BondBuyerPositionDataDecoder} from "./SolvV2BondBuyerPositionDataDecoder.sol"; diff --git a/contracts/persistent/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/bases/SolvV2BondBuyerPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/solv-v2-bond-buyer/SolvV2BondBuyerPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-buyer/bases/SolvV2BondBuyerPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/ISolvV2BondIssuerPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/ISolvV2BondIssuerPosition.sol index f97c1b84b..68421f889 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/ISolvV2BondIssuerPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/ISolvV2BondIssuerPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; pragma experimental ABIEncoderV2; diff --git a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionLib.sol index a63353c57..1c9356fc7 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionLib.sol @@ -17,11 +17,10 @@ import {ISolvV2BondPool} from "../../../../../external-interfaces/ISolvV2BondPoo import {ISolvV2BondVoucher} from "../../../../../external-interfaces/ISolvV2BondVoucher.sol"; import {ISolvV2InitialConvertibleOfferingMarket} from "../../../../../external-interfaces/ISolvV2InitialConvertibleOfferingMarket.sol"; -import {SolvV2BondIssuerPositionLibBase1} from - "../../../../../persistent/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionLibBase1.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; import {AssetHelpers} from "../../../../../utils/0.6.12/AssetHelpers.sol"; import {Uint256ArrayLib} from "../../../../../utils/0.6.12/Uint256ArrayLib.sol"; +import {SolvV2BondIssuerPositionLibBase1} from "./bases/SolvV2BondIssuerPositionLibBase1.sol"; import {ISolvV2BondIssuerPosition} from "./ISolvV2BondIssuerPosition.sol"; import {SolvV2BondIssuerPositionDataDecoder} from "./SolvV2BondIssuerPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionParser.sol index b062299d6..76e72ae2a 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionParser.sol @@ -14,7 +14,7 @@ import {ISolvV2BondVoucher} from "../../../../../external-interfaces/ISolvV2Bond import {ISolvV2InitialConvertibleOfferingMarket} from "../../../../../external-interfaces/ISolvV2InitialConvertibleOfferingMarket.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {ISolvV2BondIssuerPosition} from "./ISolvV2BondIssuerPosition.sol"; import {SolvV2BondIssuerPositionDataDecoder} from "./SolvV2BondIssuerPositionDataDecoder.sol"; import {SolvV2BondIssuerPositionLib} from "./SolvV2BondIssuerPositionLib.sol"; diff --git a/contracts/persistent/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/bases/SolvV2BondIssuerPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/solv-v2-bond-issuer/SolvV2BondIssuerPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/solv-v2-bond-issuer/bases/SolvV2BondIssuerPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/IStakeWiseV3StakingPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/IStakeWiseV3StakingPosition.sol index c75f0a8a1..e8f37ad16 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/IStakeWiseV3StakingPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/IStakeWiseV3StakingPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionLib.sol index d8a01f10d..1d35868a2 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionLib.sol @@ -14,9 +14,8 @@ import {SafeERC20} from "openzeppelin-solc-0.8/token/ERC20/utils/SafeERC20.sol"; import {Address} from "openzeppelin-solc-0.8/utils/Address.sol"; import {IStakeWiseV3EthVault} from "../../../../../external-interfaces/IStakeWiseV3EthVault.sol"; import {IWETH} from "../../../../../external-interfaces/IWETH.sol"; -import {StakeWiseV3StakingPositionLibBase1} from - "../../../../../persistent/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionLibBase1.sol"; import {AddressArrayLib} from "../../../../../utils/0.8.19/AddressArrayLib.sol"; +import {StakeWiseV3StakingPositionLibBase1} from "./bases/StakeWiseV3StakingPositionLibBase1.sol"; import {IStakeWiseV3StakingPosition} from "./IStakeWiseV3StakingPosition.sol"; import {StakeWiseV3StakingPositionDataDecoder} from "./StakeWiseV3StakingPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionParser.sol index be31a6782..97d65f2e1 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionParser.sol @@ -11,7 +11,7 @@ import {IStakeWiseV3EthVault} from "../../../../../external-interfaces/IStakeWiseV3EthVault.sol"; import {IStakeWiseV3VaultsRegistry} from "../../../../../external-interfaces/IStakeWiseV3VaultsRegistry.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {IStakeWiseV3StakingPosition} from "./IStakeWiseV3StakingPosition.sol"; import {StakeWiseV3StakingPositionDataDecoder} from "./StakeWiseV3StakingPositionDataDecoder.sol"; diff --git a/contracts/persistent/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/bases/StakeWiseV3StakingPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/stakewise-v3-staking/StakeWiseV3StakingPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/stakewise-v3-staking/bases/StakeWiseV3StakingPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/ITheGraphDelegationPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/ITheGraphDelegationPosition.sol index f5e85ea06..797645f41 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/ITheGraphDelegationPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/ITheGraphDelegationPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/TheGraphDelegationPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/TheGraphDelegationPositionLib.sol index a0a29e60f..0bfe95a76 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/TheGraphDelegationPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/TheGraphDelegationPositionLib.sol @@ -13,9 +13,8 @@ import {SafeMath} from "openzeppelin-solc-0.6/math/SafeMath.sol"; import {ERC20} from "openzeppelin-solc-0.6/token/ERC20/ERC20.sol"; import {SafeERC20} from "openzeppelin-solc-0.6/token/ERC20/SafeERC20.sol"; import {ITheGraphStaking} from "../../../../../external-interfaces/ITheGraphStaking.sol"; -import {TheGraphDelegationPositionLibBase1} from - "../../../../../persistent/external-positions/the-graph-delegation/TheGraphDelegationPositionLibBase1.sol"; import {AddressArrayLib} from "../../../../../utils/0.6.12/AddressArrayLib.sol"; +import {TheGraphDelegationPositionLibBase1} from "./bases/TheGraphDelegationPositionLibBase1.sol"; import {ITheGraphDelegationPosition} from "./ITheGraphDelegationPosition.sol"; import {TheGraphDelegationPositionDataDecoder} from "./TheGraphDelegationPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/TheGraphDelegationPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/TheGraphDelegationPositionParser.sol index abd1bbf6b..a7f649221 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/TheGraphDelegationPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/TheGraphDelegationPositionParser.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {TheGraphDelegationPositionDataDecoder} from "./TheGraphDelegationPositionDataDecoder.sol"; import {ITheGraphDelegationPosition} from "./ITheGraphDelegationPosition.sol"; diff --git a/contracts/persistent/external-positions/the-graph-delegation/TheGraphDelegationPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/bases/TheGraphDelegationPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/the-graph-delegation/TheGraphDelegationPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/the-graph-delegation/bases/TheGraphDelegationPositionLibBase1.sol diff --git a/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/IUniswapV3LiquidityPosition.sol b/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/IUniswapV3LiquidityPosition.sol index 1fbe78ee7..dbd0bb389 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/IUniswapV3LiquidityPosition.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/IUniswapV3LiquidityPosition.sol @@ -7,7 +7,7 @@ file that was distributed with this source code. */ -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../IExternalPosition.sol"; pragma solidity >=0.6.0 <0.9.0; diff --git a/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionLib.sol b/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionLib.sol index ea3a9ddb6..f6c360749 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionLib.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionLib.sol @@ -15,9 +15,8 @@ import {ERC20} from "openzeppelin-solc-0.7/token/ERC20/ERC20.sol"; import {SafeERC20} from "openzeppelin-solc-0.7/token/ERC20/SafeERC20.sol"; import {INonfungiblePositionManager} from "uniswap-v3-periphery/interfaces/INonfungiblePositionManager.sol"; import {PositionValue} from "uniswap-v3-periphery/libraries/PositionValue.sol"; -import {UniswapV3LiquidityPositionLibBase1} from - "../../../../../persistent/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionLibBase1.sol"; import {IValueInterpreter} from "../../../../infrastructure/value-interpreter/IValueInterpreter.sol"; +import {UniswapV3LiquidityPositionLibBase1} from "./bases/UniswapV3LiquidityPositionLibBase1.sol"; import {IUniswapV3LiquidityPosition} from "./IUniswapV3LiquidityPosition.sol"; import {UniswapV3LiquidityPositionDataDecoder} from "./UniswapV3LiquidityPositionDataDecoder.sol"; diff --git a/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionParser.sol b/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionParser.sol index 8a9e8ec56..ad5f41618 100644 --- a/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionParser.sol +++ b/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionParser.sol @@ -11,7 +11,7 @@ import {ERC721} from "openzeppelin-solc-0.7/token/ERC721/ERC721.sol"; import {IValueInterpreter} from "../../../../infrastructure/value-interpreter/IValueInterpreter.sol"; -import {IExternalPositionParser} from "../IExternalPositionParser.sol"; +import {IExternalPositionParser} from "../../IExternalPositionParser.sol"; import {IUniswapV3LiquidityPosition} from "./IUniswapV3LiquidityPosition.sol"; import {UniswapV3LiquidityPositionDataDecoder} from "./UniswapV3LiquidityPositionDataDecoder.sol"; diff --git a/contracts/persistent/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionLibBase1.sol b/contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/bases/UniswapV3LiquidityPositionLibBase1.sol similarity index 100% rename from contracts/persistent/external-positions/uniswap-v3-liquidity/UniswapV3LiquidityPositionLibBase1.sol rename to contracts/release/extensions/external-position-manager/external-positions/uniswap-v3-liquidity/bases/UniswapV3LiquidityPositionLibBase1.sol diff --git a/contracts/release/extensions/policy-manager/policies/asset-managers/OnlyRemoveDustExternalPositionPolicy.sol b/contracts/release/extensions/policy-manager/policies/asset-managers/OnlyRemoveDustExternalPositionPolicy.sol index f7c17cbde..1d774c5b3 100644 --- a/contracts/release/extensions/policy-manager/policies/asset-managers/OnlyRemoveDustExternalPositionPolicy.sol +++ b/contracts/release/extensions/policy-manager/policies/asset-managers/OnlyRemoveDustExternalPositionPolicy.sol @@ -11,7 +11,7 @@ pragma solidity 0.6.12; -import {IExternalPosition} from "../../../../../persistent/external-positions/IExternalPosition.sol"; +import {IExternalPosition} from "../../../external-position-manager/IExternalPosition.sol"; import {IPolicyManager} from "../../IPolicyManager.sol"; import {DustEvaluatorMixin} from "../utils/0.6.12/DustEvaluatorMixin.sol"; import {PolicyBase} from "../utils/0.6.12/PolicyBase.sol"; diff --git a/contracts/release/off-chain/HelperDataReader.sol b/contracts/release/off-chain/HelperDataReader.sol index 5ed76af13..d9eb154cd 100644 --- a/contracts/release/off-chain/HelperDataReader.sol +++ b/contracts/release/off-chain/HelperDataReader.sol @@ -11,13 +11,13 @@ pragma solidity 0.8.19; import {ERC20} from "openzeppelin-solc-0.8/token/ERC20/ERC20.sol"; import {IExternalPositionFactory} from "../../persistent/external-positions/IExternalPositionFactory.sol"; -import {IExternalPosition} from "../../persistent/external-positions/IExternalPosition.sol"; import {IExternalPositionProxy} from "../../persistent/external-positions/IExternalPositionProxy.sol"; import {IHelperDataReader} from "../../persistent/off-chain/helper-data-reader/IHelperDataReader.sol"; import {IFundValueCalculator} from "../../persistent/off-chain/fund-value-calculator/IFundValueCalculator.sol"; import {IComptroller} from "../core/fund/comptroller/IComptroller.sol"; import {IVault} from "../core/fund/vault/IVault.sol"; +import {IExternalPosition} from "../extensions/external-position-manager/IExternalPosition.sol"; import {IPolicyManager} from "../extensions/policy-manager/IPolicyManager.sol"; import {IPolicy} from "../extensions/policy-manager/IPolicy.sol"; import {IFeeManager} from "../extensions/fee-manager/IFeeManager.sol"; diff --git a/contracts/release/peripheral/shares-wrappers/arbitrary-token-phased/ArbitraryTokenPhasedSharesWrapperLib.sol b/contracts/release/peripheral/shares-wrappers/arbitrary-token-phased/ArbitraryTokenPhasedSharesWrapperLib.sol index e7f1c6a74..121efe4e2 100644 --- a/contracts/release/peripheral/shares-wrappers/arbitrary-token-phased/ArbitraryTokenPhasedSharesWrapperLib.sol +++ b/contracts/release/peripheral/shares-wrappers/arbitrary-token-phased/ArbitraryTokenPhasedSharesWrapperLib.sol @@ -15,12 +15,12 @@ import {ERC20} from "openzeppelin-solc-0.6/token/ERC20/ERC20.sol"; import {SafeERC20} from "openzeppelin-solc-0.6/token/ERC20/SafeERC20.sol"; import {IAddressListRegistry} from "../../../../persistent/address-list-registry/IAddressListRegistry.sol"; import {IDispatcher} from "../../../../persistent/dispatcher/IDispatcher.sol"; -import {IExternalPosition} from "../../../../persistent/external-positions/IExternalPosition.sol"; import {AddressArrayLib} from "../../../../utils/0.6.12/AddressArrayLib.sol"; import {AssetHelpers} from "../../../../utils/0.6.12/AssetHelpers.sol"; import {MathHelpers} from "../../../../utils/0.6.12/MathHelpers.sol"; import {IComptroller} from "../../../core/fund/comptroller/IComptroller.sol"; import {IVault} from "../../../core/fund/vault/IVault.sol"; +import {IExternalPosition} from "../../../extensions/external-position-manager/IExternalPosition.sol"; /// @title ArbitraryTokenPhasedSharesWrapperLib Contract /// @author Enzyme Council