Created
May 5, 2021 12:08
-
-
Save yuyasugano/0d6b128b420bafa22d10922868d95b8c to your computer and use it in GitHub Desktop.
Avalabs Smart Contract QuickStart
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.6.2 < 0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
contract CustomCoin is ERC20 { | |
string private TOKEN_NAME = "ERC20 Test Token"; | |
string private TOKEN_SYMBOL = "TEST"; | |
uint8 private constant TOKEN_DECIMALS = 18; | |
uint private constant TOTAL_SUPPLY = 21000000 * (10 ** TOKEN_DECIMALS); | |
constructor() ERC20(TOKEN_NAME, TOKEN_SYMBOL) { | |
_setupDecimals(TOKEN_DECIMALS); | |
_mint(msg.sender, TOTAL_SUPPLY); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment