Description
Emit a reg_limit_delta event on each holding change so indexers can rebuild aggregate cap usage per jurisdiction over time. Required for periodic Reg D and Reg S reporting.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/test_transfer_restrictions.rs, indexer/
- Event must include jurisdiction, delta, and new aggregate
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/reg-limit-event
- Implement changes
- Emit
reg_limit_delta on issuance and transfer
- Add indexer fixture
- Document field ordering
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Transfer between two holders in the same jurisdiction (no delta)
- Include test output and security notes
Example commit message
feat: emit reg_limit_delta events for jurisdiction caps
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Emit a
reg_limit_deltaevent on each holding change so indexers can rebuild aggregate cap usage per jurisdiction over time. Required for periodic Reg D and Reg S reporting.Requirements and context
src/test_transfer_restrictions.rs,indexer/Suggested execution
git checkout -b feat/reg-limit-eventreg_limit_deltaon issuance and transferTest and commit
cargo test --allExample commit message
feat: emit reg_limit_delta events for jurisdiction capsGuidelines