Description
The two-step issuer transfer flow lets the old issuer cancel_issuer_transfer, but the proposed new_issuer can only decline passively (by never accepting until expiry). Add reject_issuer_transfer(new_issuer, namespace, token) so the proposed party can immediately and verifiably decline, freeing the offering for a new proposal and emitting an auditable event.
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, cancel_issuer_transfer, find_pending_transfer_for_new_issuer)
- Only the pending
new_issuer may reject; emit a dedicated event
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/reject-issuer-transfer
- Implement changes
- Reuse
find_pending_transfer_for_new_issuer to locate the offering
- Require
new_issuer.require_auth() and remove PendingIssuerTransfer
- Emit a new
iss_rej event with (old_issuer, new_issuer)
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Reject by wrong address, reject when no pending, re-propose after reject
- Include test output and security notes
Example commit message
feat: allow proposed issuer to reject pending transfer
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
The two-step issuer transfer flow lets the old issuer
cancel_issuer_transfer, but the proposednew_issuercan only decline passively (by never accepting until expiry). Addreject_issuer_transfer(new_issuer, namespace, token)so the proposed party can immediately and verifiably decline, freeing the offering for a new proposal and emitting an auditable event.Requirements and context
src/lib.rs(propose_issuer_transfer,accept_issuer_transfer,cancel_issuer_transfer,find_pending_transfer_for_new_issuer)new_issuermay reject; emit a dedicated eventSuggested execution
git checkout -b feat/reject-issuer-transferfind_pending_transfer_for_new_issuerto locate the offeringnew_issuer.require_auth()and removePendingIssuerTransferiss_rejevent with(old_issuer, new_issuer)Test and commit
cargo testExample commit message
feat: allow proposed issuer to reject pending transferGuidelines