ERC721Mock.sol 850 B

1234567891011121314151617181920212223242526272829303132333435
  1. pragma solidity ^0.4.24;
  2. import "../token/ERC721/ERC721.sol";
  3. /**
  4. * @title ERC721Mock
  5. * This mock just provides a public mint and burn functions for testing purposes,
  6. * and a public setter for metadata URI
  7. */
  8. contract ERC721Mock is ERC721 {
  9. constructor(string name, string symbol) public
  10. ERC721(name, symbol)
  11. { }
  12. function mint(address _to, uint256 _tokenId) public {
  13. super._mint(_to, _tokenId);
  14. }
  15. function burn(uint256 _tokenId) public {
  16. super._burn(ownerOf(_tokenId), _tokenId);
  17. }
  18. function exists(uint256 _tokenId) public view returns (bool) {
  19. return super._exists(_tokenId);
  20. }
  21. function setTokenURI(uint256 _tokenId, string _uri) public {
  22. super._setTokenURI(_tokenId, _uri);
  23. }
  24. function _removeTokenFrom(address _from, uint256 _tokenId) public {
  25. super.removeTokenFrom(_from, _tokenId);
  26. }
  27. }