Skip to content

Reject deadline that has already passed in lockTask - #17

Open
sharmis-tp wants to merge 1 commit into
mergit-io:mainfrom
sharmis-tp:fix/reject-past-deadline-9
Open

sharmis-tp wants to merge 1 commit into
mergit-io:mainfrom
sharmis-tp:fix/reject-past-deadline-9

Conversation

@sharmis-tp

Copy link
Copy Markdown

Summary

Closes #9. lockTask now reverts with DeadlineInPast(taskId, deadline) when deadline <= block.timestamp.

  • New custom error DeadlineInPast(bytes32 taskId, uint64 deadline) added to IEscrow
  • Boundary test: deadline == block.timestamp reverts, block.timestamp + 1 passes
  • Existing tests unaffected (all use future deadlines)
  • Note: changing IEscrow means ABIs in mergit need regenerating with chain/abi/sync.sh

Test plan

  • forge test passes
  • Boundary condition tested (deadline == block.timestamp reverts, block.timestamp + 1 passes)

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.

Escrow.lockTask: reject a deadline that has already passed

1 participant