ERC721Mintable.sol 579 B

123456789101112131415161718192021
  1. pragma solidity ^0.5.0;
  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(address to, uint256 tokenId) public onlyMinter returns (bool) {
  16. _mint(to, tokenId);
  17. return true;
  18. }
  19. }