Pattern: Pause & Freeze
Emergency controls — pause all transfers globally or freeze individual accounts
Overview
The Token Factory program provides two emergency mechanisms: global pause (stops all transfers) and individual freeze (locks a single account). These are independent of the hook system.
Global Pause
Pause all transfers for a token:
Individual Freeze
Freeze a specific token account:
Hook Kill Switches
Every hook also has a toggleActive(false) method that bypasses its checks:
When to Use What
| Scenario | Action |
|---|---|
| Regulatory halt on all transfers | pauseToken() |
| Suspicious single account | freezeAccount() |
| Temporarily disable KYC checks | allowlist.toggleActive(false) |
| Temporarily disable tax | tax.toggleActive(false) |
| Temporarily disable hold periods | hold.toggleActive(false) |
| Disable all hook checks at once | router.toggleActive(false) |