Skip to content

Instantly share code, notes, and snippets.

@georgemac510
Created February 16, 2023 15:31
Show Gist options
  • Save georgemac510/bd882af4035fa59784a5c337375bb7cf to your computer and use it in GitHub Desktop.
Save georgemac510/bd882af4035fa59784a5c337375bb7cf to your computer and use it in GitHub Desktop.
Mintable ERC20
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Sample is ERC20, Ownable {
constructor() ERC20("Sample", "SAMP") {}
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