-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
123 additions
and
152 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,32 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.27; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
import "./IStrategy.sol"; | ||
|
||
/** | ||
* @title Interface for a `IShareManager` contract. | ||
* @author Layr Labs, Inc. | ||
* @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service | ||
* @notice This contract is used by the DelegationManager as a unified interface to interact with the EigenPodManager and StrategyManager | ||
*/ | ||
interface IShareManager { | ||
/// @notice Used by the DelegationManager to remove a Staker's shares from a particular strategy when entering the withdrawal queue | ||
/// @dev strategy must be beaconChainETH when talking to the EigenPodManager | ||
function removeShares(address staker, IStrategy strategy, uint256 shares) external; | ||
|
||
/// @notice Used by the DelegationManager to award a Staker some shares that have passed through the withdrawal queue | ||
/// @dev strategy must be beaconChainETH when talking to the EigenPodManager | ||
/// @dev token is not validated when talking to the EigenPodManager | ||
function addShares(address staker, IERC20 token, IStrategy strategy, uint256 shares) external; | ||
|
||
/// @notice Used by the DelegationManager to convert withdrawn descaled shares to tokens and send them to a recipient | ||
/// @dev strategy must be beaconChainETH when talking to the EigenPodManager | ||
/// @dev token is not validated when talking to the EigenPodManager | ||
function withdrawSharesAsTokens(address recipient, IStrategy strategy, uint256 shares, IERC20 token) external; | ||
|
||
/// @notice Returns the current shares of `user` in `strategy` | ||
/// @dev strategy must be beaconChainETH when talking to the EigenPodManager | ||
/// @dev returns 0 if the user has negative shares | ||
function stakerStrategyShares(address user, IStrategy strategy) external view returns (uint256 shares); | ||
} |
This file contains 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.