Flows
This document is better viewed at https://docs.etherisc.com/contracts/api/flows |
Contracts
PolicyDefaultFlow
import "@etherisc/gif-contracts/contracts/flows/PolicyDefaultFlow.sol";
constructor(address _registry)
public
Constructor function that initializes the contract with a given registry address.
newApplication(address owner, uint256 premiumAmount, uint256 sumInsuredAmount, bytes metaData, bytes applicationData) → bytes32 processId
external
Creates a new insurance application and returns the process ID.
underwrite(bytes32 processId) → bool success
external
Attempts to get the collateral to secure the policy.
collectPremium(bytes32 processId, uint256 amount) → bool success, uint256 feeAmount, uint256 netPremiumAmount
public
Collects the premium for a given policy and updates the book keeping of the policy and the risk pool.
adjustPremiumSumInsured(bytes32 processId, uint256 expectedPremiumAmount, uint256 sumInsuredAmount)
external
Adjusts the premium and sum insured amounts of a policy.
decline(bytes32 processId)
external
Allows the responsible product to decline an application for a policy.
close(bytes32 processId)
external
Closes a policy and releases the corresponding funds from the pool.
newClaim(bytes32 processId, uint256 claimAmount, bytes data) → uint256 claimId
external
Creates a new claim for a given process ID, claim amount and data.
confirmClaim(bytes32 processId, uint256 claimId, uint256 confirmedAmount)
external
Confirms a claim for a specific process and claim ID, updating the confirmed amount.
declineClaim(bytes32 processId, uint256 claimId)
external
Allows the responsible product to decline a claim.
closeClaim(bytes32 processId, uint256 claimId)
external
Closes a claim for a specific process and claim ID.
newPayout(bytes32 processId, uint256 claimId, uint256 amount, bytes data) → uint256 payoutId
external
Creates a new payout for a specific claim.
processPayout(bytes32 processId, uint256 payoutId) → bool success, uint256 feeAmount, uint256 netPayoutAmount
external
Processes a payout for a specific process and payout ID.
request(bytes32 processId, bytes _input, string _callbackMethodName, address _callbackContractAddress, uint256 _responsibleOracleId) → uint256 _requestId
external
Sends a request to the query contract to initiate a new process.
getApplicationData(bytes32 processId) → bytes
external
Returns the application data associated with the given process ID.
getClaimData(bytes32 processId, uint256 claimId) → bytes
external
Returns the claim data of a specific claim for a given process ID.
getPayoutData(bytes32 processId, uint256 payoutId) → bytes
external
Returns the payout data for a given process and payout ID.
getComponentContract() → contract ComponentController
internal
Returns the ComponentController contract instance.
getPoolContract() → contract PoolController
internal
Returns the PoolController contract instance from the registry.
getPolicyContract() → contract PolicyController
internal
Returns the PolicyController contract instance from the registry.