-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathICoverStake.sol
More file actions
39 lines (35 loc) · 1.43 KB
/
ICoverStake.sol
File metadata and controls
39 lines (35 loc) · 1.43 KB
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
37
38
39
// Neptune Mutual Protocol (https://neptunemutual.com)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "./IMember.sol";
interface ICoverStake is IMember {
event StakeAdded(bytes32 indexed coverKey, address indexed account, uint256 amount);
event StakeRemoved(bytes32 indexed coverKey, address indexed account, uint256 amount);
event FeeBurned(bytes32 indexed coverKey, uint256 amount);
/**
* @dev Increase the stake of the given cover pool
* @param coverKey Enter the cover key
* @param account Enter the account from where the NPM tokens will be transferred
* @param amount Enter the amount of stake
* @param fee Enter the fee amount. Note: do not enter the fee if you are directly calling this function.
*/
function increaseStake(
bytes32 coverKey,
address account,
uint256 amount,
uint256 fee
) external;
/**
* @dev Decreases the stake from the given cover pool
* @param coverKey Enter the cover key
* @param amount Enter the amount of stake to decrease
*/
function decreaseStake(bytes32 coverKey, uint256 amount) external;
/**
* @dev Gets the stake of an account for the given cover key
* @param coverKey Enter the cover key
* @param account Specify the account to obtain the stake of
* @return Returns the total stake of the specified account on the given cover key
*/
function stakeOf(bytes32 coverKey, address account) external view returns (uint256);
}