From 0bc9b449a894724a8c2105e646137858ae8d3424 Mon Sep 17 00:00:00 2001 From: matthias zimmermann Date: Sun, 17 Jul 2022 16:45:51 +0200 Subject: [PATCH] rename IPool.expire to release, track open claims/payouts in Policy --- contracts/modules/IPolicy.sol | 4 +++- contracts/modules/IPool.sol | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contracts/modules/IPolicy.sol b/contracts/modules/IPolicy.sol index e4d676c..370c21e 100644 --- a/contracts/modules/IPolicy.sol +++ b/contracts/modules/IPolicy.sol @@ -75,7 +75,7 @@ interface IPolicy { enum ApplicationState {Applied, Revoked, Underwritten, Declined} - enum PolicyState {Active, Expired} + enum PolicyState {Active, Expired, Closed} enum ClaimState {Applied, Confirmed, Declined} @@ -103,7 +103,9 @@ interface IPolicy { struct Policy { PolicyState state; uint256 claimsCount; + uint256 openClaimsCount; uint256 payoutsCount; + uint256 openPayoutsCount; uint256 createdAt; uint256 updatedAt; } diff --git a/contracts/modules/IPool.sol b/contracts/modules/IPool.sol index 5ced7e6..48771ad 100644 --- a/contracts/modules/IPool.sol +++ b/contracts/modules/IPool.sol @@ -7,8 +7,9 @@ interface IPool { event LogRiskpoolCollateralizationSucceeded(uint256 riskpoolId, bytes32 processId, uint256 amount); function setRiskpoolForProduct(uint256 productId, uint256 riskpoolId) external; + function underwrite(bytes32 processId) external returns(bool success); - function expire(bytes32 processId) external; + function release(bytes32 processId) external; function increaseBalance(bytes32 processId, uint256 amount) external; function decreaseBalance(bytes32 processId, uint256 amount) external;