Merge republic-status with develop
This commit is contained in:
commit
81613cf06f
|
@ -1,5 +1,5 @@
|
||||||
pragma solidity ^0.4.11;
|
pragma solidity ^0.4.14;
|
||||||
|
|
||||||
contract ApproveAndCallFallBack {
|
contract ApproveAndCallFallBack {
|
||||||
function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
|
function receiveApproval(address from, uint256 _amount, address _token, bytes _data) public ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
pragma solidity ^0.4.17;
|
pragma solidity ^0.4.6;
|
||||||
|
|
||||||
import "../common/Controlled.sol";
|
|
||||||
import "./MiniMeTokenFactory.sol";
|
|
||||||
import "./TokenController.sol";
|
|
||||||
import "./ApproveAndCallFallBack.sol";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016, Jordi Baylina
|
Copyright 2016, Jordi Baylina
|
||||||
|
@ -29,6 +24,11 @@ import "./ApproveAndCallFallBack.sol";
|
||||||
/// and DApps to upgrade their features in a decentralized manner without
|
/// and DApps to upgrade their features in a decentralized manner without
|
||||||
/// affecting the original token
|
/// affecting the original token
|
||||||
/// @dev It is ERC20 compliant, but still needs to under go further testing.
|
/// @dev It is ERC20 compliant, but still needs to under go further testing.
|
||||||
|
|
||||||
|
import "../common/Controlled.sol";
|
||||||
|
import "./TokenController.sol";
|
||||||
|
import "./ApproveAndCallFallBack.sol";
|
||||||
|
|
||||||
/// @dev The actual token contract, the default controller is the msg.sender
|
/// @dev The actual token contract, the default controller is the msg.sender
|
||||||
/// that deploys the contract, so usually this token will be deployed by a
|
/// that deploys the contract, so usually this token will be deployed by a
|
||||||
/// token controller contract, which Giveth will call a "Campaign"
|
/// token controller contract, which Giveth will call a "Campaign"
|
||||||
|
@ -578,3 +578,46 @@ contract MiniMeToken is Controlled {
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////
|
||||||
|
// MiniMeTokenFactory
|
||||||
|
////////////////
|
||||||
|
|
||||||
|
/// @dev This contract is used to generate clone contracts from a contract.
|
||||||
|
/// In solidity this is the way to create a contract from a contract of the
|
||||||
|
/// same class
|
||||||
|
contract MiniMeTokenFactory {
|
||||||
|
|
||||||
|
/// @notice Update the DApp by creating a new token with new functionalities
|
||||||
|
/// the msg.sender becomes the controller of this clone token
|
||||||
|
/// @param _parentToken Address of the token being cloned
|
||||||
|
/// @param _snapshotBlock Block of the parent token that will
|
||||||
|
/// determine the initial distribution of the clone token
|
||||||
|
/// @param _tokenName Name of the new token
|
||||||
|
/// @param _decimalUnits Number of decimals of the new token
|
||||||
|
/// @param _tokenSymbol Token Symbol for the new token
|
||||||
|
/// @param _transfersEnabled If true, tokens will be able to be transferred
|
||||||
|
/// @return The address of the new token contract
|
||||||
|
function createCloneToken(
|
||||||
|
address _parentToken,
|
||||||
|
uint _snapshotBlock,
|
||||||
|
string _tokenName,
|
||||||
|
uint8 _decimalUnits,
|
||||||
|
string _tokenSymbol,
|
||||||
|
bool _transfersEnabled
|
||||||
|
) returns (MiniMeToken) {
|
||||||
|
MiniMeToken newToken = new MiniMeToken(
|
||||||
|
this,
|
||||||
|
_parentToken,
|
||||||
|
_snapshotBlock,
|
||||||
|
_tokenName,
|
||||||
|
_decimalUnits,
|
||||||
|
_tokenSymbol,
|
||||||
|
_transfersEnabled
|
||||||
|
);
|
||||||
|
|
||||||
|
newToken.changeController(msg.sender);
|
||||||
|
return newToken;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
pragma solidity ^0.4.11;
|
pragma solidity ^0.4.14;
|
||||||
|
|
||||||
/// @dev The token controller contract must implement these functions
|
/// @dev The token controller contract must implement these functions
|
||||||
contract TokenController {
|
contract TokenController {
|
||||||
|
|
Loading…
Reference in New Issue