access-control:set-target-closed
Close or reopen a contract managed by an AccessManager. While closed, all calls to its restricted functions revert.
Syntax
Section titled “Syntax”access-control:set-target-closed <manager> <target> <closed>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
manager |
address |
AccessManager address |
target |
address |
Managed contract address |
closed |
bool |
true to close, false to reopen |
Examples
Section titled “Examples”load access-control
set $manager 0xc0dbDcA66a0636236fAbe1B3C16B1bD4C84bB1E1set $token 0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb
# Emergency-stop every restricted function of the managed tokenaccess-control:set-target-closed $manager $token true
# Reopen itaccess-control:set-target-closed $manager $token false- While closed, all restricted calls to the target revert regardless of roles — including for admins.
See Also
Section titled “See Also”- access-control:set-target-function-role — per-function roles