Pausable
Inherits: IPausable
Title: Pausable
Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Pausable.sol)
Thin Diamond facet that exposes pause/unpause lifecycle control.
All logic lives in PausableLib. This contract is stateless and forwards every call to the
library. Inherit this in a Diamond facet to add pausability, and guard functions with the
whenNotPaused/whenPaused modifiers (facets that must not re-expose this facade's selectors
call PausableLib.checkNotPaused()/checkPaused() directly instead).
Notes:
- lattice-version: 0.1.0
- lattice-source: OpenZeppelin v5.1.0
Functions
whenNotPaused
Guards a function so it can only run while NOT paused.
modifier whenNotPaused() virtual;whenPaused
Guards a function so it can only run while paused.
modifier whenPaused() virtual;paused
Returns whether the contract is currently paused.
function paused() public view virtual returns (bool);Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool | bool 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() public virtual;unpause
Unpauses the contract, resuming operations guarded by whenNotPaused.
Requires the caller to hold the DEFAULT_ADMIN_ROLE.
function unpause() public virtual;exportSelectors
ERC-8153 selector export: this facet's cuttable selectors, tightly packed (4 bytes each).
Excludes exportSelectors() itself (0x0ef22643) - it is never cut into a diamond. Order matches
forge inspect Pausable methodIdentifiers (alphabetical by signature); kept in exact parity by
ExportSelectorsParityTest. Chunks:
pause() 0x8456cb59
paused() 0x5c975abb
unpause() 0x3f4ba83a
function exportSelectors() external pure virtual returns (bytes memory selectors);Returns
| Name | Type | Description |
|---|---|---|
| selectors | bytes |