Description
The current blacklist halts claims and transfers, but does not preserve a holder-level reason code distinct from compliance vs sanctions. Add emergency_freeze_holder(offering_id, holder, reason: FreezeReason) that surfaces a richer event distinct from bl_add.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
Revora-Contracts/src/lib.rs, Revora-Contracts/src/test_freeze_matrix.rs
- Freeze must be unfreezable only by issuer or admin with the matching reason
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/emergency-freeze-reason
- Implement changes
- Add
enum FreezeReason { Sanctions, CourtOrder, IssuerDispute, Manual }
- Persist freeze entries separately from blacklist
- Emit
frz_set, frz_clr events
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Unfreeze with mismatched reason must reject
FreezeReasonMismatch
- Include test output and security notes
Example commit message
feat: add emergency_freeze_holder with structured FreezeReason
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
The current blacklist halts claims and transfers, but does not preserve a holder-level reason code distinct from compliance vs sanctions. Add
emergency_freeze_holder(offering_id, holder, reason: FreezeReason)that surfaces a richer event distinct frombl_add.Requirements and context
Revora-Contracts/src/lib.rs,Revora-Contracts/src/test_freeze_matrix.rsSuggested execution
git checkout -b feat/emergency-freeze-reasonenum FreezeReason { Sanctions, CourtOrder, IssuerDispute, Manual }frz_set,frz_clreventsTest and commit
cargo test --allFreezeReasonMismatchExample commit message
feat: add emergency_freeze_holder with structured FreezeReasonGuidelines