Created
August 1, 2019 04:16
-
-
Save taobun/8f73ab845d2d073ca16c438507d46027 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.10; | |
contract Token { | |
string public name; | |
string public symbol; | |
mapping(address => uint256) public balances; | |
constructor(string memory _name, string memory _symbol) public { | |
name = _name; | |
symbol = _symbol; | |
} | |
} | |
contract TokenFactory { | |
event TokenCreated(Token newToken); | |
function createNewToken(string calldata name, string calldata symbol) external { | |
Token token = new Token(name, symbol); | |
emit TokenCreated(token); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment