commit
a4d4d6a5ed
|
@ -19,7 +19,7 @@ pragma solidity ^0.4.11;
|
|||
|
||||
/// @title DevTokensHolder Contract
|
||||
/// @author Jordi Baylina
|
||||
/// @dev This contract will be hold tokens of the developers.
|
||||
/// @dev This contract will hold the tokens of the developers.
|
||||
/// Tokens will not be able to be collected until 6 months after the contribution
|
||||
/// period ends. And it will be increasing linearly until 2 years.
|
||||
|
||||
|
@ -51,7 +51,7 @@ contract DevTokensHolder is Owned, SafeMath {
|
|||
StatusContribution contribution;
|
||||
MiniMeToken snt;
|
||||
|
||||
function DevTokensHolder( address _owner, address _contribution, address _snt) {
|
||||
function DevTokensHolder(address _owner, address _contribution, address _snt) {
|
||||
owner = _owner;
|
||||
contribution = StatusContribution(_contribution);
|
||||
snt = MiniMeToken(_snt);
|
||||
|
@ -99,8 +99,8 @@ contract DevTokensHolder is Owned, SafeMath {
|
|||
// Safety Methods
|
||||
//////////
|
||||
|
||||
/// @notice This method can be used by the controller to extract mistakelly
|
||||
/// sended tokens to this contract.
|
||||
/// @notice This method can be used by the controller to extract mistakenly
|
||||
/// sent tokens to this contract.
|
||||
/// @param _token The address of the token contract that you want to recover
|
||||
/// set to 0 in case you want to extract ether.
|
||||
function claimTokens(address _token) onlyOwner {
|
||||
|
|
|
@ -19,8 +19,8 @@ pragma solidity ^0.4.11;
|
|||
|
||||
/// @title DynamicCeiling Contract
|
||||
/// @author Jordi Baylina
|
||||
/// @dev This contract calculates the A cailing from a series of points.
|
||||
/// This points are commited firs and revealed later.
|
||||
/// @dev This contract calculates the ceiling from a series of points.
|
||||
/// These points are committed first and revealed later.
|
||||
/// All the points must be in increasing order and the last point is marked
|
||||
/// as the last one.
|
||||
/// This contract allows to hide and reveal the ceiling at will of the owner.
|
||||
|
@ -48,9 +48,9 @@ contract DynamicCeiling is SafeMath {
|
|||
|
||||
/// @notice This should be called by the creator of the contract to commit
|
||||
/// all the points of the curve.
|
||||
/// @param _pointHashes Array of hashes of each point. Each hash is callculated
|
||||
/// by the `calculateHash` method. More hashes that the actual points of the curve
|
||||
/// can be commited in order to hide also the number of points of the curve.
|
||||
/// @param _pointHashes Array of hashes of each point. Each hash is calculated
|
||||
/// by the `calculateHash` method. More hashes than actual points of the curve
|
||||
/// can be committed in order to hide also the number of points of the curve.
|
||||
/// The remaining hashes can be just random numbers.
|
||||
function setHiddenPoints(bytes32[] _pointHashes) {
|
||||
if (msg.sender != creator) throw;
|
||||
|
@ -62,10 +62,11 @@ contract DynamicCeiling is SafeMath {
|
|||
}
|
||||
|
||||
|
||||
/// @notice Any body can revel the next point of the curve if he knows it.
|
||||
/// @notice Anybody can reveal the next point of the curve if he knows it.
|
||||
/// @param _block Block number where this point of the curve is defined.
|
||||
/// (Must be greater than the previous one)
|
||||
/// @param _limit Ceiling cat at that block.
|
||||
/// @param _limit Ceiling cap at that block.
|
||||
/// (must be greater or equal than the previous one).
|
||||
/// @param _last `true` if it's the last point of the curve.
|
||||
/// @param _salt Random number used to commit the point
|
||||
function revealPoint(uint _block, uint _limit, bool _last, bytes32 _salt) {
|
||||
|
@ -83,10 +84,11 @@ contract DynamicCeiling is SafeMath {
|
|||
}
|
||||
|
||||
/// @return Return the limit at specific block number
|
||||
/// (or 0 if no points revealed yet or block before first point)
|
||||
function cap(uint _block) constant returns (uint) {
|
||||
if (revealedPoints == 0) return 0;
|
||||
|
||||
// Shortcut for the actual value
|
||||
// Shortcut if _block is after most recently revealed point
|
||||
if (_block >= points[safeSub(revealedPoints,1)].block)
|
||||
return points[safeSub(revealedPoints,1)].limit;
|
||||
if (_block < points[0].block) return 0;
|
||||
|
@ -116,7 +118,7 @@ contract DynamicCeiling is SafeMath {
|
|||
/// @notice Calculates the hash of a point.
|
||||
/// @param _block Block number where this point of the curve is defined.
|
||||
/// (Must be greater than the previous one)
|
||||
/// @param _limit Ceiling cat at that block.
|
||||
/// @param _limit Ceiling cap at that block.
|
||||
/// @param _last `true` if it's the last point of the curve.
|
||||
/// @param _salt Random number that will be needed to reveal this point.
|
||||
/// @return The calculated hash of this point to be used in the
|
||||
|
@ -125,7 +127,9 @@ contract DynamicCeiling is SafeMath {
|
|||
return sha3(_block, _limit, _last, _salt);
|
||||
}
|
||||
|
||||
/// @return Return the total number of points commited
|
||||
/// @return Return the total number of points committed
|
||||
/// (can be larger than the number of actual points on the curve to hide
|
||||
/// the real number of points)
|
||||
function nPoints() constant returns(uint) {
|
||||
return points.length;
|
||||
}
|
||||
|
|
|
@ -534,8 +534,8 @@ contract MiniMeToken is Controlled {
|
|||
// Safety Methods
|
||||
//////////
|
||||
|
||||
/// @notice This method can be used by the controller to extract mistakelly
|
||||
/// sended tokens to this contract.
|
||||
/// @notice This method can be used by the controller to extract mistakenly
|
||||
/// sent tokens to this contract.
|
||||
/// @param _token The address of the token contract that you want to recover
|
||||
/// set to 0 in case you want to extract ether.
|
||||
function claimTokens(address _token) onlyController {
|
||||
|
|
|
@ -292,7 +292,7 @@ contract MultisigWallet {
|
|||
count += 1;
|
||||
}
|
||||
|
||||
/// @dev Returns total number of transactions after filers are applied.
|
||||
/// @dev Returns total number of transactions after filters are applied.
|
||||
/// @param pending Include pending transactions.
|
||||
/// @param executed Include executed transactions.
|
||||
/// @return Total number of transactions after filters are applied.
|
||||
|
|
|
@ -22,7 +22,7 @@ contract SGT is MiniMeToken {
|
|||
) {}
|
||||
|
||||
// data is an array of uints. Each uint represents a transfer.
|
||||
// The 160 LSB is the destination of the addess that wants to be sent
|
||||
// The 160 LSB is the destination of the address that wants to be sent
|
||||
// The 96 MSB is the amount of tokens that wants to be sent.
|
||||
function multiMint(uint[] data) onlyController {
|
||||
for (uint i = 0; i < data.length; i++ ) {
|
||||
|
|
|
@ -22,7 +22,7 @@ pragma solidity ^0.4.11;
|
|||
/// @dev This contract will be used to distribute SNT between SGT holders.
|
||||
/// SGT token is not transferable, and we just keep an accounting between all tokens
|
||||
/// deposited and the tokens collected.
|
||||
/// The controllerShip of SGT should be transfered to this contract before the
|
||||
/// The controllerShip of SGT should be transferred to this contract before the
|
||||
/// contribution period starts.
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ contract SGTExchanger is TokenController, SafeMath, Owned {
|
|||
safeMul(total , balance),
|
||||
sgt.totalSupply());
|
||||
|
||||
// And then substract the ammount already collected
|
||||
// And then subtract the amount already collected
|
||||
amount = safeSub(amount, collected[msg.sender]);
|
||||
|
||||
totalCollected = safeAdd(totalCollected, amount);
|
||||
|
@ -82,8 +82,8 @@ contract SGTExchanger is TokenController, SafeMath, Owned {
|
|||
// Safety Method
|
||||
//////////
|
||||
|
||||
/// @notice This method can be used by the controller to extract mistakelly
|
||||
/// sended tokens to this contract.
|
||||
/// @notice This method can be used by the controller to extract mistakenly
|
||||
/// sent tokens to this contract.
|
||||
/// @param _token The address of the token contract that you want to recover
|
||||
/// set to 0 in case you want to extract ether.
|
||||
function claimTokens(address _token) onlyOwner {
|
||||
|
|
|
@ -27,7 +27,7 @@ import "./Owned.sol";
|
|||
/// @dev The SNTPlaceholder contract will take control over the SNT after the contribution
|
||||
/// is finalized and before the Status Network is deployed.
|
||||
/// The contract allows for SNT transfers and transferFrom and implements the
|
||||
/// logic for transfering control of the token to the network when the offering
|
||||
/// logic for transferring control of the token to the network when the offering
|
||||
/// asks it to do so.
|
||||
|
||||
contract SNTPlaceHolder is TokenController, SafeMath, Owned {
|
||||
|
@ -40,8 +40,8 @@ contract SNTPlaceHolder is TokenController, SafeMath, Owned {
|
|||
/// @param _owner Trusted owner for this contract.
|
||||
/// @param _snt SNT token contract address
|
||||
/// @param _contribution StatusContribution contract address
|
||||
/// @param _sgtExchanger SGT-SNT Exchange address. (During the first two weeks,
|
||||
/// only this exchanger will be able to move tokens from)
|
||||
/// @param _sgtExchanger SGT-SNT Exchange address. (During the first week
|
||||
/// only this exchanger will be able to move tokens)
|
||||
function SNTPlaceHolder(address _owner, address _snt, address _contribution, address _sgtExchanger) {
|
||||
owner = _owner;
|
||||
snt = MiniMeToken(_snt);
|
||||
|
@ -49,7 +49,7 @@ contract SNTPlaceHolder is TokenController, SafeMath, Owned {
|
|||
sgtExchanger = _sgtExchanger;
|
||||
}
|
||||
|
||||
/// @notice The owner of this contract can cheche the controller of the SNT token
|
||||
/// @notice The owner of this contract can change the controller of the SNT token
|
||||
/// Please, be sure that the owner is a trusted agent or 0x0 address.
|
||||
/// @param _newController The address of the new controller
|
||||
|
||||
|
@ -77,7 +77,7 @@ contract SNTPlaceHolder is TokenController, SafeMath, Owned {
|
|||
}
|
||||
|
||||
function transferable(address _from) internal returns (bool) {
|
||||
// Allow the exchanger to work from the begining
|
||||
// Allow the exchanger to work from the beginning
|
||||
if (activationTime == 0) {
|
||||
uint f = contribution.finalized();
|
||||
if (f>0) {
|
||||
|
@ -102,8 +102,8 @@ contract SNTPlaceHolder is TokenController, SafeMath, Owned {
|
|||
// Safety Methods
|
||||
//////////
|
||||
|
||||
/// @notice This method can be used by the controller to extract mistakelly
|
||||
/// sended tokens to this contract.
|
||||
/// @notice This method can be used by the controller to extract mistakenly
|
||||
/// sent tokens to this contract.
|
||||
/// @param _token The address of the token contract that you want to recover
|
||||
/// set to 0 in case you want to extract ether.
|
||||
function claimTokens(address _token) onlyOwner {
|
||||
|
|
|
@ -21,7 +21,7 @@ pragma solidity ^0.4.11;
|
|||
/// @author Jordi Baylina
|
||||
/// @dev This contract will be the SNT controller during the contribution period.
|
||||
/// This contract will determine the rules during this period.
|
||||
/// Final users, will generally not interact directly with this contract. ETH will
|
||||
/// Final users will generally not interact directly with this contract. ETH will
|
||||
/// be sent to the SNT token contract. The ETH is sent to this contract and from here,
|
||||
/// ETH is sent to the contribution walled and SNTs are mined according to the defined
|
||||
/// rules.
|
||||
|
@ -96,7 +96,7 @@ contract StatusContribution is Owned, SafeMath, TokenController {
|
|||
/// @param _destTokensSgt Address of the exchanger SGT-SNT where the SNT are sent
|
||||
/// to be distributed to the SGT holders.
|
||||
/// @param _maxSGTSupply Quantity of SGT tokens that would represent 10% of status.
|
||||
/// @param _sntController Token controller for the SNT that will be transfered after
|
||||
/// @param _sntController Token controller for the SNT that will be transferred after
|
||||
/// the contribution finalizes.
|
||||
function initialize(
|
||||
address _sntAddress,
|
||||
|
@ -173,7 +173,7 @@ contract StatusContribution is Owned, SafeMath, TokenController {
|
|||
GuaranteedAddress(_th, _limit);
|
||||
}
|
||||
|
||||
/// @notice If any body sends Ether directly to this contract, cosidere he is
|
||||
/// @notice If anybody sends Ether directly to this contract, consider he is
|
||||
/// getting SNTs.
|
||||
function () payable {
|
||||
proxyPayment(msg.sender);
|
||||
|
@ -183,7 +183,7 @@ contract StatusContribution is Owned, SafeMath, TokenController {
|
|||
// MiniMe Controller functions
|
||||
//////////
|
||||
/// @notice This method will generally be called by the SNT token contract to
|
||||
/// adquire SNTs. Or directly from third parties that want po adquire SNTs in
|
||||
/// acquire SNTs. Or directly from third parties that want po acquire SNTs in
|
||||
/// behalf of a token holder.
|
||||
/// @param _th SNT holder where the SNTs will be minted.
|
||||
function proxyPayment(address _th) payable initialized contributionOpen returns (bool) {
|
||||
|
@ -281,7 +281,7 @@ contract StatusContribution is Owned, SafeMath, TokenController {
|
|||
// Right now, Solidity does not support decimal numbers. (This will change very soon)
|
||||
// So in this contract we use a representation of a percentage that consist in
|
||||
// expressing the percentage in "x per 10**18"
|
||||
// This format has a precission of 16 digits for a percent.
|
||||
// This format has a precision of 16 digits for a percent.
|
||||
// Examples:
|
||||
// 3% = 3*(10**16)
|
||||
// 100% = 100*(10**16) = 10**18
|
||||
|
@ -296,8 +296,8 @@ contract StatusContribution is Owned, SafeMath, TokenController {
|
|||
|
||||
|
||||
/// @notice This method will can be called by the owner before the contribution period
|
||||
/// end or by any body after the `endBlock`. This method finalizes the contribution period
|
||||
/// by creating the remaining tokens and transferin the controller to the configured
|
||||
/// end or by anybody after the `endBlock`. This method finalizes the contribution period
|
||||
/// by creating the remaining tokens and transferring the controller to the configured
|
||||
/// controller.
|
||||
function finalize() initialized {
|
||||
if (getBlockNumber() < startBlock) throw;
|
||||
|
@ -431,7 +431,7 @@ contract StatusContribution is Owned, SafeMath, TokenController {
|
|||
// Testing specific methods
|
||||
//////////
|
||||
|
||||
/// @notice This function is overrided by the test Mocks.
|
||||
/// @notice This function is overridden by the test Mocks.
|
||||
function getBlockNumber() internal constant returns (uint) {
|
||||
return block.number;
|
||||
}
|
||||
|
@ -441,8 +441,8 @@ contract StatusContribution is Owned, SafeMath, TokenController {
|
|||
// Safety Methods
|
||||
//////////
|
||||
|
||||
/// @notice This method can be used by the controller to extract mistakelly
|
||||
/// sended tokens to this contract.
|
||||
/// @notice This method can be used by the controller to extract mistakenly
|
||||
/// sent tokens to this contract.
|
||||
/// @param _token The address of the token contract that you want to recover
|
||||
/// set to 0 in case you want to extract ether.
|
||||
function claimTokens(address _token) onlyOwner {
|
||||
|
|
Loading…
Reference in New Issue