Pauser
Inherits: Ownable, IPauser
State Variables
roles
IRoles public immutable roles;
operator
IOperator public immutable operator;
pausableContracts
PausableContract[] public pausableContracts;
registeredContracts
mapping(address _contract => bool _registered) public registeredContracts;
contractTypes
mapping(address _contract => PausableType _type) public contractTypes;
Functions
constructor
constructor(address _roles, address _operator, address _owner) Ownable(_owner);
addPausableMarket
add pauable contract
function addPausableMarket(address _contract, PausableType _contractType) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_contract | address | the pausable contract |
_contractType | PausableType | the pausable contract type |
removePausableMarket
removes pauable contract
function removePausableMarket(address _contract) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_contract | address | the pausable contract |
emergencyPauseMarket
pauses all operations for a market
function emergencyPauseMarket(address _market) external;
Parameters
Name | Type | Description |
---|---|---|
_market | address | the mToken address |
emergencyPauseMarketFor
pauses a specific operation for a market
function emergencyPauseMarketFor(address _market, ImTokenOperationTypes.OperationType _pauseType) external;
Parameters
Name | Type | Description |
---|---|---|
_market | address | the mToken address |
_pauseType | ImTokenOperationTypes.OperationType | the operation type |
emergencyPauseAll
pauses all operations for all registered markets
function emergencyPauseAll() external;
_pauseAllMarketOperations
function _pauseAllMarketOperations(address _market) private;
_pauseMarketOperation
function _pauseMarketOperation(address _market, ImTokenOperationTypes.OperationType _pauseType) private;
_pause
function _pause(address _market, ImTokenOperationTypes.OperationType _pauseType) private;
_findIndex
function _findIndex(address _address) private view returns (uint256);