Created
February 16, 2023 19:46
-
-
Save georgemac510/b9b75b0f1a03d59a16caf1b8c2c88155 to your computer and use it in GitHub Desktop.
Mintable and burnable ERC20 contract
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
// 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