Skip to content

feat(invoice-token): implement account freeze functionality (#98, #100, #105, #107) #365

Description

@chizzy192

Context & Goal

Issues #98, #100, #105, #107 collectively request account freeze/unfreeze in InvoiceToken. A frozen account must be rejected on all transfer, burn, and transfer_from operations via StorageKey::FrozenAccount(Address).

Work Required

  • storage.rs: add FrozenAccount(Address) and is_frozen/set_frozen helpers.
  • lib.rs: add set_frozen(address, frozen) (admin-only). Add frozen check to transfer, transfer_from, burn, burn_from.
  • errors.rs: add AccountFrozen with unique discriminant.
  • Tests: freeze blocks transfer/burn, unfreeze restores, non-admin freeze rejection, frozen as recipient (succeeds).

Acceptance Criteria

  • Frozen accounts rejected on all transfer/burn paths.
  • Events emitted correctly.
  • cargo test -p invoice-token passes with no regressions. PR targets dev.

Target Branch: dev
Estimated Effort: 5–12 hours | Delivery: 3–5 days

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions