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
Name | Type | Description |
---|---|---|
_pauseType | enum IPauseManager.PauseType | The 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
Name | Type | Description |
---|---|---|
_pauseType | enum IPauseManager.PauseType | The 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
Name | Type | Description |
---|---|---|
_pauseTypeRoleAssignments | struct IPauseManager.PauseTypeRole[] | An array of PauseTypeRole structs defining the pause types and their associated roles. |
_unpauseTypeRoleAssignments | struct 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
Name | Type | Description |
---|---|---|
_pauseType | enum IPauseManager.PauseType | The 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
Name | Type | Description |
---|---|---|
_pauseType | enum IPauseManager.PauseType | The 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
Name | Type | Description |
---|---|---|
_pauseType | enum IPauseManager.PauseType | The 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
Name | Type | Description |
---|---|---|
_pauseType | enum IPauseManager.PauseType | The pause type value. |
isPaused
function isPaused(enum IPauseManager.PauseType _pauseType) public view returns (bool pauseTypeIsPaused)
Check if a pause type is enabled.
Parameters
Name | Type | Description |
---|---|---|
_pauseType | enum IPauseManager.PauseType | The pause type value. |
Return Values
Name | Type | Description |
---|---|---|
pauseTypeIsPaused | bool | Returns true if the pause type if paused, false otherwise. |