ERC721PausableMock.sol 1018 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../token/ERC721/extensions/ERC721Pausable.sol";
  4. /**
  5. * @title ERC721PausableMock
  6. * This mock just provides a public mint, burn and exists functions for testing purposes
  7. */
  8. contract ERC721PausableMock is ERC721Pausable {
  9. constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
  10. function pause() external {
  11. _pause();
  12. }
  13. function unpause() external {
  14. _unpause();
  15. }
  16. function exists(uint256 tokenId) public view returns (bool) {
  17. return _exists(tokenId);
  18. }
  19. function mint(address to, uint256 tokenId) public {
  20. _mint(to, tokenId);
  21. }
  22. function safeMint(address to, uint256 tokenId) public {
  23. _safeMint(to, tokenId);
  24. }
  25. function safeMint(
  26. address to,
  27. uint256 tokenId,
  28. bytes memory _data
  29. ) public {
  30. _safeMint(to, tokenId, _data);
  31. }
  32. function burn(uint256 tokenId) public {
  33. _burn(tokenId);
  34. }
  35. }