> The purpose of the contract is to act like a insurance policies register.
It tracks of all insurances. When any event is raised on a policy, it can be executed.
owner: the contract owner address; is the contract creator
InsurancePolicy insurance policy structure that has as subparameters:
- toBePayedInCase is the address of the insured account
- amount is insurance amount
- fromTimestamp is the timestamp of the time from which the insurance starts
- coveredPeriod is the covered period in seconds from the starting insurance time
insurancePoliciesList the list of insurances
insurancePoliciesListIndex the index list of insurances
addInsurancePolicy add an insurance to the list
getInsurancePolicyByIndex get insurance from the list by index
executePolicy execute the policy