Description
Holders today must aggregate state across several view functions to reconcile. Add get_holder_statement(offering_id, holder) returning (shares_bps, total_accrued, total_claimed, vesting_pending, lockup_end) in a single structured response.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
Revora-Contracts/src/lib.rs
- Response struct must be additively versioned for future fields
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/holder-statement-view
- Implement changes
- Define
HolderStatementV1 { ... } and helper aggregator
- Read from existing storage without mutation
- Document field semantics in README integrator section
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Holder with zero shares must return a fully zeroed statement, not an error
- Include test output and security notes
Example commit message
feat: add get_holder_statement consolidated investor view
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Holders today must aggregate state across several view functions to reconcile. Add
get_holder_statement(offering_id, holder)returning(shares_bps, total_accrued, total_claimed, vesting_pending, lockup_end)in a single structured response.Requirements and context
Revora-Contracts/src/lib.rsSuggested execution
git checkout -b feat/holder-statement-viewHolderStatementV1 { ... }and helper aggregatorTest and commit
cargo test --allExample commit message
feat: add get_holder_statement consolidated investor viewGuidelines