Created
February 25, 2022 15:58
-
-
Save gsans/fb9650736aa88c7e640bace88c89ff20 to your computer and use it in GitHub Desktop.
ERC20 GLD token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract GLDToken is ERC20, Ownable { | |
constructor(uint256 initialSupply) ERC20("Gold", "GLD") { | |
_mint(msg.sender, initialSupply); | |
} | |
function mint(address to, uint256 amount) public onlyOwner { | |
_mint(to, amount); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment