Skip to main content

IDeactivate

Asset Tokenization Studio Team

IDeactivate

Interface for the irreversible deactivation flag of a security token. Once a token is deactivated, every operation guarded by the onlyActivated modifier reverts with Deactivated, effectively retiring the token from active use.

Part of the Diamond facet system. Deactivation state is stored via DeactivateStorageWrapper under a dedicated storage slot. The transition active → deactivated is one-way: there is no companion reactivate selector. ROLE_DEACTIVATE is required to flip the flag.

Methods​

deactivate​

function deactivate() external nonpayable

Sets the token's deactivation flag, retiring the token irreversibly.

Requires ROLE_DEACTIVATE, the token to be currently unpaused, and the token to be currently activated. Reverts with AccountHasNoRole, IsPaused, or Deactivated respectively when those preconditions fail. The state change is one-way and cannot be undone.

initializeDeactivate​

function initializeDeactivate() external nonpayable

Initialises the deactivate capability on the token.

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

isDeactivated​

function isDeactivated() external view returns (bool)

Reports whether the token has been deactivated.

Returns​

NameTypeDescription
_0boolTrue if deactivate has previously been invoked, false otherwise.

Events​

DeactivateInitialized​

event DeactivateInitialized()

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

Fires exclusively from initializeDeactivate.

Errors​

Deactivated​

error Deactivated()

Thrown when an operation guarded by onlyActivated is attempted on a token whose deactivation flag has already been set.