Description:
Event topics and payloads are ad hoc tuples that differ between contracts, and some state changes emit nothing. Introduce a versioned envelope (topic ("vortex", contract, event_name, v1)), migrate every event, and add a test asserting that every storage-mutating entrypoint emits at least one event.
Problem Statement & Context:
Indexers, monitors, and the solver bots reconstruct state from events (#107, #217). Silent mutations and unversioned payloads break them on every upgrade.
Scope & Acceptance Criteria:
- A shared event helper in
vortex-common.
- All four contracts migrated, and
docs/event-schema.md regenerated.
- A completeness test that wraps each mutating entrypoint and asserts
env.events().all() grew.
- The reference indexer's expectations updated. A test fixture in Rust is enough, because this is contract-only.
- Out of scope: indexer code changes.
Implementation Guidelines:
- Key Files/Modules: all
src/lib.rs, docs/event-schema.md, docs/113-event-topic-naming-conventions.md.
- Design/Architecture: Topic ordering must support filtering by contract and event name.
- Edge Cases/Constraints: Event size limits, and backward compatibility during a transition period (dual-emit behind a flag, or document the break).
- Testing: As described in the scope.
Definition of "Done":
- CI green, and the schema docs updated.
- Reviewed and approved.
Resources:
Complexity: High (200 points)
Description:
Event topics and payloads are ad hoc tuples that differ between contracts, and some state changes emit nothing. Introduce a versioned envelope (topic
("vortex", contract, event_name, v1)), migrate every event, and add a test asserting that every storage-mutating entrypoint emits at least one event.Problem Statement & Context:
Indexers, monitors, and the solver bots reconstruct state from events (#107, #217). Silent mutations and unversioned payloads break them on every upgrade.
Scope & Acceptance Criteria:
vortex-common.docs/event-schema.mdregenerated.env.events().all()grew.Implementation Guidelines:
src/lib.rs,docs/event-schema.md,docs/113-event-topic-naming-conventions.md.Definition of "Done":
Resources:
docs/113-event-topic-naming-conventions.md,docs/event-schema.mdComplexity: High (200 points)