Skip to content

feat(invoice): emit structured event for escrow release #3

Description

Description

The release_escrow entrypoint transitions an invoice from Paid to Released and calls events::escrow_released, but the event payload currently mirrors the full Invoice struct. Define a dedicated EscrowReleasedEvent type with only the fields consumers need: id, merchant, amount_usdc, and released_at.

Requirements and context

Leaner event payloads reduce Soroban event storage costs and make it easier for indexers in the COMEBACKHERE/ frontend repo to deserialize events without importing the full contract types.

Suggested execution

Fork the repo and create a branch:

git checkout -b feature/invoice-escrow-released-event

Implement changes in contracts/invoice/src/events.rs:

  • Define EscrowReleasedEvent struct with #[contracttype]
  • Update escrow_released to publish the new payload
  • Update ABI snapshot per README instructions

Test and commit

feat(invoice): emit EscrowReleasedEvent with minimal payload on release_escrow

Guidelines

Assignment required before starting. PR description must include: Closes #[issue_id]

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

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