-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Expand file tree
/
Copy pathERC6909Pausable.sol
More file actions
33 lines (30 loc) · 1.27 KB
/
ERC6909Pausable.sol
File metadata and controls
33 lines (30 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC6909/extensions/ERC6909Pausable.sol)
pragma solidity ^0.8.24;
import {ERC6909} from "../ERC6909.sol";
import {Pausable} from "../../../utils/Pausable.sol";
/**
* @dev ERC-6909 token with pausable token transfers, minting and burning.
*
* Useful for scenarios such as preventing trades until the end of an evaluation
* period, or having an emergency switch for freezing all token transfers in the
* event of a large bug.
*
* IMPORTANT: This contract does not include public pause and unpause functions. In
* addition to inheriting this contract, you must define both functions, invoking the
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
* make the contract pause mechanism of the contract unreachable, and thus unusable.
*/
abstract contract ERC6909Pausable is ERC6909, Pausable {
/**
* @dev See {ERC6909-_update}.
*
* Requirements:
*
* - the contract must not be paused.
*/
function _update(address from, address to, uint256 ids, uint256 values) internal virtual override whenNotPaused {
super._update(from, to, ids, values);
}
}