Skip to content

Add freeze blacklist module and integrate token freeze guards#198

Open
GazzyLee wants to merge 1 commit into
BCPathway:mainfrom
GazzyLee:feature/freeze-blacklist
Open

Add freeze blacklist module and integrate token freeze guards#198
GazzyLee wants to merge 1 commit into
BCPathway:mainfrom
GazzyLee:feature/freeze-blacklist

Conversation

@GazzyLee
Copy link
Copy Markdown

Summary

Add freeze functionality to bc-forge token contracts so admins can freeze individual addresses or pause all token transfers independently of the existing pause mechanism.

What changed

  • Added new crate: contracts/freeze/

    • freeze_address(address)
    • unfreeze_address(address)
    • is_frozen(address) -> bool
    • freeze_all(), unfreeze_all(), is_all_frozen()
    • Persistent storage via FreezeKey::Address(Address) and FreezeKey::All
    • Emitted freeze-related events
  • Updated token contract in contracts/token/src/lib.rs

    • Integrated bc-forge-freeze
    • Added TokenError::ContractFrozen and TokenError::AddressFrozen
    • Added ensure_not_frozen() guard
    • Applied freeze checks to:
      • mint
      • batch_mint
      • transfer
      • transfer_from
      • batch_transfer
    • Added on-chain methods:
      • freeze_address
      • unfreeze_address
      • freeze_all
      • unfreeze_all
      • is_frozen
  • Updated SDK in sdk/src/client.ts

    • Added client methods:
      • freezeAddress()
      • unfreezeAddress()
      • isFrozen()
  • Fixed workspace compile issue in contracts/admin/src/lib.rs

Validation

  • cargo check -p bc-forge-freeze -p bc-forge-token completed successfully

Closes #165

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@GazzyLee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement token freezing — per-address and global freeze capabilities

1 participant