Created
April 21, 2021 09:16
-
-
Save reuniware/a25e7f83066fca8ac0e19116597775e8 to your computer and use it in GitHub Desktop.
Simplest ERC20 Token with OpenZeppelin
This file contains hidden or 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.1; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
/** | |
* @title Standard ERC20 token | |
* | |
* @dev Implementation of the basic standard token. | |
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md | |
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol | |
*/ | |
contract MySuperToken is ERC20 { | |
/** | |
* @dev Constructor that gives msg.sender all of existing tokens. | |
*/ | |
constructor(string memory name, string memory symbol, uint256 initialSupply) public ERC20(name, symbol) { | |
_mint(msg.sender, initialSupply); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment