You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
834 B
29 lines
834 B
5 years ago
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
4 years ago
|
pragma solidity ^0.8.0;
|
||
7 years ago
|
|
||
4 years ago
|
import "../ERC721.sol";
|
||
|
import "../../../security/Pausable.sol";
|
||
7 years ago
|
|
||
|
/**
|
||
5 years ago
|
* @dev ERC721 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.
|
||
6 years ago
|
*/
|
||
5 years ago
|
abstract contract ERC721Pausable is ERC721, Pausable {
|
||
5 years ago
|
/**
|
||
|
* @dev See {ERC721-_beforeTokenTransfer}.
|
||
|
*
|
||
|
* Requirements:
|
||
|
*
|
||
|
* - the contract must not be paused.
|
||
|
*/
|
||
5 years ago
|
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
|
||
|
super._beforeTokenTransfer(from, to, tokenId);
|
||
7 years ago
|
|
||
5 years ago
|
require(!paused(), "ERC721Pausable: token transfer while paused");
|
||
6 years ago
|
}
|
||
7 years ago
|
}
|