ERC721Mock.sol 1012 B

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