#
ISimplePolicyFacet
Facet for working with Simple Policies
#
Functions
#
getSigningHash
No description Generate a simple policy hash for singing by the stakeholders
function getSigningHash(
uint256 _startDate,
uint256 _maturationDate,
bytes32 _asset,
uint256 _limit,
bytes32 _offchainDataHash
) external returns (bytes32 signingHash_)
#
Arguments:
| Argument | Type | Description |
| --- | --- | --- |
|_startDate
| uint256 | Date when policy becomes active
|_maturationDate
| uint256 | Date after which policy becomes matured
|_asset
| bytes32 | ID of the underlying asset, used as collateral and to pay out claims
|_limit
| uint256 | Policy coverage limit
|_offchainDataHash
| bytes32 | Hash of all the important policy data stored offchain
|
#
Returns:
| Type | Description |
| --- | --- |
|signingHash_
| hash for signing|
#
paySimplePremium
No description
Pay a premium of _amount
on simple policy
function paySimplePremium(
bytes32 _policyId,
uint256 _amount
) external
#
Arguments:
| Argument | Type | Description |
| --- | --- | --- |
|_policyId
| bytes32 | Id of the simple policy
|_amount
| uint256 | Amount of the premium|
#
paySimpleClaim
No description
Pay a claim of _amount
for simple policy
function paySimpleClaim(
bytes32 _claimId,
bytes32 _policyId,
bytes32 _insuredId,
uint256 _amount
) external
#
Arguments:
| Argument | Type | Description |
| --- | --- | --- |
|_claimId
| bytes32 | Id of the simple policy claim
|_policyId
| bytes32 | Id of the simple policy
|_insuredId
| bytes32 | Id of the insured party
|_amount
| uint256 | Amount of the claim|
#
getSimplePolicyInfo
No description Get simple policy info
function getSimplePolicyInfo(
bytes32 _id
) external returns (struct SimplePolicyInfo)
#
Arguments:
| Argument | Type | Description |
| --- | --- | --- |
|_id
| bytes32 | Id of the simple policy
|
#
Returns:
| Type | Description |
| --- | --- |
|Simple
| policy metadata|
#
getPolicyCommissionReceivers
No description Get the list of commission receivers
function getPolicyCommissionReceivers(
bytes32 _id
) external returns (bytes32[] commissionReceivers)
#
Arguments:
| Argument | Type | Description |
| --- | --- | --- |
|_id
| bytes32 | Id of the simple policy
|
#
checkAndUpdateSimplePolicyState
No description Check and update simple policy state
function checkAndUpdateSimplePolicyState(
bytes32 _id
) external
#
Arguments:
| Argument | Type | Description |
| --- | --- | --- |
|_id
| bytes32 | Id of the simple policy|
#
cancelSimplePolicy
No description Cancel a simple policy
function cancelSimplePolicy(
bytes32 _policyId
) external
#
Arguments:
| Argument | Type | Description |
| --- | --- | --- |
|_policyId
| bytes32 | Id of the simple policy|
#
calculatePremiumFees
No description Calculate the policy premium fees based on a buy amount.
function calculatePremiumFees(
bytes32 _premiumPaid
) external returns (struct CalculatedFees cf)
#
Arguments:
| Argument | Type | Description |
| --- | --- | --- |
|_premiumPaid
| bytes32 | The amount that the fees payments are calculated from.
|
#
Returns:
| Type | Description |
| --- | --- |
|cf
| CalculatedFees struct|