ERC721Mintable.sol 580 B

12345678910111213141516171819202122232425262728
  1. pragma solidity ^0.4.24;
  2. import "./ERC721.sol";
  3. import "../../access/roles/MinterRole.sol";
  4. /**
  5. * @title ERC721Mintable
  6. * @dev ERC721 minting logic
  7. */
  8. contract ERC721Mintable is ERC721, MinterRole {
  9. /**
  10. * @dev Function to mint tokens
  11. * @param to The address that will receive the minted tokens.
  12. * @param tokenId The token id to mint.
  13. * @return A boolean that indicates if the operation was successful.
  14. */
  15. function mint(
  16. address to,
  17. uint256 tokenId
  18. )
  19. public
  20. onlyMinter
  21. returns (bool)
  22. {
  23. _mint(to, tokenId);
  24. return true;
  25. }
  26. }