Skip to content

[Contract] Bounty Review Time Window Logic #360

@gabito1451

Description

@gabito1451

Independence Note: Build local state tracking arrays in tests.

Context:
Once a bounty is submitted, the admin should have a fixed window (e.g., 7 days) to review it. If they don't respond, the funds should potentially go into a dispute or be returned.

Objective:
Establish a state for tracking the review time window.

Acceptance Criteria:

  • When a submission is created, record the Current Ledger Sequence.
  • Create is_review_window_over(submission_id) which checks if the difference between current and recorded sequence exceeds an arbitrary limit.
  • Use this check to prevent admins from making decisions after the window has closed.
  • Add unit tests simulating the passage of ledge sequences to verify the behavior.

Technical Pointers:

  • Time in smart contracts is often measured in blocks (ledger sequences) for more deterministic behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions