Skip to content

Instantly share code, notes, and snippets.

@georgemac510
Created February 16, 2023 19:46
Show Gist options
  • Save georgemac510/b9b75b0f1a03d59a16caf1b8c2c88155 to your computer and use it in GitHub Desktop.
Save georgemac510/b9b75b0f1a03d59a16caf1b8c2c88155 to your computer and use it in GitHub Desktop.
Mintable and burnable ERC20 contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Sample is ERC20, ERC20Burnable, 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