Developers
Search…
⏯
PausableMap - Pausing Selected Functionalities
Extension of an OpenZeppelin's library

1. Introduction

The PausableMapUpgradeable (or PausableMap) contract is an abstract contract. It is inspired from OpenZeppelin's Pausable contract and can map a name to a paused state. It is actually a PausableMapUpgradeable contract as the StableMaster contract in which it is used is upgradeable. It was built to enable the protocol to prevent SLPs and new stable holders from coming in or out the protocol for a given collateral type.

2. Contract Details

Parameter

  • paused: Mapping between a name and a boolean representing the paused state. This mapping should be used to check whether a function is paused for name.

3. Key Mechanisms & Concepts

Utility Internal Functions

The following functions are internal functions, external governance functions need to be defined on top of it to be able to use it in the contract where PausableMap is imported.

_pause

1
function _pause(bytes32 name) internal;
Copied!
Triggers stopped state for name. The contract must not be paused for name.

_unpause

1
function _unpause(bytes32 name) internal;
Copied!
Returns to normal state for name. The contract must be paused for name.