Skip to content

feat: add automated escrow release — anyone can trigger release after a deadline if beneficiary has not claimed #355

@BigBen-7

Description

@BigBen-7

Description

If the organizer loses their key or forgets to claim, funds are permanently stuck. An automated release trigger allows anyone to initiate release after a configurable deadline.

What to do

  • Add auto_release_after_ledger: u32 to EscrowRecord
  • Add trigger_auto_release(e, caller, escrow_id) to escrow.rs:
    • No auth check — anyone can call
    • Requires e.ledger().sequence() >= escrow.auto_release_after_ledger
    • Releases to beneficiary, emits ("auto_released", escrow_id, caller)
  • Expose in contract.rs, add tests

Files touched

  • src/escrow.rs
  • src/contract.rs
  • src/escrow_test.rs

PR requirement

  • Closes #[issue_id] — Timeframe: 48 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestescrowEscrow module

    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