Skip to content

Instantly share code, notes, and snippets.

@gsans
Created February 25, 2022 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsans/fb9650736aa88c7e640bace88c89ff20 to your computer and use it in GitHub Desktop.
Save gsans/fb9650736aa88c7e640bace88c89ff20 to your computer and use it in GitHub Desktop.
ERC20 GLD token
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