# `IPauseManager`

### PauseTypeRole

```solidity
struct PauseTypeRole {
  enum IPauseManager.PauseType pauseType;
  bytes32 role;
}
```

### PauseType

```solidity
enum PauseType {
  UNUSED,
  GENERAL,
  L1_L2,
  L2_L1,
  BLOB_SUBMISSION,
  CALLDATA_SUBMISSION,
  FINALIZATION,
  INITIATE_TOKEN_BRIDGING,
  COMPLETE_TOKEN_BRIDGING
}
```

### Paused

```solidity
event Paused(address messageSender, enum IPauseManager.PauseType pauseType)
```

Emitted when a pause type is paused.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| messageSender | address | The address performing the pause. |
| pauseType | enum IPauseManager.PauseType | The indexed pause type that was paused. |

### UnPaused

```solidity
event UnPaused(address messageSender, enum IPauseManager.PauseType pauseType)
```

Emitted when a pause type is unpaused.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| messageSender | address | The address performing the unpause. |
| pauseType | enum IPauseManager.PauseType | The indexed pause type that was unpaused. |

### UnPausedDueToExpiry

```solidity
event UnPausedDueToExpiry(enum IPauseManager.PauseType pauseType)
```

Emitted when a pause type is unpaused due to pause expiry passing.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| pauseType | enum IPauseManager.PauseType | The pause type that was unpaused. |

### PauseTypeRoleSet

```solidity
event PauseTypeRoleSet(enum IPauseManager.PauseType pauseType, bytes32 role)
```

Emitted when a pause type and its associated role are set in the `_pauseTypeRoles` mapping.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| pauseType | enum IPauseManager.PauseType | The indexed type of pause. |
| role | bytes32 | The indexed role associated with the pause type. |

### PauseTypeRoleUpdated

```solidity
event PauseTypeRoleUpdated(enum IPauseManager.PauseType pauseType, bytes32 role, bytes32 previousRole)
```

Emitted when a pause type and its associated role are updated in the `_PauseTypeRoles` mapping.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| pauseType | enum IPauseManager.PauseType | The indexed type of pause. |
| role | bytes32 | The indexed role associated with the pause type. |
| previousRole | bytes32 | The indexed previously found role associated with the pause type. |

### UnPauseTypeRoleSet

```solidity
event UnPauseTypeRoleSet(enum IPauseManager.PauseType unPauseType, bytes32 role)
```

Emitted when an unpause type and its associated role are set in the `_unPauseTypeRoles` mapping.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| unPauseType | enum IPauseManager.PauseType | The indexed type of unpause. |
| role | bytes32 | The indexed role associated with the unpause type. |

### UnPauseTypeRoleUpdated

```solidity
event UnPauseTypeRoleUpdated(enum IPauseManager.PauseType unPauseType, bytes32 role, bytes32 previousRole)
```

Emitted when an unpause type and its associated role are updated in the `_unPauseTypeRoles` mapping.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| unPauseType | enum IPauseManager.PauseType | The indexed type of unpause. |
| role | bytes32 | The indexed role associated with the unpause type. |
| previousRole | bytes32 | The indexed previously found role associated with the unpause type. |

### IsPaused

```solidity
error IsPaused(enum IPauseManager.PauseType pauseType)
```

_Thrown when a specific pause type is paused._

### PauseNotExpired

```solidity
error PauseNotExpired(uint256 expiryEnd)
```

_Thrown when unpauseDueToExpiry is attempted before a pause has expired._

### IsNotPaused

```solidity
error IsNotPaused(enum IPauseManager.PauseType pauseType)
```

_Thrown when a specific pause type is not paused and expected to be._

### PauseUnavailableDueToCooldown

```solidity
error PauseUnavailableDueToCooldown(uint256 cooldownEnd)
```

_Thrown when pausing is attempted during the cooldown period by a non-SECURITY_COUNCIL_ROLE._

### PauseTypeNotUsed

```solidity
error PauseTypeNotUsed()
```

_Thrown when the unused paused type is used._

### RolesNotDifferent

```solidity
error RolesNotDifferent()
```

_Thrown when trying to update a pause/unpause type role mapping to the existing role._

### pauseByType

```solidity
function pauseByType(enum IPauseManager.PauseType _pauseType) external
```

Pauses functionality by specific type.

_Throws if UNUSED pause type is used.
Requires the role mapped in `_pauseTypeRoles` for the pauseType.
Non-SECURITY_COUNCIL_ROLE can only pause after cooldown has passed.
SECURITY_COUNCIL_ROLE can pause without cooldown or expiry restrictions._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| _pauseType | enum IPauseManager.PauseType | The pause type value. |

### unPauseByType

```solidity
function unPauseByType(enum IPauseManager.PauseType _pauseType) external
```

Unpauses functionality by specific type.

_Throws if UNUSED pause type is used.
Requires the role mapped in `_unPauseTypeRoles` for the pauseType.
SECURITY_COUNCIL_ROLE unpause will reset the cooldown, enabling non-SECURITY_COUNCIL_ROLE pausing._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| _pauseType | enum IPauseManager.PauseType | The pause type value. |

### unPauseByExpiredType

```solidity
function unPauseByExpiredType(enum IPauseManager.PauseType _pauseType) external
```

Unpauses a specific pause type when the pause has expired.

_Can be called by anyone.
Throws if UNUSED pause type is used, or the pause expiry period has not passed._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| _pauseType | enum IPauseManager.PauseType | The pause type value. |

### isPaused

```solidity
function isPaused(enum IPauseManager.PauseType _pauseType) external 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. |

### updatePauseTypeRole

```solidity
function updatePauseTypeRole(enum IPauseManager.PauseType _pauseType, bytes32 _newRole) external
```

Update the pause type role mapping.

_Throws if UNUSED pause type is used.
Throws if role not different.
SECURITY_COUNCIL_ROLE role is required to execute this function._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| _pauseType | enum IPauseManager.PauseType | The pause type value to update. |
| _newRole | bytes32 | The role to update to. |

### updateUnpauseTypeRole

```solidity
function updateUnpauseTypeRole(enum IPauseManager.PauseType _pauseType, bytes32 _newRole) external
```

Update the unpause type role mapping.

_Throws if UNUSED pause type is used.
Throws if role not different.
SECURITY_COUNCIL_ROLE role is required to execute this function._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| _pauseType | enum IPauseManager.PauseType | The pause type value to update. |
| _newRole | bytes32 | The role to update to. |

