π Description
src/lib.rs publishes vault_created, milestone_validated, funds_released,
funds_redirected, and vault_cancelled, but the topic/data layout is
inconsistent β some carry the full ProductivityVault, some carry only the
amount, some carry (). Indexers consuming these (see the event-monitoring
section of src/doc.md) need a stable, predictable schema.
This issue standardizes event topics and data into a documented, indexable shape.
Goal: give every lifecycle event a consistent topic tuple and a typed data
payload, then document the schema for off-chain consumers.
π― Requirements and Context
- Must be tested and documented.
- Each event topic should be
(event_name, vault_id, creator) so indexers can
filter by creator without decoding data.
- Data payloads should be typed structs/tuples (amount, destination, status).
- Keep event names backward-compatible where possible; document any change.
- Verify emission via
env.events() assertions, not just snapshots.
π οΈ Suggested Execution
1. Fork the repo and create a branch
git checkout -b feature/structured-events
2. Implement changes
- Contract: update every
env.events().publish(...) call in src/lib.rs to the
standardized topic/data shape.
- Tests: add
tests/events.rs asserting topics and decoded data for each
transition using env.events().all().
- Docs: rewrite the event-monitoring section of
src/doc.md and add
docs/EVENTS.md with the full schema table.
- Add NatSpec-style
/// comments documenting each emitted event.
3. Test and commit
- Run
cargo test.
- Cover edge cases: events for create, validate, release (validated + deadline),
redirect, cancel; assert vault_id and creator topics on each.
Example commit message
feat: standardized indexed lifecycle events with schema docs and tests
β
Guidelines
- Minimum 95% test coverage on new/changed event paths.
- Clear documentation of the event schema for indexers.
- No regressions on existing event names where preserved.
- Timeframe: 96 hours.
π·οΈ Labels
type-enhancement Β· area-contracts Β· type-documentation Β·
MAYBE REWARDED Β· GRANTFOX OSS Β· OFFICIAL CAMPAIGN
π¬ Community & Support
- Join the Disciplr contributor Discord to coordinate, ask questions, and get
unblocked fast: https://discord.gg/xvNAvMJf
- Please introduce yourself before you start so we can avoid duplicate work,
pair you with a reviewer, and merge your PR quickly.
π Description
src/lib.rspublishesvault_created,milestone_validated,funds_released,funds_redirected, andvault_cancelled, but the topic/data layout isinconsistent β some carry the full
ProductivityVault, some carry only theamount, some carry
(). Indexers consuming these (see the event-monitoringsection of
src/doc.md) need a stable, predictable schema.This issue standardizes event topics and data into a documented, indexable shape.
π― Requirements and Context
(event_name, vault_id, creator)so indexers canfilter by creator without decoding data.
env.events()assertions, not just snapshots.π οΈ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
env.events().publish(...)call insrc/lib.rsto thestandardized topic/data shape.
tests/events.rsasserting topics and decoded data for eachtransition using
env.events().all().src/doc.mdand adddocs/EVENTS.mdwith the full schema table.///comments documenting each emitted event.3. Test and commit
cargo test.redirect, cancel; assert
vault_idandcreatortopics on each.Example commit message
β Guidelines
π·οΈ Labels
type-enhancementΒ·area-contractsΒ·type-documentationΒ·MAYBE REWARDEDΒ·GRANTFOX OSSΒ·OFFICIAL CAMPAIGNπ¬ Community & Support
unblocked fast: https://discord.gg/xvNAvMJf
pair you with a reviewer, and merge your PR quickly.