feat: allow proposed issuer to reject pending transfer#402
Open
Topmatrixmor2014 wants to merge 1 commit into
Open
feat: allow proposed issuer to reject pending transfer#402Topmatrixmor2014 wants to merge 1 commit into
Topmatrixmor2014 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#363 Add reject_issuer_transfer so the proposed new_issuer can explicitly decline a pending transfer
Repo Avatar
RevoraOrg/Revora-Contracts
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
cargo test
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
closes #363