Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/remove-stEth-from-constructor-arguments-issue-21 #324

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/StEthBundler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ abstract contract StEthBundler is BaseBundler {
/* CONSTRUCTOR */

/// @dev Warning: assumes the given addresses are non-zero (they are not expected to be deployment arguments).
constructor(address stEth, address wstEth) {
ST_ETH = stEth;
constructor(address wstEth) {
ST_ETH = IWstEth(wstEth).stETH();
WST_ETH = wstEth;

ERC20(ST_ETH).safeApprove(WST_ETH, type(uint256).max);
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/EthereumStEthBundler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ import {StEthBundler} from "../StEthBundler.sol";
abstract contract EthereumStEthBundler is StEthBundler {
/* CONSTRUCTOR */

constructor() StEthBundler(MainnetLib.ST_ETH, MainnetLib.WST_ETH) {}
constructor() StEthBundler(MainnetLib.WST_ETH) {}
}
3 changes: 0 additions & 3 deletions src/ethereum/libraries/MainnetLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ library MainnetLib {
/// @dev The address of the WETH contract on Ethereum.
address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

/// @dev The address of the stETH contract on Ethereum.
address internal constant ST_ETH = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84;

/// @dev The address of the wstETH contract on Ethereum.
address internal constant WST_ETH = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0;

Expand Down
6 changes: 1 addition & 5 deletions src/goerli/GoerliBundler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,5 @@ contract GoerliBundler is
{
/* CONSTRUCTOR */

constructor(address morpho)
WNativeBundler(GoerliLib.WETH)
StEthBundler(GoerliLib.ST_ETH, GoerliLib.WST_ETH)
Rubilmax marked this conversation as resolved.
Show resolved Hide resolved
MorphoBundler(morpho)
{}
constructor(address morpho) WNativeBundler(GoerliLib.WETH) StEthBundler(GoerliLib.WST_ETH) MorphoBundler(morpho) {}
}
3 changes: 0 additions & 3 deletions src/goerli/libraries/GoerliLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ library GoerliLib {
/// @dev The address of the WETH contract on Ethereum.
address internal constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6;

/// @dev The address of the stETH contract on Ethereum.
address internal constant ST_ETH = 0x1643E812aE58766192Cf7D2Cf9567dF2C37e9B7F;

/// @dev The address of the wstETH contract on Ethereum.
address internal constant WST_ETH = 0x6320cD32aA674d2898A68ec82e869385Fc5f7E2f;
}
Loading