Skip to content

Latest commit

 

History

History
335 lines (290 loc) · 9.62 KB

IWitness.md

File metadata and controls

335 lines (290 loc) · 9.62 KB

IWitness.sol

View Source: contracts/interfaces/IWitness.sol

↘ Derived Contracts: IGovernance, Witness

IWitness

Events

event Attested(bytes32 indexed coverKey, bytes32 indexed productKey, address  witness, uint256 indexed incidentDate, uint256  stake);
event Refuted(bytes32 indexed coverKey, bytes32 indexed productKey, address  witness, uint256 indexed incidentDate, uint256  stake);

Functions

attest

function attest(bytes32 coverKey, bytes32 productKey, uint256 incidentDate, uint256 stake) external nonpayable

Arguments

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

refute

function refute(bytes32 coverKey, bytes32 productKey, uint256 incidentDate, uint256 stake) external nonpayable

Arguments

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

getStatus

function getStatus(bytes32 coverKey, bytes32 productKey) external view
returns(uint256)

Arguments

Name Type Description
coverKey bytes32
productKey bytes32
Source Code
function getStatus(bytes32 coverKey, bytes32 productKey) external view returns (uint256);

isCoverNormal

function isCoverNormal(bytes32 coverKey) external view
returns(bool)

Arguments

Name Type Description
coverKey bytes32
Source Code
function isCoverNormal(bytes32 coverKey) external view returns (bool);

getStakes

function getStakes(bytes32 coverKey, bytes32 productKey, uint256 incidentDate) external view
returns(uint256, uint256)

Arguments

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

getStakesOf

function getStakesOf(bytes32 coverKey, bytes32 productKey, uint256 incidentDate, address account) external view
returns(uint256, uint256)

Arguments

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

Contracts