ERC721Pausable.sol 476 B

12345678910111213141516
  1. pragma solidity ^0.6.0;
  2. import "./ERC721.sol";
  3. import "../../utils/Pausable.sol";
  4. /**
  5. * @title ERC721 Non-Fungible Pausable token
  6. * @dev ERC721 modified with pausable transfers.
  7. */
  8. contract ERC721Pausable is ERC721, Pausable {
  9. function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
  10. super._beforeTokenTransfer(from, to, tokenId);
  11. require(!paused(), "ERC721Pausable: token transfer while paused");
  12. }
  13. }