IExternalPauseManagement
Asset Tokenization Studio Team
IExternalPauseManagement
Interface for managing external pause contracts on a security token. External pauses are trusted third-party contracts whose pause state propagates to the token: the token is considered paused when its own pause flag is set, or when any listed external pause contract returns true from its isPaused() call.
Part of the Diamond facet system. ROLE_PAUSE_MANAGER is required for all state-mutating functions after initialisation. The external pause list and its initialisation flag are stored in diamond storage at STORAGE_LOCATION_PAUSE_MANAGEMENT via ExternalListManagementStorageWrapper.
Methods
addExternalPause
function addExternalPause(address _pause) external nonpayable returns (bool success_)
Adds an external pause contract to the list.
Requires ROLE_PAUSE_MANAGER, the token to be unpaused, and a non-zero address. Reverts with ListedPause if the address is already listed. Emits AddedToExternalPauses.
Parameters
| Name | Type | Description |
|---|---|---|
| _pause | address | Address of the external pause contract to add. |
Returns
| Name | Type | Description |
|---|---|---|
| success_ | bool | True if the contract was added successfully. |
getExternalPausesCount
function getExternalPausesCount() external view returns (uint256 externalPausesCount_)
Returns the total number of external pause contracts in the list.
Returns
| Name | Type | Description |
|---|---|---|
| externalPausesCount_ | uint256 | The current number of listed external pause contracts. |
getExternalPausesMembers
function getExternalPausesMembers(uint256 _pageIndex, uint256 _pageLength) external view returns (address[] members_)
Returns a paginated slice of the external pause contract list.
_The list offset is computed as \_pageIndex _ \_pageLength. Returns an empty array when the offset meets or exceeds the list length.*
Parameters
| Name | Type | Description |
|---|---|---|
| _pageIndex | uint256 | Zero-based page index. |
| _pageLength | uint256 | Maximum number of addresses to return per page. |
Returns
| Name | Type | Description |
|---|---|---|
| members_ | address[] | Array of external pause contract addresses for the requested page. |
initializeExternalPauses
function initializeExternalPauses(address[] _pauses) external nonpayable
One-time initialiser that populates the external pause list at token deployment.
Can only be called once; subsequent calls revert via onlyFacetNotRegistered. The leading-underscore naming convention signals this is an initialiser function.
Parameters
| Name | Type | Description |
|---|---|---|
| _pauses | address[] | Initial array of external pause contract addresses to register. |
isExternalPause
function isExternalPause(address _pause) external view returns (bool)
Checks whether an address is present in the external pause list.
Parameters
| Name | Type | Description |
|---|---|---|
| _pause | address | Address to check. |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | True if the address is a listed external pause contract, false otherwise. |
removeExternalPause
function removeExternalPause(address _pause) external nonpayable returns (bool success_)
Removes an external pause contract from the list.
Requires ROLE_PAUSE_MANAGER and the token to be unpaused. Reverts with UnlistedPause if the address is not listed. Emits RemovedFromExternalPauses.
Parameters
| Name | Type | Description |
|---|---|---|
| _pause | address | Address of the external pause contract to remove. |
Returns
| Name | Type | Description |
|---|---|---|
| success_ | bool | True if the contract was removed successfully. |
updateExternalPauses
function updateExternalPauses(address[] _pauses, bool[] _actives) external nonpayable returns (bool success_)
Adds or removes multiple external pause contracts in a single transaction.
Requires ROLE_PAUSE_MANAGER and the token to be unpaused. Both arrays must have the same length and contain no duplicate addresses, validated by ArrayValidation.checkUniqueValues. Emits ExternalPausesUpdated.
Parameters
| Name | Type | Description |
|---|---|---|
| _pauses | address[] | Array of external pause contract addresses to process. |
| _actives | bool[] | Corresponding flags; true adds the address to the list, false removes it. |
Returns
| Name | Type | Description |
|---|---|---|
| success_ | bool | True if the batch update completed successfully. |
Events
AddedToExternalPauses
event AddedToExternalPauses(address indexed operator, address pause)
Emitted when an external pause contract is added to the list.
Parameters
| Name | Type | Description |
|---|---|---|
operator indexed | address | Address of the caller who performed the addition. |
| pause | address | Address of the external pause contract that was added. |
ExternalPauseInitialized
event ExternalPauseInitialized(address[] pauses)
Emitted once when the external pause capability is initialised on a token.
Fires exclusively from initializeExternalPauses after the storage write succeeds.
Parameters
| Name | Type | Description |
|---|---|---|
| pauses | address[] | The initial array of external pause contract addresses registered at deployment. |
ExternalPausesUpdated
event ExternalPausesUpdated(address indexed operator, address[] pauses, bool[] actives)
Emitted when multiple external pause addresses are added or removed in a single batch.
Parameters
| Name | Type | Description |
|---|---|---|
operator indexed | address | Address of the caller who performed the update. |
| pauses | address[] | Array of external pause contract addresses that were processed. |
| actives | bool[] | Corresponding activation flags; true means added, false means removed. |
RemovedFromExternalPauses
event RemovedFromExternalPauses(address indexed operator, address pause)
Emitted when an external pause contract is removed from the list.
Parameters
| Name | Type | Description |
|---|---|---|
operator indexed | address | Address of the caller who performed the removal. |
| pause | address | Address of the external pause contract that was removed. |
Errors
ListedPause
error ListedPause(address pause)
Thrown when attempting to add an address already present in the external pause list.
Parameters
| Name | Type | Description |
|---|---|---|
| pause | address | The duplicate external pause contract address. |
UnlistedPause
error UnlistedPause(address pause)
Thrown when attempting to remove an address not present in the external pause list.
Parameters
| Name | Type | Description |
|---|---|---|
| pause | address | The unlisted external pause contract address. |