ERC721Mock.sol 927 B

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