Overview
Off-chain indexers and frontend real-time updates depend on contract events. Currently the contract emits no structured events — it's impossible to reliably stream escrow state changes.
Events to add
| Event |
Trigger |
| `EscrowCreated { escrow_id, depositor, total_amount, token }` |
`create_escrow` |
| `WorkStarted { escrow_id, freelancer }` |
`start_work` |
| `MilestoneSubmitted { escrow_id, index }` |
`submit_milestone` |
| `MilestoneApproved { escrow_id, index, amount_released }` |
`approve_milestone` |
| `MilestoneRejected { escrow_id, index, reason }` |
`reject_milestone` |
| `DisputeRaised { escrow_id, index, raised_by }` |
dispute path |
| `DisputeResolved { escrow_id, index, freelancer_amount }` |
admin resolve |
| `EscrowCompleted { escrow_id }` |
final approval |
| `EscrowRefunded { escrow_id, amount }` |
refund paths |
| `FreelancerRated { escrow_id, rating }` |
`rate_freelancer` |
Acceptance criteria
Good first issue: Start with just `EscrowCreated` and open a draft PR.
Overview
Off-chain indexers and frontend real-time updates depend on contract events. Currently the contract emits no structured events — it's impossible to reliably stream escrow state changes.
Events to add
Acceptance criteria
Good first issue: Start with just `EscrowCreated` and open a draft PR.