mirror of
https://github.com/vacp2p/minime.git
synced 2026-01-08 21:17:56 -05:00
removed createCloneToken functionality
This commit is contained in:
@@ -58,42 +58,4 @@ contract MiniMeToken is MiniMeBase {
|
||||
function destroyTokens(address _owner, uint256 _amount) public onlyController returns (bool) {
|
||||
return burn(_owner, _amount);
|
||||
}
|
||||
|
||||
////////////////
|
||||
// Clone Token Method
|
||||
////////////////
|
||||
|
||||
/// @notice Creates a new clone token with the initial distribution being
|
||||
/// this token at `_snapshotBlock`
|
||||
/// @param _cloneTokenName Name of the clone token
|
||||
/// @param _cloneDecimalUnits Number of decimals of the smallest unit
|
||||
/// @param _cloneTokenSymbol Symbol of the clone token
|
||||
/// @param _snapshotBlock Block when the distribution of the parent token is
|
||||
/// copied to set the initial distribution of the new clone token;
|
||||
/// if the block is zero than the actual block, the current block is used
|
||||
/// @param _transfersEnabled True if transfers are allowed in the clone
|
||||
/// @return The address of the new MiniMeToken Contract
|
||||
function createCloneToken(
|
||||
string memory _cloneTokenName,
|
||||
uint8 _cloneDecimalUnits,
|
||||
string memory _cloneTokenSymbol,
|
||||
uint256 _snapshotBlock,
|
||||
bool _transfersEnabled
|
||||
)
|
||||
public
|
||||
returns (address)
|
||||
{
|
||||
if (_snapshotBlock == 0) _snapshotBlock = block.number;
|
||||
MiniMeToken cloneToken = tokenFactory.createCloneToken(
|
||||
this, _snapshotBlock, _cloneTokenName, _cloneDecimalUnits, _cloneTokenSymbol, _transfersEnabled
|
||||
);
|
||||
|
||||
cloneToken.changeController(payable(msg.sender));
|
||||
|
||||
// An event to make the token easy to find on the blockchain
|
||||
emit NewCloneToken(address(cloneToken), _snapshotBlock);
|
||||
return address(cloneToken);
|
||||
}
|
||||
|
||||
event NewCloneToken(address indexed _cloneToken, uint256 _snapshotBlock);
|
||||
}
|
||||
|
||||
@@ -150,10 +150,15 @@ contract CreateCloneTokenTest is MiniMeTokenTest {
|
||||
MiniMeTokenTest.setUp();
|
||||
}
|
||||
|
||||
function _createClone() internal returns (MiniMeToken) {
|
||||
address cloneAddress = minimeToken.createCloneToken("Clone Token 1", 18, "MMTc", 0, true);
|
||||
MiniMeToken clone = MiniMeToken(payable(cloneAddress));
|
||||
return clone;
|
||||
function _createClone() internal returns (MiniMeToken clone) {
|
||||
return new MiniMeToken(
|
||||
minimeTokenFactory,
|
||||
minimeToken,
|
||||
block.number,
|
||||
"Clone Token 1",
|
||||
18,
|
||||
"MMTc",
|
||||
true);
|
||||
}
|
||||
|
||||
function testCreateCloneToken() public {
|
||||
|
||||
Reference in New Issue
Block a user