This repository has been archived by the owner on Mar 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from Loopring/rename-tokenMint
rename TokenMint to TokenCreator
- Loading branch information
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,14 +27,14 @@ import "./TokenRegistry.sol"; | |
/// so the token can be traded with Loopring Protocol. | ||
/// @author Kongliang Zhong - <[email protected]>, | ||
/// @author Daniel Wang - <[email protected]>. | ||
contract TokenMint { | ||
contract TokenCreator { | ||
using AddressUtil for address; | ||
|
||
address[] public tokens; | ||
address public tokenRegistry; | ||
address public tokenTransferDelegate; | ||
|
||
event TokenMinted( | ||
event TokenCreated( | ||
address indexed addr, | ||
string name, | ||
string symbol, | ||
|
@@ -65,13 +65,13 @@ contract TokenMint { | |
tokenTransferDelegate = _tokenTransferDelegate; | ||
} | ||
|
||
/// @dev Deploy an ERC20 token contract, register it with TokenRegistry, | ||
/// @dev Deploy an ERC20 token contract, register it with TokenRegistry, | ||
/// and returns the new token's address. | ||
/// @param name The name of the token | ||
/// @param symbol The symbol of the token. | ||
/// @param decimals The decimals of the token. | ||
/// @param totalSupply The total supply of the token. | ||
function mintToken( | ||
function createToken( | ||
string name, | ||
string symbol, | ||
uint8 decimals, | ||
|
@@ -96,7 +96,7 @@ contract TokenMint { | |
TokenRegistry(tokenRegistry).registerMintedToken(addr, symbol); | ||
tokens.push(addr); | ||
|
||
emit TokenMinted( | ||
emit TokenCreated( | ||
addr, | ||
name, | ||
symbol, | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
var TokenRegistry = artifacts.require("./TokenRegistry"); | ||
var TokenTransferDelegate = artifacts.require("./TokenTransferDelegate"); | ||
var NameRegistry = artifacts.require("./NameRegistry"); | ||
var TokenMint = artifacts.require("./TokenMint"); | ||
var TokenCreator = artifacts.require("./TokenCreator"); | ||
|
||
module.exports = function(deployer, network, accounts) { | ||
deployer.deploy(TokenTransferDelegate); | ||
deployer.deploy(NameRegistry); | ||
|
||
deployer.deploy(TokenMint).then(function() { | ||
return deployer.deploy(TokenRegistry, TokenMint.address); | ||
deployer.deploy(TokenCreator).then(function() { | ||
return deployer.deploy(TokenRegistry, TokenCreator.address); | ||
}); | ||
|
||
}; |