Contract Integration
If policyholder is a smart contract
If the policyholder is a smart contract, the contract must implement certain functions to interact with an insurance contract for the purposes of issuing, redeeming, and submitting claims for policies.
onPolicyIssued
This function will called by the insurance contract (policy manager facet) when the policy is issued and the caller is contract.
The selector can be obtained in Solidity with IInsuranceIssuer.onPolicyIssued.selector
.
operator
address
The operator address.
from
address
The from address.
policyId
string
The policy id.
[0]
bytes4
The bytes4 of the selector of onPolicyIssued function.
onPolicyRedeemed
This function will called by the insurance contract (policy manager facet) when the policy is redeemed and the caller is contract.
The selector can be obtained in Solidity with IInsuranceIssuer.onPolicyRedeemed.selector
.
operator
address
The operator address.
from
address
The caller address.
policyId
string
The policy id.
[0]
bytes4
The bytes4 of the selector of onPolicyRedeemed function.
onClaimSubmitted
This function will called by the insurance contract (claim manager facet) when the policy is submitted and the caller is contract.
The selector can be obtained in Solidity with IInsuranceIssuer.onClaimSubmitted.selector
.
operator
address
The operator address.
from
address
The caller address.
policyId
string
The policy id.
[0]
bytes4
The bytes4 of the selector of onClaimSubmitted function.
Last updated