Skip to content

Add admin emergency_freeze_holder gated by structured event for compliance halts #473

Description

@thlpkee20-wq

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
    • cargo test --all
  • 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

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions