-
Notifications
You must be signed in to change notification settings - Fork 6
stETH Integration #718
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
Merged
Merged
stETH Integration #718
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b5d57ba
Restructured the `instances/` directory to clean things up
jalextowle bfb083c
Cleaned up the ERC4626 deployers
jalextowle 92b17a7
Added a stETH implementation
jalextowle b26fc22
Adds the deployer contracts for the StETH integration
jalextowle 4a36257
Started to add tests for the stETH integration
jalextowle 310640c
Fixed the stETH integration test
jalextowle 24a63dd
Added some getters for targets and the lido immutable
jalextowle 6f4a2dd
Implemented the required infrastructure for a stETH testnet
jalextowle bc760aa
Addressed remaining FIXMEs
jalextowle c764802
Addressed review feedback from @jrhea
jalextowle b362de0
Merge remote-tracking branch 'origin/main' into jalextowle/instance/s…
jalextowle 9740c9a
Adds a stETH function to the StETHHyperdrive integration
jalextowle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
contracts/src/deployers/erc4626/ERC4626HyperdriveDeployerCoordinator.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| pragma solidity 0.8.19; | ||
|
|
||
| import { IERC4626 } from "../../interfaces/IERC4626.sol"; | ||
| import { ONE } from "../../libraries/FixedPointMath.sol"; | ||
| import { HyperdriveDeployerCoordinator } from "../HyperdriveDeployerCoordinator.sol"; | ||
|
|
||
| /// @author DELV | ||
| /// @title ERC4626HyperdriveDeployerCoordinator | ||
| /// @notice The deployer coordinator for the ERC4626Hyperdrive implementation. | ||
| /// @custom:disclaimer The language used in this code is for coding convenience | ||
| /// only, and is not intended to, and does not, have any | ||
| /// particular legal or regulatory significance. | ||
| contract ERC4626HyperdriveDeployerCoordinator is HyperdriveDeployerCoordinator { | ||
| /// @notice Instantiates the deployer coordinator. | ||
| /// @param _coreDeployer The core deployer. | ||
| /// @param _target0Deployer The target0 deployer. | ||
| /// @param _target1Deployer The target1 deployer. | ||
| /// @param _target2Deployer The target2 deployer. | ||
| /// @param _target3Deployer The target3 deployer. | ||
| constructor( | ||
| address _coreDeployer, | ||
| address _target0Deployer, | ||
| address _target1Deployer, | ||
| address _target2Deployer, | ||
| address _target3Deployer | ||
| ) | ||
| HyperdriveDeployerCoordinator( | ||
| _coreDeployer, | ||
| _target0Deployer, | ||
| _target1Deployer, | ||
| _target2Deployer, | ||
| _target3Deployer | ||
| ) | ||
| {} | ||
|
|
||
| /// @dev Gets the initial share price of the Hyperdrive pool. | ||
| /// @param _extraData The extra data passed to the child deployers. | ||
| /// @return The initial share price of the Hyperdrive pool. | ||
| function _getInitialSharePrice( | ||
| bytes memory _extraData | ||
| ) internal view override returns (uint256) { | ||
| // Return the vault's current share price. | ||
| IERC4626 pool = IERC4626(abi.decode(_extraData, (address))); | ||
| return pool.convertToAssets(ONE); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.