Skip to main content

IPause

Asset Tokenization Studio Team

IPause

Interface for pausing and unpausing a security token. When paused, all transfer-related operations are blocked. The effective pause state is the logical OR of the token's own pause flag and the pause state of any registered external pause contracts.

Part of the Diamond facet system. Pause state is stored via PauseStorageWrapper. ROLE_PAUSER is required for pause and unpause. isPaused consults both the internal flag and every external pause contract registered via ExternalPauseManagementFacet; any single paused source makes the whole token paused. Clearing the internal flag with unpause does not override active external pauses.

Methods​

initializePause​

function initializePause() external nonpayable

Initialises the pause capability on the token.

Callable once; subsequent calls revert with FacetAlreadyRegistered. Requires DEFAULT_ADMIN_ROLE. Called by the factory during deployment.

pause​

function pause() external nonpayable returns (bool success_)

Sets the token's internal pause flag, blocking all guarded operations.

Requires ROLE_PAUSER and the token to be currently unpaused. Reverts with IsPaused if the token is already paused. Emits Paused.

Returns​

NameTypeDescription
success_boolTrue if the token was successfully paused.

paused​

function paused() external view returns (bool)

Checks whether the token is currently paused.

Returns true if the token's own pause flag is set, or if any registered external pause contract returns true from its isPaused() call (OR semantics). created to be compatible with ERC3643

Returns​

NameTypeDescription
_0boolTrue if the token is paused by any source, false otherwise.

unpause​

function unpause() external nonpayable returns (bool success_)

Clears the token's internal pause flag, restoring guarded operations.

Requires ROLE_PAUSER and the token's internal flag to be set. Reverts with IsUnpaused if the internal flag is already cleared. Emits Unpaused. Note: if any external pause contract remains paused, isPaused will still return true after this call.

Returns​

NameTypeDescription
success_boolTrue if the internal pause flag was successfully cleared.

Events​

PauseInitialized​

event PauseInitialized()

Emitted once when the pause capability is initialised on a token.

Fires exclusively from initializePause.

Paused​

event Paused(address indexed operator)

Emitted when the token's internal pause flag is set to true.

Parameters​

NameTypeDescription
operator indexedaddressAddress of the caller who triggered the pause.

Unpaused​

event Unpaused(address indexed operator)

Emitted when the token's internal pause flag is cleared to false.

Parameters​

NameTypeDescription
operator indexedaddressAddress of the caller who triggered the unpause.

Errors​

IsPaused​

error IsPaused()

Thrown when an operation that requires the token to be unpaused is attempted while the token is paused (own flag or any external pause contract).

IsUnpaused​

error IsUnpaused()

Thrown when unpause is called while the token's internal pause flag is already cleared.