| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.20; |
| 3 | |
| 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; |
| 5 | import "@openzeppelin/contracts/access/Ownable.sol"; |
| 6 | import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; |
| 7 | |
| 8 | contract GoldenCorn is ERC20, Ownable, ERC20Permit { |
| 9 | constructor( |
| 10 | address initialOwner |
| 11 | ) |
| 12 | ERC20("GoldenCorn", "GC") |
| 13 | Ownable(initialOwner) |
| 14 | ERC20Permit("GoldenCorn") |
| 15 | {} |
| 16 | |
| 17 | function mint(address to, uint256 amount) public onlyOwner { |
| 18 | uint256 mintAmount = amount * (10 ** decimals()); |
| 19 | _mint(to, mintAmount); |
| 20 | } |
| 21 | } |