Claim Manager

Insurance Smart Contract

finalizeAssessment

function finalizeAssessment(uint256 _claimId_, bool _isAccepted_) external returns (bool)

"The finalizeAssessment function allows the governance board to finalize the assessment for an insurance claim. The function takes two parameters: the claim ID and a boolean flag indicating whether the claim is accepted or rejected.

The function can only be called after the claim has expired and has not yet reached consensus.

Upon successful finalization of the assessment, the function emits the ClaimAssessmentConsensusReached event, indicating that the claim assessment process is complete, and the payout to the policy holder can be initiated. Additionally, the function will emit the ClaimAssessmentPointIncreased event, signifying that the validator's point will be increased.

The function returns a boolean value, with true indicating that the assessment has been finalized successfully."

Requirements:

  • nonReentrant - The function must not be reentrant.

  • whenNotPaused - The function must not be paused.

  • msg.sender - The caller must have the role of GOVERNANCE_BOARD_LEVEL.

Events:

  • ClaimAssessmentConsensusReached - Emitted when the assessment is finalized successfully.

  • ClaimAssessmentPointIncreased - Emitted when the consensus on the assessment of a claim is reached. This event signifies that the claim assessment process is complete and the point will increased to the validator of the claim.

NameTypeDescription

claimId

uint256

The claim id.

isAccepted

bool

The governance board will flag that indicates whether the submitted claim is accepted or rejected.

NameTypeDescription

[0]

bool

True if the assessment is finalized successfully.

ClaimAssessmentConsensusReached

event ClaimAssessmentConsensusReached(uint256 claimId, ClaimStatus status)

This event is emitted when the claim is consensus.

NameTypeDescription

claimId

uint256

The claim id.

status

The claim status.

ClaimAssessmentPointIncreased

event ClaimAssessmentPointIncreased(uint256 claimId, address validator, uint256 point)

This event is emitted when the claim is consensus.

NameTypeDescription

claimId

uint256

The claim id.

validator

address

The validator address who selected from the submitted claim.

point

uint256

The point amount that given to the validator.

Last updated