diff --git a/src/goerli/libraries/GoerliLib.sol b/src/goerli/libraries/GoerliLib.sol index ba3c7a80..30e6c51a 100644 --- a/src/goerli/libraries/GoerliLib.sol +++ b/src/goerli/libraries/GoerliLib.sol @@ -2,9 +2,9 @@ pragma solidity ^0.8.0; library GoerliLib { - /// @dev The address of the WETH contract on Ethereum. + /// @dev The address of the WETH contract on Goerli. address internal constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; - /// @dev The address of the wstETH contract on Ethereum. + /// @dev The address of the wstETH contract on Goerli. address internal constant WST_ETH = 0x6320cD32aA674d2898A68ec82e869385Fc5f7E2f; } diff --git a/src/sepolia/SepoliaBundler.sol b/src/sepolia/SepoliaBundler.sol new file mode 100644 index 00000000..73922c9b --- /dev/null +++ b/src/sepolia/SepoliaBundler.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +pragma solidity 0.8.21; + +import {SepoliaLib} from "./libraries/SepoliaLib.sol"; + +import {BaseBundler} from "../BaseBundler.sol"; +import {TransferBundler} from "../TransferBundler.sol"; +import {PermitBundler} from "../PermitBundler.sol"; +import {Permit2Bundler} from "../Permit2Bundler.sol"; +import {ERC4626Bundler} from "../ERC4626Bundler.sol"; +import {WNativeBundler} from "../WNativeBundler.sol"; +import {StEthBundler} from "../StEthBundler.sol"; +import {UrdBundler} from "../UrdBundler.sol"; +import {MorphoBundler} from "../MorphoBundler.sol"; +import {ERC20WrapperBundler} from "../ERC20WrapperBundler.sol"; + +/// @title SepoliaBundler +/// @author Morpho Labs +/// @custom:contact security@morpho.org +/// @notice Bundler contract specific to the Sepolia testnet. +contract SepoliaBundler is + TransferBundler, + PermitBundler, + Permit2Bundler, + ERC4626Bundler, + WNativeBundler, + StEthBundler, + UrdBundler, + MorphoBundler, + ERC20WrapperBundler +{ + /* CONSTRUCTOR */ + + constructor(address morpho) + WNativeBundler(SepoliaLib.WETH) + StEthBundler(SepoliaLib.WST_ETH) + MorphoBundler(morpho) + {} + + /* INTERNAL */ + + /// @inheritdoc MorphoBundler + function _isSenderAuthorized() internal view override(BaseBundler, MorphoBundler) returns (bool) { + return MorphoBundler._isSenderAuthorized(); + } +} diff --git a/src/sepolia/libraries/SepoliaLib.sol b/src/sepolia/libraries/SepoliaLib.sol new file mode 100644 index 00000000..6e057157 --- /dev/null +++ b/src/sepolia/libraries/SepoliaLib.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +pragma solidity ^0.8.0; + +library SepoliaLib { + /// @dev The address of the WETH contract on Sepolia. + address internal constant WETH = 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9; + + /// @dev The address of the wstETH contract on Sepolia. + /// @dev The wstETH contract corresponds exactly to the one on Ethereum. The underlying stETH contract is a mock + /// exposing a subset of the interface of stETH on Ethereum and behaves just like WETH: no reward is accrued. + address internal constant WST_ETH = 0xA0dc0A387a022d8F33d2BE6fF139077639B1a348; +}