2020-05-29 16:45:37 +00:00
|
|
|
// SPDX-License-Identifier: agpl-3.0
|
|
|
|
pragma solidity ^0.6.8;
|
|
|
|
|
2020-06-30 12:09:28 +00:00
|
|
|
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
2020-05-29 16:45:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @title ERC20Mintable
|
|
|
|
* @dev ERC20 minting logic
|
|
|
|
*/
|
|
|
|
contract MintableERC20 is ERC20 {
|
|
|
|
constructor(string memory name, string memory symbol, uint8 decimals) ERC20(name, symbol) public {
|
|
|
|
_setupDecimals(decimals);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @dev Function to mint tokens
|
|
|
|
* @param value The amount of tokens to mint.
|
|
|
|
* @return A boolean that indicates if the operation was successful.
|
|
|
|
*/
|
|
|
|
function mint(uint256 value) public returns (bool) {
|
|
|
|
_mint(msg.sender, value);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|