Add get_check_in_timestamp read-only accessor for milestone check-in time in accountability_vault
Description
check_in in contracts/accountability_vault/src/lib.rs stores DataKey::CheckIn(index) -> timestamp but no public accessor exposes it. The backend ETL (src/services/etlWorker.ts) currently has no way to read the recorded check-in time without scanning events. Add a get_check_in_timestamp(index: u32) -> Option<u64> returning the stored value or None if not yet checked in.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Add
get_check_in_timestamp to contracts/accountability_vault/src/lib.rs
- Return
Option<u64> keyed by DataKey::CheckIn(index)
- Add read tests in
contracts/accountability_vault/src/test.rs
- Document the function in
contracts/README.md
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/get-check-in-timestamp
- Implement changes
- Modify
contracts/accountability_vault/src/lib.rs
- Add tests in
contracts/accountability_vault/src/test.rs
- Update
contracts/README.md
- Add index bounds check
- Test and commit
- Run tests, cover edge cases
- Include test output and notes
Example commit message
feat: add get_check_in_timestamp read accessor
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Add get_check_in_timestamp read-only accessor for milestone check-in time in accountability_vault
Description
check_inincontracts/accountability_vault/src/lib.rsstoresDataKey::CheckIn(index) -> timestampbut no public accessor exposes it. The backend ETL (src/services/etlWorker.ts) currently has no way to read the recorded check-in time without scanning events. Add aget_check_in_timestamp(index: u32) -> Option<u64>returning the stored value orNoneif not yet checked in.Requirements and context
get_check_in_timestamptocontracts/accountability_vault/src/lib.rsOption<u64>keyed byDataKey::CheckIn(index)contracts/accountability_vault/src/test.rscontracts/README.mdSuggested execution
git checkout -b feat/get-check-in-timestampcontracts/accountability_vault/src/lib.rscontracts/accountability_vault/src/test.rscontracts/README.mdExample commit message
feat: add get_check_in_timestamp read accessorGuidelines