Description
accept_issuer_transfer enforces a hardcoded ISSUER_TRANSFER_EXPIRY_SECS of 7 days. Some governance flows need shorter or longer windows. Add an optional per-offering expiry override (bounded by a sane maximum) that propose_issuer_transfer records and accept_issuer_transfer honors.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/lib.rs (propose_issuer_transfer, accept_issuer_transfer, PendingTransfer, ISSUER_TRANSFER_EXPIRY_SECS)
- Default must remain 7 days when no override is provided
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/configurable-issuer-transfer-expiry
- Implement changes
- Add an optional
expiry_secs to propose_issuer_transfer or a separate setter
- Store the effective expiry in
PendingTransfer and use it in accept_issuer_transfer
- Clamp to
[MIN_EXPIRY, MAX_EXPIRY] bounds
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Accept at exactly expiry boundary, below minimum, above maximum, default path
- Include test output and security notes
Example commit message
feat: support configurable issuer transfer expiry
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
accept_issuer_transferenforces a hardcodedISSUER_TRANSFER_EXPIRY_SECSof 7 days. Some governance flows need shorter or longer windows. Add an optional per-offering expiry override (bounded by a sane maximum) thatpropose_issuer_transferrecords andaccept_issuer_transferhonors.Requirements and context
src/lib.rs(propose_issuer_transfer,accept_issuer_transfer,PendingTransfer,ISSUER_TRANSFER_EXPIRY_SECS)Suggested execution
git checkout -b feat/configurable-issuer-transfer-expiryexpiry_secstopropose_issuer_transferor a separate setterPendingTransferand use it inaccept_issuer_transfer[MIN_EXPIRY, MAX_EXPIRY]boundsTest and commit
cargo testExample commit message
feat: support configurable issuer transfer expiryGuidelines