Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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;
}
}
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
You can’t perform that action at this time.