Skip to main content

PauseManager

PAUSE_ALL_ROLE

bytes32 PAUSE_ALL_ROLE

This is used to pause all pausable functions.

UNPAUSE_ALL_ROLE

bytes32 UNPAUSE_ALL_ROLE

This is used to unpause all unpausable functions.

pauseTypeStatuses

mapping(bytes32 => bool) pauseTypeStatuses

whenTypeAndGeneralNotPaused

modifier whenTypeAndGeneralNotPaused(enum IPauseManager.PauseType _pauseType)

Modifier to make a function callable only when the specific and general types are not paused.

Parameters

NameTypeDescription
_pauseTypeenum IPauseManager.PauseTypeThe pause type value being checked. Requirements: - The type must not be paused.

whenTypeNotPaused

modifier whenTypeNotPaused(enum IPauseManager.PauseType _pauseType)

Modifier to make a function callable only when the type is not paused.

Parameters

NameTypeDescription
_pauseTypeenum IPauseManager.PauseTypeThe pause type value being checked. Requirements: - The type must not be paused.

__PauseManager_init

function __PauseManager_init(struct IPauseManager.PauseTypeRole[] _pauseTypeRoleAssignments, struct IPauseManager.PauseTypeRole[] _unpauseTypeRoleAssignments) internal

Initializes the pause manager with the given pause and unpause roles.

This function is called during contract initialization to set up the pause and unpause roles.

Parameters

NameTypeDescription
_pauseTypeRoleAssignmentsstruct IPauseManager.PauseTypeRole[]An array of PauseTypeRole structs defining the pause types and their associated roles.
_unpauseTypeRoleAssignmentsstruct IPauseManager.PauseTypeRole[]An array of PauseTypeRole structs defining the unpause types and their associated roles.

_requireTypeAndGeneralNotPaused

function _requireTypeAndGeneralNotPaused(enum IPauseManager.PauseType _pauseType) internal view virtual

Throws if the specific or general types are paused. Checks the specific and general pause types.

Parameters

NameTypeDescription
_pauseTypeenum IPauseManager.PauseTypeThe pause type value being checked.

_requireTypeNotPaused

function _requireTypeNotPaused(enum IPauseManager.PauseType _pauseType) internal view virtual

Throws if the type is paused. Checks the specific pause type.

Parameters

NameTypeDescription
_pauseTypeenum IPauseManager.PauseTypeThe pause type value being checked.

pauseByType

function pauseByType(enum IPauseManager.PauseType _pauseType) external

Pauses functionality by specific type.

Requires the role mapped in _pauseTypeRoles for the pauseType.

Parameters

NameTypeDescription
_pauseTypeenum IPauseManager.PauseTypeThe pause type value.

unPauseByType

function unPauseByType(enum IPauseManager.PauseType _pauseType) external

Unpauses functionality by specific type.

Requires the role mapped in _unPauseTypeRoles for the pauseType.

Parameters

NameTypeDescription
_pauseTypeenum IPauseManager.PauseTypeThe pause type value.

isPaused

function isPaused(enum IPauseManager.PauseType _pauseType) public view returns (bool pauseTypeIsPaused)

Check if a pause type is enabled.

Parameters

NameTypeDescription
_pauseTypeenum IPauseManager.PauseTypeThe pause type value.

Return Values

NameTypeDescription
pauseTypeIsPausedboolReturns true if the pause type if paused, false otherwise.