-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: introduce
IStakeManager
interface
This introduces a first version of `IStakeManager`, highly inspired by the changes done in #39. However, in this commit, it only adds the methods that are currently supported by both, `StakeManager` and `RewardStreamerMP`. Future commits will add APIs for locking and leaving.
- Loading branch information
Showing
7 changed files
with
95 additions
and
68 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
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,26 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.26; | ||
|
||
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
|
||
interface IStakeManager { | ||
error StakeManager__FundsLocked(); | ||
error StakeManager__InvalidLockTime(); | ||
error StakeManager__InsufficientFunds(); | ||
error StakeManager__StakeIsTooLow(); | ||
|
||
function stake(uint256 _amount, uint256 _seconds) external; | ||
function unstake(uint256 _amount) external; | ||
|
||
function totalStaked() external view returns (uint256); | ||
function totalMP() external view returns (uint256); | ||
function totalMaxMP() external view returns (uint256); | ||
function getStakedBalance(address _vault) external view returns (uint256 _balance); | ||
|
||
function STAKE_TOKEN() external view returns (IERC20); | ||
function REWARD_TOKEN() external view returns (IERC20); | ||
function MIN_LOCKUP_PERIOD() external view returns (uint256); | ||
function MAX_LOCKUP_PERIOD() external view returns (uint256); | ||
function MP_RATE_PER_YEAR() external view returns (uint256); | ||
function MAX_MULTIPLIER() external view returns (uint256); | ||
} |
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