Skip to content

Pausable

Description

Allows an inheriting contract to be paused and resumed, providing a modifier that will allow modified functions to operate only if the contract is not paused.

Source: contracts/Pausable.sol

Variables

lastPauseTime

Source

The UNIX timestamp in seconds at which the contract was last paused.

Type: uint256

paused

Source

Type: bool

Constructor

constructor

Source

The owner this constructor initialises has the exclusive right to pause the contract. The contract begins unpaused.

Details

Signature

constructor()

Visibility

internal

State Mutability

``

Requires

Restricted Functions

setPaused

Source

Pauses or unpauses the contract. Sets lastPauseTime to the current timestamp if the contract is newly paused.

Details

Signature

setPaused(bool _paused)

Visibility

external

State Mutability

``

Modifiers

Emits

Modifiers

notPaused

Source

Reverts the transaction the contract is paused. Provided for use by inheriting contracts.

Events

PauseChanged

Source

The contract has gone from paused to unpaused or vice versa. This event reports the new state.

Signature: PauseChanged(bool isPaused)