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]
Description
The
release_escrowentrypoint transitions an invoice fromPaidtoReleasedand callsevents::escrow_released, but the event payload currently mirrors the full Invoice struct. Define a dedicatedEscrowReleasedEventtype with only the fields consumers need:id,merchant,amount_usdc, andreleased_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:
Implement changes in
contracts/invoice/src/events.rs:EscrowReleasedEventstruct with#[contracttype]escrow_releasedto publish the new payloadTest and commit
Guidelines
Assignment required before starting. PR description must include:
Closes #[issue_id]