-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathIWitness.sol
More file actions
39 lines (32 loc) · 1.1 KB
/
IWitness.sol
File metadata and controls
39 lines (32 loc) · 1.1 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;
interface IWitness {
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);
function attest(
bytes32 coverKey,
bytes32 productKey,
uint256 incidentDate,
uint256 stake
) external;
function refute(
bytes32 coverKey,
bytes32 productKey,
uint256 incidentDate,
uint256 stake
) external;
function getStatus(bytes32 coverKey, bytes32 productKey) external view returns (uint256);
function isCoverNormal(bytes32 coverKey) external view returns (bool);
function getStakes(
bytes32 coverKey,
bytes32 productKey,
uint256 incidentDate
) external view returns (uint256, uint256);
function getStakesOf(
bytes32 coverKey,
bytes32 productKey,
uint256 incidentDate,
address account
) external view returns (uint256, uint256);
}