diff --git a/README.md b/README.md index ed9343ba..d82c0192 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ![image (4)](https://github.com/morpho-org/morpho-blue-bundlers/assets/44097430/5cb0796b-c20c-415e-840d-8b0705836dc8) -Each Bundler is a domain-specific abstract layer of contract that implements some functions that can be bundled in a single call by EOAs to a single contract. They all inherit from [`BaseBundler`](./src/BaseBundler.sol) that enables bundling multiple function calls into a single `multicall(bytes[] calldata data)` call to the end bundler contract. Each chain-specific bundler is available under their chain-specific folder (e.g. [`ethereum`](./src/ethereum/)). +Each Bundler is a domain-specific abstract layer of contract that implements some functions that can be bundled in a single call by EOAs to a single contract. They all inherit from [`CoreBundler`](./src/CoreBundler.sol) that enables bundling multiple function calls into a single `multicall(bytes[] calldata data)` call to the end bundler contract. Each chain-specific bundler is available under their chain-specific folder (e.g. [`ethereum`](./src/ethereum/)). Some chain-specific domains are also scoped to the chain-specific folder, because they are not expected to be used on any other chain (e.g. DAI and its specific `permit` function is only available on Ethereum - see [`EthereumPermitBundler`](./src/ethereum/EthereumPermitBundler.sol)). diff --git a/src/BaseBundler.sol b/src/CoreBundler.sol similarity index 98% rename from src/BaseBundler.sol rename to src/CoreBundler.sol index e21231ec..a5493b3e 100644 --- a/src/BaseBundler.sol +++ b/src/CoreBundler.sol @@ -7,7 +7,7 @@ import {ErrorsLib} from "./libraries/ErrorsLib.sol"; import {UNSET_INITIATOR} from "./libraries/ConstantsLib.sol"; import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; -/// @title BaseBundler +/// @title CoreBundler /// @author Morpho Labs /// @custom:contact security@morpho.org /// @notice Enables calling multiple functions in a single call to the same contract (self). @@ -15,7 +15,7 @@ import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.s /// @dev Every bundler inheriting from this contract must have their external functions payable as they will be /// delegate called by the `multicall` function (which is payable, and thus might pass a non-null ETH value). It is /// recommended not to rely on `msg.value` as the same value can be reused for multiple calls. -abstract contract BaseBundler is IMulticall { +abstract contract CoreBundler is IMulticall { using SafeTransferLib for ERC20; /* STORAGE */ diff --git a/src/ERC20WrapperBundler.sol b/src/ERC20WrapperBundler.sol index da839e4d..d173e19b 100644 --- a/src/ERC20WrapperBundler.sol +++ b/src/ERC20WrapperBundler.sol @@ -5,7 +5,7 @@ import {ErrorsLib} from "./libraries/ErrorsLib.sol"; import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; import {ERC20Wrapper} from "../lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Wrapper.sol"; /// @title ERC20WrapperBundler @@ -14,7 +14,7 @@ import {ERC20Wrapper} from "../lib/openzeppelin-contracts/contracts/token/ERC20/ /// @notice Enables the wrapping and unwrapping of ERC20 tokens. The largest usecase is to wrap permissionless tokens to /// their permissioned counterparts and access permissioned markets on Morpho Blue. Permissioned tokens can be built /// using: https://github.com/morpho-org/erc20-permissioned -abstract contract ERC20WrapperBundler is BaseBundler { +abstract contract ERC20WrapperBundler is CoreBundler { using SafeTransferLib for ERC20; /* WRAPPER ACTIONS */ diff --git a/src/ERC4626Bundler.sol b/src/ERC4626Bundler.sol index c61651b7..51d57fe5 100644 --- a/src/ERC4626Bundler.sol +++ b/src/ERC4626Bundler.sol @@ -7,13 +7,13 @@ import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; /// @title ERC4626Bundler /// @author Morpho Labs /// @custom:contact security@morpho.org /// @notice Bundler contract managing interactions with ERC4626 compliant tokens. -abstract contract ERC4626Bundler is BaseBundler { +abstract contract ERC4626Bundler is CoreBundler { using SafeTransferLib for ERC20; /* ACTIONS */ diff --git a/src/MorphoBundler.sol b/src/MorphoBundler.sol index c223e7ee..5dff3e9d 100644 --- a/src/MorphoBundler.sol +++ b/src/MorphoBundler.sol @@ -8,13 +8,13 @@ import {MarketParams, Signature, Authorization, IMorpho} from "../lib/morpho-blu import {ErrorsLib} from "./libraries/ErrorsLib.sol"; import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; /// @title MorphoBundler /// @author Morpho Labs /// @custom:contact security@morpho.org /// @notice Bundler contract managing interactions with Morpho. -abstract contract MorphoBundler is BaseBundler, IMorphoBundler { +abstract contract MorphoBundler is CoreBundler, IMorphoBundler { using SafeTransferLib for ERC20; /* IMMUTABLES */ @@ -264,7 +264,7 @@ abstract contract MorphoBundler is BaseBundler, IMorphoBundler { _multicall(abi.decode(data, (bytes[]))); } - /// @inheritdoc BaseBundler + /// @inheritdoc CoreBundler function _isSenderAuthorized() internal view virtual override returns (bool) { return super._isSenderAuthorized() || msg.sender == address(MORPHO); } diff --git a/src/Permit2Bundler.sol b/src/Permit2Bundler.sol index 5dde2030..a33ef04e 100644 --- a/src/Permit2Bundler.sol +++ b/src/Permit2Bundler.sol @@ -9,13 +9,13 @@ import {Permit2Lib} from "../lib/permit2/src/libraries/Permit2Lib.sol"; import {SafeCast160} from "../lib/permit2/src/libraries/SafeCast160.sol"; import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; /// @title Permit2Bundler /// @author Morpho Labs /// @custom:contact security@morpho.xyz /// @notice Bundler contract managing interactions with Uniswap's Permit2. -abstract contract Permit2Bundler is BaseBundler { +abstract contract Permit2Bundler is CoreBundler { using SafeCast160 for uint256; /* ACTIONS */ diff --git a/src/PermitBundler.sol b/src/PermitBundler.sol index bc74c7e9..b667e29c 100644 --- a/src/PermitBundler.sol +++ b/src/PermitBundler.sol @@ -3,13 +3,13 @@ pragma solidity 0.8.24; import {IERC20Permit} from "../lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; /// @title PermitBundler /// @author Morpho Labs /// @custom:contact security@morpho.xyz /// @notice Bundler contract managing interactions with tokens implementing EIP-2612. -abstract contract PermitBundler is BaseBundler { +abstract contract PermitBundler is CoreBundler { /// @notice Permits the given `amount` of `asset` from sender to be spent by the bundler via EIP-2612 Permit with /// the given `deadline` & EIP-712 signature's `v`, `r` & `s`. /// @param asset The address of the token to be permitted. diff --git a/src/StEthBundler.sol b/src/StEthBundler.sol index ecd04fd4..16a8f69b 100644 --- a/src/StEthBundler.sol +++ b/src/StEthBundler.sol @@ -8,13 +8,13 @@ import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; /// @title StEthBundler /// @author Morpho Labs /// @custom:contact security@morpho.org /// @notice Contract allowing to bundle multiple interactions with stETH together. -abstract contract StEthBundler is BaseBundler { +abstract contract StEthBundler is CoreBundler { using SafeTransferLib for ERC20; /* IMMUTABLES */ diff --git a/src/TransferBundler.sol b/src/TransferBundler.sol index 6fac0c2c..30c559df 100644 --- a/src/TransferBundler.sol +++ b/src/TransferBundler.sol @@ -5,14 +5,14 @@ import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; /// @title TransferBundler /// @author Morpho Labs /// @custom:contact security@morpho.org /// @notice Enables transfer of ERC20 and native tokens. /// @dev Assumes that any tokens left on the contract can be seized by anyone. -abstract contract TransferBundler is BaseBundler { +abstract contract TransferBundler is CoreBundler { using SafeTransferLib for ERC20; /* TRANSFER ACTIONS */ diff --git a/src/UrdBundler.sol b/src/UrdBundler.sol index 5e9ddaf3..994411ea 100644 --- a/src/UrdBundler.sol +++ b/src/UrdBundler.sol @@ -6,13 +6,13 @@ import {IUniversalRewardsDistributor} from import {ErrorsLib} from "./libraries/ErrorsLib.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; /// @title UrdBundler /// @author Morpho Labs /// @custom:contact security@morpho.xyz /// @notice Bundler that allows to claim token rewards on the Universal Rewards Distributor. -abstract contract UrdBundler is BaseBundler { +abstract contract UrdBundler is CoreBundler { /// @notice Claims `amount` of `reward` on behalf of `account` on the given rewards distributor, using `proof`. /// @dev Assumes the given distributor implements IUniversalRewardsDistributor. /// @param distributor The address of the reward distributor contract. diff --git a/src/WNativeBundler.sol b/src/WNativeBundler.sol index 840065cd..d4dab8bb 100644 --- a/src/WNativeBundler.sol +++ b/src/WNativeBundler.sol @@ -7,14 +7,14 @@ import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; -import {BaseBundler} from "./BaseBundler.sol"; +import {CoreBundler} from "./CoreBundler.sol"; /// @title WNativeBundler /// @author Morpho Labs /// @custom:contact security@morpho.org /// @notice Bundler contract managing interactions with network's wrapped native token. /// @notice "wrapped native" refers to forks of WETH. -abstract contract WNativeBundler is BaseBundler { +abstract contract WNativeBundler is CoreBundler { using SafeTransferLib for ERC20; /* IMMUTABLES */ diff --git a/src/base/BaseBundlerV2.sol b/src/base/BaseBundlerV2.sol index 31596373..68afc943 100644 --- a/src/base/BaseBundlerV2.sol +++ b/src/base/BaseBundlerV2.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.24; import {BaseLib} from "./libraries/BaseLib.sol"; -import {BaseBundler} from "../BaseBundler.sol"; +import {CoreBundler} from "../CoreBundler.sol"; import {TransferBundler} from "../TransferBundler.sol"; import {Permit2Bundler} from "../Permit2Bundler.sol"; import {ERC4626Bundler} from "../ERC4626Bundler.sol"; @@ -32,7 +32,7 @@ contract BaseBundlerV2 is /* INTERNAL */ /// @inheritdoc MorphoBundler - function _isSenderAuthorized() internal view override(BaseBundler, MorphoBundler) returns (bool) { + function _isSenderAuthorized() internal view override(CoreBundler, MorphoBundler) returns (bool) { return MorphoBundler._isSenderAuthorized(); } } diff --git a/src/ethereum/EthereumBundlerV2.sol b/src/ethereum/EthereumBundlerV2.sol index 94d9c262..9b71fd33 100644 --- a/src/ethereum/EthereumBundlerV2.sol +++ b/src/ethereum/EthereumBundlerV2.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.24; import {MainnetLib} from "./libraries/MainnetLib.sol"; -import {BaseBundler} from "../BaseBundler.sol"; +import {CoreBundler} from "../CoreBundler.sol"; import {TransferBundler} from "../TransferBundler.sol"; import {EthereumPermitBundler} from "./EthereumPermitBundler.sol"; import {Permit2Bundler} from "../Permit2Bundler.sol"; @@ -36,7 +36,7 @@ contract EthereumBundlerV2 is /* INTERNAL */ /// @inheritdoc MorphoBundler - function _isSenderAuthorized() internal view override(BaseBundler, MorphoBundler) returns (bool) { + function _isSenderAuthorized() internal view override(CoreBundler, MorphoBundler) returns (bool) { return MorphoBundler._isSenderAuthorized(); } } diff --git a/src/goerli/GoerliBundlerV2.sol b/src/goerli/GoerliBundlerV2.sol index 973d0a0e..d1bb5527 100644 --- a/src/goerli/GoerliBundlerV2.sol +++ b/src/goerli/GoerliBundlerV2.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.24; import {GoerliLib} from "./libraries/GoerliLib.sol"; -import {BaseBundler} from "../BaseBundler.sol"; +import {CoreBundler} from "../CoreBundler.sol"; import {TransferBundler} from "../TransferBundler.sol"; import {PermitBundler} from "../PermitBundler.sol"; import {Permit2Bundler} from "../Permit2Bundler.sol"; @@ -36,7 +36,7 @@ contract GoerliBundlerV2 is /* INTERNAL */ /// @inheritdoc MorphoBundler - function _isSenderAuthorized() internal view override(BaseBundler, MorphoBundler) returns (bool) { + function _isSenderAuthorized() internal view override(CoreBundler, MorphoBundler) returns (bool) { return MorphoBundler._isSenderAuthorized(); } } diff --git a/src/migration/AaveV2MigrationBundlerV2.sol b/src/migration/AaveV2MigrationBundlerV2.sol index 0ed2869e..e01b02f6 100644 --- a/src/migration/AaveV2MigrationBundlerV2.sol +++ b/src/migration/AaveV2MigrationBundlerV2.sol @@ -6,7 +6,7 @@ import {IAaveV2} from "./interfaces/IAaveV2.sol"; import {Math} from "../../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "../libraries/ErrorsLib.sol"; -import {BaseBundler} from "../BaseBundler.sol"; +import {CoreBundler} from "../CoreBundler.sol"; import {StEthBundler} from "../StEthBundler.sol"; import {MigrationBundler, ERC20} from "./MigrationBundler.sol"; @@ -62,7 +62,7 @@ contract AaveV2MigrationBundlerV2 is MigrationBundler, StEthBundler { /* INTERNAL */ /// @inheritdoc MigrationBundler - function _isSenderAuthorized() internal view virtual override(BaseBundler, MigrationBundler) returns (bool) { + function _isSenderAuthorized() internal view virtual override(CoreBundler, MigrationBundler) returns (bool) { return MigrationBundler._isSenderAuthorized(); } } diff --git a/src/migration/CompoundV2MigrationBundlerV2.sol b/src/migration/CompoundV2MigrationBundlerV2.sol index b6d63923..15acaeaa 100644 --- a/src/migration/CompoundV2MigrationBundlerV2.sol +++ b/src/migration/CompoundV2MigrationBundlerV2.sol @@ -7,7 +7,7 @@ import {ICToken} from "./interfaces/ICToken.sol"; import {Math} from "../../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "../libraries/ErrorsLib.sol"; -import {BaseBundler} from "../BaseBundler.sol"; +import {CoreBundler} from "../CoreBundler.sol"; import {WNativeBundler} from "../WNativeBundler.sol"; import {MigrationBundler, ERC20} from "./MigrationBundler.sol"; @@ -80,7 +80,7 @@ contract CompoundV2MigrationBundlerV2 is WNativeBundler, MigrationBundler { /* INTERNAL */ /// @inheritdoc MigrationBundler - function _isSenderAuthorized() internal view override(BaseBundler, MigrationBundler) returns (bool) { + function _isSenderAuthorized() internal view override(CoreBundler, MigrationBundler) returns (bool) { return MigrationBundler._isSenderAuthorized(); } } diff --git a/src/migration/MigrationBundler.sol b/src/migration/MigrationBundler.sol index 4955ef35..545054dc 100644 --- a/src/migration/MigrationBundler.sol +++ b/src/migration/MigrationBundler.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.24; import {SafeTransferLib, ERC20} from "../../lib/solmate/src/utils/SafeTransferLib.sol"; -import {BaseBundler} from "../BaseBundler.sol"; +import {CoreBundler} from "../CoreBundler.sol"; import {TransferBundler} from "../TransferBundler.sol"; import {PermitBundler} from "../PermitBundler.sol"; import {Permit2Bundler} from "../Permit2Bundler.sol"; @@ -24,7 +24,7 @@ abstract contract MigrationBundler is TransferBundler, PermitBundler, Permit2Bun /* INTERNAL */ /// @inheritdoc MorphoBundler - function _isSenderAuthorized() internal view virtual override(BaseBundler, MorphoBundler) returns (bool) { + function _isSenderAuthorized() internal view virtual override(CoreBundler, MorphoBundler) returns (bool) { return MorphoBundler._isSenderAuthorized(); } } diff --git a/src/mocks/bundlers/BaseBundlerMock.sol b/src/mocks/bundlers/BaseBundlerMock.sol deleted file mode 100644 index 4106d1f2..00000000 --- a/src/mocks/bundlers/BaseBundlerMock.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity ^0.8.0; - -import "../../BaseBundler.sol"; - -contract BaseBundlerMock is BaseBundler {} diff --git a/src/mocks/bundlers/CoreBundlerMock.sol b/src/mocks/bundlers/CoreBundlerMock.sol new file mode 100644 index 00000000..580c9cf7 --- /dev/null +++ b/src/mocks/bundlers/CoreBundlerMock.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +pragma solidity ^0.8.0; + +import "../../CoreBundler.sol"; + +contract CoreBundlerMock is CoreBundler {} diff --git a/src/mocks/bundlers/MorphoBundlerMock.sol b/src/mocks/bundlers/MorphoBundlerMock.sol index 44db0852..3e2d946b 100644 --- a/src/mocks/bundlers/MorphoBundlerMock.sol +++ b/src/mocks/bundlers/MorphoBundlerMock.sol @@ -7,7 +7,7 @@ import {MorphoBundler} from "../../MorphoBundler.sol"; contract MorphoBundlerMock is TransferBundler, MorphoBundler { constructor(address morpho) MorphoBundler(morpho) {} - function _isSenderAuthorized() internal view override(BaseBundler, MorphoBundler) returns (bool) { + function _isSenderAuthorized() internal view override(CoreBundler, MorphoBundler) returns (bool) { return MorphoBundler._isSenderAuthorized(); } } diff --git a/src/sepolia/SepoliaBundlerV2.sol b/src/sepolia/SepoliaBundlerV2.sol index 4a33d9f2..df1237c2 100644 --- a/src/sepolia/SepoliaBundlerV2.sol +++ b/src/sepolia/SepoliaBundlerV2.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.24; import {SepoliaLib} from "./libraries/SepoliaLib.sol"; -import {BaseBundler} from "../BaseBundler.sol"; +import {CoreBundler} from "../CoreBundler.sol"; import {TransferBundler} from "../TransferBundler.sol"; import {PermitBundler} from "../PermitBundler.sol"; import {Permit2Bundler} from "../Permit2Bundler.sol"; @@ -40,7 +40,7 @@ contract SepoliaBundlerV2 is /* INTERNAL */ /// @inheritdoc MorphoBundler - function _isSenderAuthorized() internal view override(BaseBundler, MorphoBundler) returns (bool) { + function _isSenderAuthorized() internal view override(CoreBundler, MorphoBundler) returns (bool) { return MorphoBundler._isSenderAuthorized(); } } diff --git a/test/forge/BaseBundlerEnshrinedLocalTest.sol b/test/forge/BaseBundlerEnshrinedLocalTest.sol index 1eb048ee..40faffdd 100644 --- a/test/forge/BaseBundlerEnshrinedLocalTest.sol +++ b/test/forge/BaseBundlerEnshrinedLocalTest.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {BaseBundler} from "src/mocks/bundlers/BaseBundlerMock.sol"; +import {CoreBundler} from "src/mocks/bundlers/CoreBundlerMock.sol"; import "./helpers/LocalTest.sol"; -contract BaseBundlerEnshrinedLocalTest is BaseBundler, LocalTest { +contract CoreBundlerEnshrinedLocalTest is CoreBundler, LocalTest { function checkInitiator(address expectedInitiator) public payable protected { require(initiator() == expectedInitiator, "unexpected initiator"); } diff --git a/test/forge/BaseBundlerLocalTest.sol b/test/forge/BaseBundlerLocalTest.sol index 61c20b93..f8d8a175 100644 --- a/test/forge/BaseBundlerLocalTest.sol +++ b/test/forge/BaseBundlerLocalTest.sol @@ -3,15 +3,15 @@ pragma solidity ^0.8.0; import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; -import "src/mocks/bundlers/BaseBundlerMock.sol"; +import "src/mocks/bundlers/CoreBundlerMock.sol"; import "./helpers/LocalTest.sol"; -contract BaseBundlerLocalTest is LocalTest { +contract CoreBundlerLocalTest is LocalTest { function setUp() public override { super.setUp(); - bundler = new BaseBundlerMock(); + bundler = new CoreBundlerMock(); } function testMulticallEmpty() public { @@ -19,7 +19,7 @@ contract BaseBundlerLocalTest is LocalTest { } function testNestedMulticall() public { - bundle.push(abi.encodeCall(BaseBundler.multicall, (callbackBundle))); + bundle.push(abi.encodeCall(CoreBundler.multicall, (callbackBundle))); vm.expectRevert(bytes(ErrorsLib.ALREADY_INITIATED)); bundler.multicall(bundle); diff --git a/test/forge/fork/helpers/ForkTest.sol b/test/forge/fork/helpers/ForkTest.sol index 4ed66c39..64f3569a 100644 --- a/test/forge/fork/helpers/ForkTest.sol +++ b/test/forge/fork/helpers/ForkTest.sol @@ -12,9 +12,9 @@ import {WNativeBundler} from "../../../../src/WNativeBundler.sol"; import {StEthBundler} from "../../../../src/StEthBundler.sol"; import "../../../../config/Configured.sol"; -import "../../helpers/BaseTest.sol"; +import "../../helpers/CommonTest.sol"; -abstract contract ForkTest is BaseTest, Configured { +abstract contract ForkTest is CommonTest, Configured { using ConfigLib for Config; using SafeTransferLib for ERC20; diff --git a/test/forge/fork/migration/helpers/MigrationForkTest.sol b/test/forge/fork/migration/helpers/MigrationForkTest.sol index 6ccc0402..ae241ec7 100644 --- a/test/forge/fork/migration/helpers/MigrationForkTest.sol +++ b/test/forge/fork/migration/helpers/MigrationForkTest.sol @@ -9,7 +9,7 @@ import {Market} from "../../../../../lib/morpho-blue/src/interfaces/IMorpho.sol" import {MorphoBalancesLib} from "../../../../../lib/morpho-blue/src/libraries/periphery/MorphoBalancesLib.sol"; import "../../helpers/ForkTest.sol"; -import {BaseBundler} from "../../../../../src/BaseBundler.sol"; +import {CoreBundler} from "../../../../../src/CoreBundler.sol"; import {PermitBundler} from "../../../../../src/PermitBundler.sol"; import {Permit2Bundler} from "../../../../../src/Permit2Bundler.sol"; import {ERC4626Bundler} from "../../../../../src/ERC4626Bundler.sol"; diff --git a/test/forge/helpers/BaseTest.sol b/test/forge/helpers/CommonTest.sol similarity index 98% rename from test/forge/helpers/BaseTest.sol rename to test/forge/helpers/CommonTest.sol index 884336f9..54d91da3 100644 --- a/test/forge/helpers/BaseTest.sol +++ b/test/forge/helpers/CommonTest.sol @@ -27,7 +27,7 @@ import { import {IrmMock} from "../../../lib/morpho-blue/src/mocks/IrmMock.sol"; import {OracleMock} from "../../../lib/morpho-blue/src/mocks/OracleMock.sol"; -import {BaseBundler} from "../../../src/BaseBundler.sol"; +import {CoreBundler} from "../../../src/CoreBundler.sol"; import {TransferBundler} from "../../../src/TransferBundler.sol"; import {ERC4626Bundler} from "../../../src/ERC4626Bundler.sol"; import {UrdBundler} from "../../../src/UrdBundler.sol"; @@ -41,7 +41,7 @@ uint256 constant MIN_AMOUNT = 1000; uint256 constant MAX_AMOUNT = 2 ** 64; // Must be less than or equal to type(uint160).max. uint256 constant SIGNATURE_DEADLINE = type(uint32).max; -abstract contract BaseTest is Test { +abstract contract CommonTest is Test { using MathLib for uint256; using SharesMathLib for uint256; using MarketParamsLib for MarketParams; @@ -58,7 +58,7 @@ abstract contract BaseTest is Test { IrmMock internal irm; OracleMock internal oracle; - BaseBundler internal bundler; + CoreBundler internal bundler; bytes[] internal bundle; bytes[] internal callbackBundle; diff --git a/test/forge/helpers/LocalTest.sol b/test/forge/helpers/LocalTest.sol index 10bdf4ff..d229d478 100644 --- a/test/forge/helpers/LocalTest.sol +++ b/test/forge/helpers/LocalTest.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.0; import {ERC20Mock} from "../../../src/mocks/ERC20Mock.sol"; -import "./BaseTest.sol"; +import "./CommonTest.sol"; -abstract contract LocalTest is BaseTest { +abstract contract LocalTest is CommonTest { using MathLib for uint256; using SharesMathLib for uint256; using MarketParamsLib for MarketParams;