ERC721PausableMockUpgradeable.sol 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../token/ERC721/extensions/ERC721PausableUpgradeable.sol";
  4. import "../proxy/utils/Initializable.sol";
  5. /**
  6. * @title ERC721PausableMock
  7. * This mock just provides a public mint, burn and exists functions for testing purposes
  8. */
  9. contract ERC721PausableMockUpgradeable is Initializable, ERC721PausableUpgradeable {
  10. function __ERC721PausableMock_init(string memory name, string memory symbol) internal onlyInitializing {
  11. __ERC721_init_unchained(name, symbol);
  12. __Pausable_init_unchained();
  13. }
  14. function __ERC721PausableMock_init_unchained(string memory, string memory) internal onlyInitializing {}
  15. function pause() external {
  16. _pause();
  17. }
  18. function unpause() external {
  19. _unpause();
  20. }
  21. function exists(uint256 tokenId) public view returns (bool) {
  22. return _exists(tokenId);
  23. }
  24. function mint(address to, uint256 tokenId) public {
  25. _mint(to, tokenId);
  26. }
  27. function safeMint(address to, uint256 tokenId) public {
  28. _safeMint(to, tokenId);
  29. }
  30. function safeMint(
  31. address to,
  32. uint256 tokenId,
  33. bytes memory _data
  34. ) public {
  35. _safeMint(to, tokenId, _data);
  36. }
  37. function burn(uint256 tokenId) public {
  38. _burn(tokenId);
  39. }
  40. /**
  41. * This empty reserved space is put in place to allow future versions to add new
  42. * variables without shifting down storage in the inheritance chain.
  43. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
  44. */
  45. uint256[50] private __gap;
  46. }