Skip to content

V2-SC-007: Enforce Claim Lifecycle and Deadline Transitions - #420

Merged
dDevAhmed merged 2 commits into
DigiNodes:mainfrom
ugoocreates-pixel:issue-v2-sc-007
Sep 3, 2026
Merged

V2-SC-007: Enforce Claim Lifecycle and Deadline Transitions#420
dDevAhmed merged 2 commits into
DigiNodes:mainfrom
ugoocreates-pixel:issue-v2-sc-007

Conversation

@ugoocreates-pixel

Copy link
Copy Markdown
Contributor

Closes #358

Implements the canonical claim state machine and reusable transition guards.

Technical Scope

  • ClaimState Update: Modified IV2Types.ClaimState to support VerificationOpen, ChallengeWindow, AwaitingSettlement, Disputed, and Finalized transitions.
  • State Machine Rules: Updated V2Lifecycle.sol logic to correctly enforce transitions between the canonical claim states.
  • Event Signature: Replaced the legacy ClaimStatusChanged with ClaimStateChanged mapping (uint256 indexed claimId, IV2Types.ClaimState previousState, IV2Types.ClaimState newState, address indexed actor, uint64 timestamp, bytes32 reasonCode) in IClaims.sol.
  • Query Utilities: Re-mapped isClaimOpen, isClaimVerified, and isClaimDisputed inside V2Lifecycle to reflect the respective groupings under the new enumeration.

Security and Integrity Requirements Maintained

  • Immutability of Finalized States: A finalized claim can never return to an earlier state; Finalized is strictly validated as a terminal state.
  • Invariant Guarantee: Reused strict V2Errors.InvalidClaimStateTransition boundaries.

@dDevAhmed
dDevAhmed merged commit 9f252af into DigiNodes:main Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V2-SC-007 — Enforce Claim Lifecycle and Deadline Transitions

2 participants