Last active
April 24, 2019 23:20
-
-
Save yangga/7eb70e05b4532f19d24c66716ac1107a to your computer and use it in GitHub Desktop.
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
pragma solidity 0.5.2; | |
import "./CustomToken.sol"; | |
contract ToToToken is CustomToken { | |
uint8 private DECIMALS = 5; //자리수 | |
uint256 private MAX_TOKEN_COUNT = 20000000000; // 총 토큰 개수 | |
uint256 private MAX_SUPPLY = MAX_TOKEN_COUNT * (10 ** uint256(DECIMALS)); //총 발행량 | |
uint256 private INITIAL_SUPPLY = MAX_SUPPLY * 1 / 10; //초기 공급량 | |
bool private issued = false; | |
constructor() | |
CustomToken("ToToToken", "TOTO", DECIMALS, MAX_SUPPLY) | |
public { | |
require(issued == false); | |
super.mint(msg.sender, INITIAL_SUPPLY); | |
issued = true; | |
} | |
} |
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
pragma solidity 0.5.2; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Capped.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol"; | |
contract CustomToken is ERC20, ERC20Detailed, ERC20Capped, ERC20Burnable { | |
constructor( | |
string memory _name, | |
string memory _symbol, | |
uint8 _decimals, | |
uint256 _maxSupply | |
) | |
ERC20Burnable() | |
ERC20Capped(_maxSupply) | |
ERC20Detailed(_name, _symbol, _decimals) | |
ERC20() | |
public { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment