ERC20Mintable.sol 575 B

123456789101112131415161718192021
  1. pragma solidity ^0.5.2;
  2. import "./ERC20.sol";
  3. import "../../access/roles/MinterRole.sol";
  4. /**
  5. * @title ERC20Mintable
  6. * @dev ERC20 minting logic.
  7. */
  8. contract ERC20Mintable is ERC20, MinterRole {
  9. /**
  10. * @dev Function to mint tokens
  11. * @param to The address that will receive the minted tokens.
  12. * @param value The amount of tokens to mint.
  13. * @return A boolean that indicates if the operation was successful.
  14. */
  15. function mint(address to, uint256 value) public onlyMinter returns (bool) {
  16. _mint(to, value);
  17. return true;
  18. }
  19. }