Description
Some jurisdictions require a cooldown between successive share transfers by the same holder. Add set_transfer_cooldown(offering_id, jurisdiction, cooldown_secs) and enforce it in the transfer path.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/test_transfer_restrictions.rs, src/test_jurisdiction.rs
- Cooldown state must be persisted per (offering_id, holder)
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/transfer-cooldown
- Implement changes
- Persist last-transfer timestamp per holder
- Compare against jurisdiction-specific cooldown
- Reject early transfer with
TransferCooldownActive
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Include test output and security notes
Example commit message
feat: enforce per-jurisdiction transfer cooldown
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Some jurisdictions require a cooldown between successive share transfers by the same holder. Add
set_transfer_cooldown(offering_id, jurisdiction, cooldown_secs)and enforce it in the transfer path.Requirements and context
src/test_transfer_restrictions.rs,src/test_jurisdiction.rsSuggested execution
git checkout -b feat/transfer-cooldownTransferCooldownActiveTest and commit
cargo test --allExample commit message
feat: enforce per-jurisdiction transfer cooldownGuidelines