Skip to content

[Contracts] Emit missing events on state-changing functions in agent_registry and escrow #96

Description

@david87131

Why this matters

Off-chain indexers cannot track several state changes. agent_registry::complete_transaction flips completed to true and increments completed_agreements but emits no event, and no TransactionCompleted event type exists. In escrow, fund_escrow, the full-release branch of approve_release, and resolve_dispute move funds but emit no event, while only timeout/partial/deduction paths emit. Every fund movement and status change should emit an event.

Acceptance criteria

  • complete_transaction emits a new TransactionCompleted event with relevant fields
  • escrow emits events on funding, full release, and dispute resolution (refund vs release distinguished)
  • Event field naming is consistent with existing events in each contract
  • Tests assert the new events are published

Files to touch

  • contracts/agent_registry/src/agent.rs
  • contracts/agent_registry/src/events.rs
  • contracts/escrow/src/escrow_impl.rs
  • contracts/escrow/src/events.rs

Out of scope

  • Standardizing event topics across all contracts
  • Event schema doc

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions