aave-protocol-v2/contracts/mocks/tokens/MintableERC20.sol

29 lines
659 B
Solidity
Raw Normal View History

// SPDX-License-Identifier: agpl-3.0
2020-11-20 10:45:20 +00:00
pragma solidity 0.6.12;
2020-10-15 13:41:56 +00:00
import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';
/**
* @title ERC20Mintable
* @dev ERC20 minting logic
*/
contract MintableERC20 is ERC20 {
2020-07-13 08:54:08 +00:00
constructor(
string memory name,
string memory symbol,
uint8 decimals
) public ERC20(name, symbol) {
_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) {
2020-10-27 13:42:11 +00:00
_mint(_msgSender(), value);
2020-07-13 08:54:08 +00:00
return true;
}
}