Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Created May 5, 2021 12:08
Show Gist options
  • Save yuyasugano/0d6b128b420bafa22d10922868d95b8c to your computer and use it in GitHub Desktop.
Save yuyasugano/0d6b128b420bafa22d10922868d95b8c to your computer and use it in GitHub Desktop.
Avalabs Smart Contract QuickStart
// 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