Description
Indexers need a stable per-holder per-bucket event topic to reconstruct tax lots off-chain. Emit tax_lot events with holder, bucket, amount, period_id, and timestamp.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
indexer/, src/test_indexer_fixtures.rs
- Event topic must be versioned and documented
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/tax-lot-export-event
- Implement changes
- Add
tax_lot_v1 topic emitted on each tax-bucket update
- Add indexer fixture and topic registry entry
- Document field order and encoding
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Empty period emits zero events and burst period emits N events
- Include test output and security notes
Example commit message
feat: emit tax_lot_v1 event for tax-lot reconstruction
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Indexers need a stable per-holder per-bucket event topic to reconstruct tax lots off-chain. Emit
tax_lotevents with holder, bucket, amount, period_id, and timestamp.Requirements and context
indexer/,src/test_indexer_fixtures.rsSuggested execution
git checkout -b feat/tax-lot-export-eventtax_lot_v1topic emitted on each tax-bucket updateTest and commit
cargo test --allExample commit message
feat: emit tax_lot_v1 event for tax-lot reconstructionGuidelines