Skip to content

Latest commit

 

History

History
260 lines (228 loc) · 8.15 KB

ICoverStake.md

File metadata and controls

260 lines (228 loc) · 8.15 KB

ICoverStake.sol

View Source: contracts/interfaces/ICoverStake.sol

↗ Extends: IMember ↘ Derived Contracts: CoverStake

ICoverStake

Events

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);

Functions

increaseStake

Increase the stake of the given cover pool

function increaseStake(bytes32 coverKey, address account, uint256 amount, uint256 fee) external nonpayable

Arguments

Name Type Description
coverKey bytes32 Enter the cover key
account address Enter the account from where the NPM tokens will be transferred
amount uint256 Enter the amount of stake
fee uint256 Enter the fee amount. Note: do not enter the fee if you are directly calling this function.
Source Code
function increaseStake(
    bytes32 coverKey,
    address account,
    uint256 amount,
    uint256 fee
  ) external;

decreaseStake

Decreases the stake from the given cover pool

function decreaseStake(bytes32 coverKey, uint256 amount) external nonpayable

Arguments

Name Type Description
coverKey bytes32 Enter the cover key
amount uint256 Enter the amount of stake to decrease
Source Code
function decreaseStake(bytes32 coverKey, uint256 amount) external;

stakeOf

Gets the stake of an account for the given cover key

function stakeOf(bytes32 coverKey, address account) external view
returns(uint256)

Arguments

Name Type Description
coverKey bytes32 Enter the cover key
account address Specify the account to obtain the stake of

Returns

Returns the total stake of the specified account on the given cover key

Source Code
function stakeOf(bytes32 coverKey, address account) external view returns (uint256);

Contracts