IPauser

Git Source

Inherits: ImTokenOperationTypes

Title: IPauser

Author: Merge Layers Inc.

Interface for pausing market operations

Functions

emergencyPauseMarket

Pauses all operations for a market

function emergencyPauseMarket(address _market) external;

Parameters

NameTypeDescription
_marketaddressthe mToken address

emergencyPauseMarketFor

Pauses a specific operation for a market

function emergencyPauseMarketFor(address _market, OperationType _pauseType) external;

Parameters

NameTypeDescription
_marketaddressthe mToken address
_pauseTypeOperationTypethe operation type

emergencyPauseAll

Pauses all operations for all registered markets

function emergencyPauseAll() external;

Events

PauseAll

Emitted when all markets are paused

event PauseAll();

MarketPaused

Emitted when a market is paused

event MarketPaused(address indexed market);

Parameters

NameTypeDescription
marketaddressThe paused market

MarketRemoved

Emitted when a market is removed

event MarketRemoved(address indexed market);

Parameters

NameTypeDescription
marketaddressThe market removed

MarketAdded

Emitted when a market is added

event MarketAdded(address indexed market, PausableType marketType);

Parameters

NameTypeDescription
marketaddressThe market added
marketTypePausableTypeThe market type

MarketPausedFor

Emitted when a specific operation is paused for a market

event MarketPausedFor(address indexed market, OperationType pauseType);

Parameters

NameTypeDescription
marketaddressThe market paused
pauseTypeOperationTypeThe operation type paused

Errors

Pauser_EntryNotFound

Error when entry is not found

error Pauser_EntryNotFound();

Pauser_NotAuthorized

Error when caller lacks authorization

error Pauser_NotAuthorized();

Pauser_AddressNotValid

Error when provided address is invalid

error Pauser_AddressNotValid();

Pauser_AlreadyRegistered

Error when market already registered

error Pauser_AlreadyRegistered();

Pauser_ContractNotEnabled

Error when contract is not enabled

error Pauser_ContractNotEnabled();

Structs

PausableContract

struct PausableContract {
    address market;
    PausableType contractType;
}

Enums

PausableType

enum PausableType {
    NonPausable,
    Host,
    Extension
}