forked from mikeghen/erc20-truffle-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTanganyERC20.sol
27 lines (24 loc) · 835 Bytes
/
TanganyERC20.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
/**
* @title TanganyERC20
* @dev Simple ERC20 Token example yields 10000 tokens pre-assigned to its creator.
*/
contract TanganyERC20 is ERC20 {
// modify token name
string public constant NAME = "TanganyERC20Token";
// modify token symbol
string public constant SYMBOL = "TERC20";
// modify token decimals
uint8 public constant DECIMALS = 18;
// modify initial token supply
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(DECIMALS)); // 10000 tokens
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor () public ERC20(NAME, SYMBOL) {
_setupDecimals(DECIMALS);
_mint(msg.sender, INITIAL_SUPPLY);
}
}