Description
Holders and their accountants need a year-end summary broken down by tax bucket. Expose get_holder_tax_year(offering_id, holder, year) returning the totals per bucket.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/lib.rs
- Statement must be deterministic across reruns
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/tax-year-statement
- Implement changes
- Define fiscal-year boundaries as configurable per offering
- Walk emitted
tax_bucket events and aggregate
- Return structured record with ordinary, capital, and return-of-capital totals
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Year boundary at exact epoch second and multi-year holder
- Include test output and security notes
Example commit message
feat: add per-holder tax-year statement
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Holders and their accountants need a year-end summary broken down by tax bucket. Expose
get_holder_tax_year(offering_id, holder, year)returning the totals per bucket.Requirements and context
src/lib.rsSuggested execution
git checkout -b feat/tax-year-statementtax_bucketevents and aggregateTest and commit
cargo test --allExample commit message
feat: add per-holder tax-year statementGuidelines