Skip to content

Latest commit

 

History

History
274 lines (245 loc) · 8.46 KB

IUnstakable.md

File metadata and controls

274 lines (245 loc) · 8.46 KB

IUnstakable.sol

View Source: contracts/interfaces/IUnstakable.sol

↘ Derived Contracts: IResolution, Unstakable

IUnstakable

Structs

UnstakeInfoType

struct UnstakeInfoType {
 uint256 totalStakeInWinningCamp,
 uint256 totalStakeInLosingCamp,
 uint256 myStakeInWinningCamp,
 uint256 toBurn,
 uint256 toReporter,
 uint256 myReward,
 uint256 unstaken
}

Events

event Unstaken(bytes32 indexed coverKey, bytes32 indexed productKey, address indexed caller, uint256  originalStake, uint256  reward);
event ReporterRewardDistributed(bytes32 indexed coverKey, bytes32 indexed productKey, address  caller, address indexed reporter, uint256  originalReward, uint256  reporterReward);
event GovernanceBurned(bytes32 indexed coverKey, bytes32 indexed productKey, address  caller, address indexed burner, uint256  originalReward, uint256  burnedAmount);

Functions

unstake

function unstake(bytes32 coverKey, bytes32 productKey, uint256 incidentDate) external nonpayable

Arguments

Name Type Description
coverKey bytes32
productKey bytes32
incidentDate uint256
Source Code
function unstake(
    bytes32 coverKey,
    bytes32 productKey,
    uint256 incidentDate
  ) external;

unstakeWithClaim

function unstakeWithClaim(bytes32 coverKey, bytes32 productKey, uint256 incidentDate) external nonpayable

Arguments

Name Type Description
coverKey bytes32
productKey bytes32
incidentDate uint256
Source Code
function unstakeWithClaim(
    bytes32 coverKey,
    bytes32 productKey,
    uint256 incidentDate
  ) external;

getUnstakeInfoFor

function getUnstakeInfoFor(address account, bytes32 coverKey, bytes32 productKey, uint256 incidentDate) external view
returns(struct IUnstakable.UnstakeInfoType)

Arguments

Name Type Description
account address
coverKey bytes32
productKey bytes32
incidentDate uint256
Source Code
function getUnstakeInfoFor(
    address account,
    bytes32 coverKey,
    bytes32 productKey,
    uint256 incidentDate
  ) external view returns (UnstakeInfoType memory);

Contracts