-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathIStakeManager.sol
36 lines (30 loc) · 914 Bytes
/
IStakeManager.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.12;
/**
* manage deposits and stakes.
* stake is value deposited that can be withdrawn at any time.
*/
interface IStakeManager {
/// Emitted when stake is deposited
event StakeDeposit(
address indexed account,
uint256 totalStaked
);
event StakeWithdrawal(
address indexed account,
address withdrawAddress,
uint256 amount
);
/// return the stake of the account
function balanceOf(address account) external view returns (uint256);
/**
* add to the account's stake - amount
* @param staker the address of the staker.
*/
function addStake(address staker) external payable;
/**
* withdraw the stake.
* @param withdrawAddress the address to send withdrawn value.
*/
function withdrawStake(address payable withdrawAddress) external;
}