Skip to content
Lattice

IPausable

Git Source

Title: IPausable

Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Pausable.sol)

Interface for the Pausable module, providing pause/unpause lifecycle control.

Functions

paused

Returns whether the contract is currently paused.

function paused() external view returns (bool);

Returns

NameTypeDescription
<none>boolbool True if the contract is paused, false otherwise.

pause

Pauses the contract, blocking operations guarded by whenNotPaused.

Requires the caller to hold the DEFAULT_ADMIN_ROLE.

function pause() external;

unpause

Unpauses the contract, resuming operations guarded by whenNotPaused.

Requires the caller to hold the DEFAULT_ADMIN_ROLE.

function unpause() external;

Events

Paused

Emitted when the contract is paused by account.

event Paused(address account);

Parameters

NameTypeDescription
accountaddressThe address that triggered the pause.

Unpaused

Emitted when the contract is unpaused by account.

event Unpaused(address account);

Parameters

NameTypeDescription
accountaddressThe address that triggered the unpause.

Errors

EnforcedPause

Thrown when an action is attempted while the contract is paused.

error EnforcedPause();

ExpectedPause

Thrown when an action requires the contract to be paused but it is not.

error ExpectedPause();