Skip to content

Instantly share code, notes, and snippets.

@ramvi
Last active August 28, 2017 12:21
Show Gist options
  • Save ramvi/e77bdfb433ffc235b0dd2b414382d41d to your computer and use it in GitHub Desktop.
Save ramvi/e77bdfb433ffc235b0dd2b414382d41d to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.16;
contract TokenFactorySolution {
// creator -> token address
mapping(address => address[]) public created;
mapping(address => bool) public isMy1stToken; //verify that given address is of this token type
function createToken(uint256 _initialAmount, string _name, uint8 _decimals, string _symbol) returns (address) {
// create a new token with new My1StToken
// Add to created and isMy1stToken mappings
// This factory contract will own the created tokens. You must transfer them. Transfer initalAmount to token creator
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment