21 lines
501 B
Solidity
21 lines
501 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.0;
|
|
|
|
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
|
|
contract MyERC20 is ERC20 {
|
|
uint8 private _decimals;
|
|
|
|
constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {
|
|
_decimals = decimals_;
|
|
}
|
|
|
|
function mint(address _to, uint256 _amount) public {
|
|
_mint(_to, _amount);
|
|
}
|
|
|
|
function decimals() public view override returns (uint8) {
|
|
return _decimals;
|
|
}
|
|
}
|