Address Contract Partially Verified
Address
0x8eFFd494eB698cc399AF6231fCcd39E08fd20B15
Balance
0 ETH
Nonce
1
Code Size
10104 bytes
Creator
0x00662220...F67B at tx 0x28814706...b785e7
Indexed Transactions
0 (1 on-chain, 1.2% indexed)
Contract Bytecode
10104 bytes
0x60606040523615610265576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610277578063095ea7b3146103065780630b851937146103605780630fdc36091461038957806311a4c710146103c257806318160ddd146103f05780631a8932d91461041957806321914e291461044657806323b872dd1461046f5780633360caa0146104e857806336eec28e14610511578063378aa7011461053e5780633a232c2d146105755780633bf4ac5c1461059e5780633ccf127e146105c757806342ea74c0146105f0578063458c9ca414610619578063472fdb67146106425780634d597b2d1461066b5780634d853ee5146106945780634f9b7bc8146106e957806351e221251461071257806357bd2a65146107545780635ed7ca5b14610781578063678216861461079657806370a08231146107b957806386a3e0a7146108065780638b22e1df146108335780638f3b6b841461085c578063916891aa1461088557806393c32e061461089a57806395d89b41146108d35780639cc73a6f14610962578063a6f2ae3a1461098b578063a9059cbb14610995578063b5cb6a17146109ef578063b9b8af0b14610a18578063beb3a38f14610a45578063bf60401914610a6e578063c10b935814610a97578063cb3e64fd14610ac0578063d01678f014610ad5578063d0e30db014610afe578063d3e7331214610b53578063dd62ed3e14610b80578063e3d5e6a314610bec578063f25633dd14610c15578063f288753d14610c3e578063f7c58b6214610c67578063fd8ac8d014610c90578063fdb914e214610cb9575b6102755b61027233610ce2565b5b565b005b341561028257600080fd5b61028a61112b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102cb5780820151818401525b6020810190506102af565b50505050905090810190601f1680156102f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561031157600080fd5b610346600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506111c9565b604051808215151515815260200191505060405180910390f35b341561036b57600080fd5b6103736112bc565b6040518082815260200191505060405180910390f35b341561039457600080fd5b6103c0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506112c2565b005b6103ee600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ce2565b005b34156103fb57600080fd5b610403611363565b6040518082815260200191505060405180910390f35b341561042457600080fd5b61042c611369565b604051808215151515815260200191505060405180910390f35b341561045157600080fd5b61045961137c565b6040518082815260200191505060405180910390f35b341561047a57600080fd5b6104ce600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611382565b604051808215151515815260200191505060405180910390f35b34156104f357600080fd5b6104fb6113a9565b6040518082815260200191505060405180910390f35b341561051c57600080fd5b6105246113af565b604051808215151515815260200191505060405180910390f35b341561054957600080fd5b6105516113c2565b6040518082600581111561056157fe5b60ff16815260200191505060405180910390f35b341561058057600080fd5b610588611469565b6040518082815260200191505060405180910390f35b34156105a957600080fd5b6105b161154b565b6040518082815260200191505060405180910390f35b34156105d257600080fd5b6105da611551565b6040518082815260200191505060405180910390f35b34156105fb57600080fd5b610603611557565b6040518082815260200191505060405180910390f35b341561062457600080fd5b61062c61157d565b6040518082815260200191505060405180910390f35b341561064d57600080fd5b610655611583565b6040518082815260200191505060405180910390f35b341561067657600080fd5b61067e611589565b6040518082815260200191505060405180910390f35b341561069f57600080fd5b6106a761158f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156106f457600080fd5b6106fc6115b5565b6040518082815260200191505060405180910390f35b341561071d57600080fd5b610752600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506115bb565b005b341561075f57600080fd5b61076761166f565b604051808215151515815260200191505060405180910390f35b341561078c57600080fd5b610794611682565b005b34156107a157600080fd5b6107b760048080359060200190919050506116fc565b005b34156107c457600080fd5b6107f0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611763565b6040518082815260200191505060405180910390f35b341561081157600080fd5b6108196117ac565b604051808215151515815260200191505060405180910390f35b341561083e57600080fd5b6108466117bf565b6040518082815260200191505060405180910390f35b341561086757600080fd5b61086f6117c5565b6040518082815260200191505060405180910390f35b341561089057600080fd5b6108986117cb565b005b34156108a557600080fd5b6108d1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611e99565b005b34156108de57600080fd5b6108e6611f3a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109275780820151818401525b60208101905061090b565b50505050905090810190601f1680156109545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561096d57600080fd5b610975611fd8565b6040518082815260200191505060405180910390f35b610993611fde565b005b34156109a057600080fd5b6109d5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611fea565b604051808215151515815260200191505060405180910390f35b34156109fa57600080fd5b610a0261200f565b6040518082815260200191505060405180910390f35b3415610a2357600080fd5b610a2b612015565b604051808215151515815260200191505060405180910390f35b3415610a5057600080fd5b610a58612028565b6040518082815260200191505060405180910390f35b3415610a7957600080fd5b610a8161202e565b6040518082815260200191505060405180910390f35b3415610aa257600080fd5b610aaa612034565b6040518082815260200191505060405180910390f35b3415610acb57600080fd5b610ad361203a565b005b3415610ae057600080fd5b610ae86120b4565b6040518082815260200191505060405180910390f35b3415610b0957600080fd5b610b116120ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610b5e57600080fd5b610b666120e0565b604051808215151515815260200191505060405180910390f35b3415610b8b57600080fd5b610bd6600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506120f3565b6040518082815260200191505060405180910390f35b3415610bf757600080fd5b610bff61217b565b6040518082815260200191505060405180910390f35b3415610c2057600080fd5b610c28612181565b6040518082815260200191505060405180910390f35b3415610c4957600080fd5b610c51612187565b6040518082815260200191505060405180910390f35b3415610c7257600080fd5b610c7a61218d565b6040518082815260200191505060405180910390f35b3415610c9b57600080fd5b610ca3612193565b6040518082815260200191505060405180910390f35b3415610cc457600080fd5b610ccc612199565b6040518082815260200191505060405180910390f35b6000806000806000610cf26113c2565b9450610d0b610d0334600c5461219f565b600b546121d6565b935060006005811115610d1a57fe5b856005811115610d2657fe5b1415610e72576000602060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111515610d7a57600080fd5b610d86600e548561221e565b600e81905550600754600e54108015610ddd5750602060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484105b1515610de857600080fd5b83602060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403602060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f56565b60016005811115610e7f57fe5b856005811115610e8b57fe5b1415610ebe57610e9d600f548561221e565b600f81905550600e5460085403600f54101515610eb957600080fd5b610f55565b60026005811115610ecb57fe5b856005811115610ed757fe5b1415610f0657610ee96010548561221e565b601081905550600954601054101515610f0157600080fd5b610f54565b60036005811115610f1357fe5b856005811115610f1f57fe5b1415610f4e57610f316011548561221e565b601181905550600a54601154101515610f4957600080fd5b610f53565b600080fd5b5b5b5b610f6734610f62611557565b6121d6565b9250610f84610f7d84610f78611469565b61219f565b60646121d6565b915060006005811115610f9357fe5b856005811115610f9f57fe5b1415610fc257610fbb601e54610fb68460046121d6565b61224c565b601e819055505b610fcc838361221e565b90506110166000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548261221e565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110646002548261221e565b600281905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156110cc57600080fd5b8573ffffffffffffffffffffffffffffffffffffffff167f1cbc5ab135991bd2b6a4b034a04aa2aa086dac1371cb9b16b8b5e2ed6b036bed3483604051808381526020018281526020019250505060405180910390a25b505050505050565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111c15780601f10611196576101008083540402835291602001916111c1565b820191906000526020600020905b8154815290600101906020018083116111a457829003601f168201915b505050505081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b601a5481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561131e57600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60025481565b601b60029054906101000a900460ff1681565b60135481565b60006016544211151561139457600080fd5b61139f848484612269565b90505b9392505050565b60125481565b601b60049054906101000a900460ff1681565b6000601f60009054906101000a900460ff16156113e25760059050611466565b6012544210156113f55760009050611466565b6012544211801561140857506013544211155b156114165760019050611466565b6013544211801561142957506014544211155b156114375760029050611466565b6014544211801561144a57506015544211155b156114585760039050611466565b60049050611466565b5b5b5b5b5b90565b6000806114746113c2565b905060058081111561148257fe5b81600581111561148e57fe5b141561149957600080fd5b600060058111156114a657fe5b8160058111156114b257fe5b14156114c15760149150611547565b600160058111156114ce57fe5b8160058111156114da57fe5b14156114e957600f9150611547565b600260058111156114f657fe5b81600581111561150257fe5b141561151157600a9150611547565b6003600581111561151e57fe5b81600581111561152a57fe5b14156115395760059150611547565b60009150611547565b5b5b5b5b5b5090565b60145481565b600e5481565b600080611568600b54600c546121d6565b905061157681600d5461219f565b91505b5090565b60195481565b601d5481565b601e5481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601c5481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156116185750600081115b151561162357600080fd5b60648102602060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5050565b601b60039054906101000a900460ff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116de57600080fd5b6001601f60006101000a81548160ff0219169083151502179055505b565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561175857600080fd5b80600c819055505b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b601b60019054906101000a900460ff1681565b600f5481565b600d5481565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561182957600080fd5b6004600581111561183657fe5b61183e6113c2565b600581111561184957fe5b14151561185557600080fd5b60009050601554421180156118775750601b60009054906101000a900460ff16155b15611981576001601b60006101000a81548160ff021916908315150217905550601e549050611906600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548261221e565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119766002548261221e565b600281905550611e52565b6017544211801561199f5750601b60019054906101000a900460ff16155b15611ab3576001601b60016101000a81548160ff0219169083151502179055506119cc601d5460046121d6565b9050611a38600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548261221e565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611aa86002548261221e565b600281905550611e51565b60185442118015611ad15750601b60029054906101000a900460ff16155b15611be5576001601b60026101000a81548160ff021916908315150217905550611afe601d5460046121d6565b9050611b6a600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548261221e565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611bda6002548261221e565b600281905550611e50565b60195442118015611c035750601b60039054906101000a900460ff16155b15611d17576001601b60036101000a81548160ff021916908315150217905550611c30601d5460046121d6565b9050611c9c600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548261221e565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d0c6002548261221e565b600281905550611e4f565b601a5442118015611d355750601b60049054906101000a900460ff16155b15611e49576001601b60046101000a81548160ff021916908315150217905550611d62601d5460046121d6565b9050611dce600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548261221e565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e3e6002548261221e565b600281905550611e4e565b600080fd5b5b5b5b5b3373ffffffffffffffffffffffffffffffffffffffff167f37e5f3d38cc7ce7c9454d31ff209dae0645f0157561ac8a1e55329c70f24c5b160405160405180910390a25b50565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ef557600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611fd05780601f10611fa557610100808354040283529160200191611fd0565b820191906000526020600020905b815481529060010190602001808311611fb357829003601f168201915b505050505081565b60115481565b611fe733610ce2565b5b565b600060165442111515611ffc57600080fd5b6120068383612564565b90505b92915050565b600a5481565b601f60009054906101000a900460ff1681565b60085481565b60165481565b60155481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561209657600080fd5b6000601f60006101000a81548160ff0219169083151502179055505b565b60105481565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601b60009054906101000a900460ff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b92915050565b60185481565b60175481565b600c5481565b600b5481565b60095481565b60075481565b600080828402905060008414806121c057508284828115156121bd57fe5b04145b15156121cb57600080fd5b8091505b5092915050565b6000806000831115156121e857600080fd5b82848115156121f357fe5b049050828481151561220157fe5b06818402018414151561221357600080fd5b8091505b5092915050565b60008082840190508381101580156122365750828110155b151561224157600080fd5b8091505b5092915050565b600082821115151561225d57600080fd5b81830390505b92915050565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015612335575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156123be57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401115b1561255357816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905061255d565b6000905061255d565b5b9392505050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561263157506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401115b1561273c57816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050612746565b60009050612746565b5b929150505600a165627a7a723058201356553e91196d85d4499c47a2fb9c93de7cfd30a3d20e8138bd455d90586c650029
Verified Source Code Partial Match
Compiler: v0.4.13+commit.0fb4cb1a
Optimization: No
PIXToken.sol 454 lines
pragma solidity ^0.4.13;
/**
* Overflow aware uint math functions.
*
* Inspired by https://github.com/MakerDAO/maker-otc/blob/master/contracts/simple_market.sol
*/
contract SafeMath {
//internals
function safeMul(uint a, uint b) internal returns (uint) {
uint c = a * b;
require(a == 0 || c / a == b);
return c;
}
function safeSub(uint a, uint b) internal returns (uint) {
require(b <= a);
return a - b;
}
function safeAdd(uint a, uint b) internal returns (uint) {
uint c = a + b;
require(c>=a && c>=b);
return c;
}
function safeDiv(uint a, uint b) internal returns (uint) {
require(b > 0);
uint c = a / b;
require(a == b * c + a % b);
return c;
}
}
/**
* ERC 20 token
*
* https://github.com/ethereum/EIPs/issues/20
*/
interface Token {
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) returns (bool success);
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) returns (bool success);
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/**
* ERC 20 token
*
* https://github.com/ethereum/EIPs/issues/20
*/
contract StandardToken is Token {
/**
* Reviewed:
* - Integer overflow = OK, checked
*/
function transfer(address _to, uint256 _value) returns (bool success) {
//Default assumes totalSupply can't be over max (2^256 - 1).
//If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
//Replace the if with this one instead.
if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
//if (balances[msg.sender] >= _value && _value > 0) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
} else { return false; }
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
//same as above. Replace this line with the following if you want to protect against wrapping uints.
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
//if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
balances[_to] += _value;
balances[_from] -= _value;
allowed[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
} else { return false; }
}
function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
function approve(address _spender, uint256 _value) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalSupply;
}
/**
* PIX crowdsale ICO contract.
*
* Security criteria evaluated against http://ethereum.stackexchange.com/questions/8551/methodological-security-review-of-a-smart-contract
*
*
*/
contract PIXToken is StandardToken, SafeMath {
string public name = "PIX Token";
string public symbol = "PIX";
// Initial founder address (set in constructor)
// This address is used as a controller address, in order to properly handle administration of the token.
address public founder = 0x0;
// Deposit Address - The funds will be sent here immediately after payments are made to the contract
address public deposit = 0x0;
/*
Multi-stage sale contract.
Notes:
All token sales are tied to USD. No token sales are for a fixed amount of Wei, this can shift and change over time.
Due to this, the following needs to be paid attention to:
1. The value of the token fluctuates in reference to the centsPerEth set on the contract.
2. The tokens are priced in cents. So all token purchases will be calculated out live at that time.
Funding Stages:
1. Pre-Sale, there will be 15M USD ( 125M tokens ) for sale. Bonus of 20%
2. Day 1 sale, there will be 20M USD - the pre-sale amount of tokens for sale. (~166.6m tokens - Pre-Sale tokens) Bonus of 15%
3. Day 2 sale, there will be 20M USD (~166.6m tokens) tokens for sale. Bonus of 10%
4. Days 3-10 sale, there will be 20M USD (~166.6m tokens) tokens for sale. Bonus of 5%
Post-Sale:
1. 30% of the total token count is reserved for release every year, at 1/4th of the originally reserved value per year.
2. 20% of the total token count [Minus the number of excess bonus tokens from the pre-sale] is issued out to the team when the sale has completed.
3. Purchased tokens come available to be withdrawn 31 days after the sale has completed.
*/
enum State { PreSale, Day1, Day2, Day3, Running, Halted } // the states through which this contract goes
State state;
// Pricing for the pre-sale in US Cents.
uint public capPreSale = 15 * 10**8; // 15M USD cap for pre-sale, this subtracts from day1 cap
uint public capDay1 = 20 * 10**8; // 20M USD cap for day 1
uint public capDay2 = 20 * 10**8; // 20M USD cap for day 2
uint public capDay3 = 20 * 10**8; // 20M USD cap for day 3 - 10
// Token pricing information
uint public weiPerEther = 10**18;
uint public centsPerEth = 23000;
uint public centsPerToken = 12;
// Amount of funds raised in stages of pre-sale
uint public raisePreSale = 0; // USD raise during the pre-sale period
uint public raiseDay1 = 0; // USD raised on Day 1
uint public raiseDay2 = 0; // USD raised on Day 2
uint public raiseDay3 = 0; // USD raised during days 3-10
// Block timing/contract unlocking information
uint public publicSaleStart = 1502280000; // Aug 9, 2017 Noon UTC
uint public day2Start = 1502366400; // Aug 10, 2017 Noon UTC
uint public day3Start = 1502452800; // Aug 11, 2017 Noon UTC
uint public saleEnd = 1503144000; // Aug 19, 2017 Noon UTC
uint public coinTradeStart = 1505822400; // Sep 19, 2017 Noon UTC
uint public year1Unlock = 1534680000; // Aug 19, 2018 Noon UTC
uint public year2Unlock = 1566216000; // Aug 19, 2019 Noon UTC
uint public year3Unlock = 1597838400; // Aug 19, 2020 Noon UTC
uint public year4Unlock = 1629374400; // Aug 19, 2021 Noon UTC
// Have the post-reward allocations been completed
bool public allocatedFounders = false;
bool public allocated1Year = false;
bool public allocated2Year = false;
bool public allocated3Year = false;
bool public allocated4Year = false;
// Token count information
uint public totalTokensSale = 500000000; //total number of tokens being sold in the ICO, excluding bonuses, reserve, and team distributions
uint public totalTokensReserve = 330000000;
uint public totalTokensCompany = 220000000;
bool public halted = false; //the founder address can set this to true to halt the crowdsale due to emergency.
mapping(address => uint256) presaleWhitelist; // Pre-sale Whitelist
event Buy(address indexed sender, uint eth, uint fbt);
event Withdraw(address indexed sender, address to, uint eth);
event AllocateTokens(address indexed sender);
function PIXToken(address depositAddress) {
/*
Initialize the contract with a sane set of owners
*/
founder = msg.sender; // Allocate the founder address as a usable address separate from deposit.
deposit = depositAddress; // Store the deposit address.
}
function setETHUSDRate(uint centsPerEthInput) public {
/*
Sets the current ETH/USD Exchange rate in cents. This modifies the token price in Wei.
*/
require(msg.sender == founder);
centsPerEth = centsPerEthInput;
}
/*
Gets the current state of the contract based on the block number involved in the current transaction.
*/
function getCurrentState() constant public returns (State) {
if(halted) return State.Halted;
else if(block.timestamp < publicSaleStart) return State.PreSale;
else if(block.timestamp > publicSaleStart && block.timestamp <= day2Start) return State.Day1;
else if(block.timestamp > day2Start && block.timestamp <= day3Start) return State.Day2;
else if(block.timestamp > day3Start && block.timestamp <= saleEnd) return State.Day3;
else return State.Running;
}
/*
Gets the current amount of bonus per purchase in percent.
*/
function getCurrentBonusInPercent() constant public returns (uint) {
State s = getCurrentState();
if (s == State.Halted) revert();
else if(s == State.PreSale) return 20;
else if(s == State.Day1) return 15;
else if(s == State.Day2) return 10;
else if(s == State.Day3) return 5;
else return 0;
}
/*
Get the current price of the token in WEI. This should be the weiPerEther/centsPerEth * centsPerToken
*/
function getTokenPriceInWEI() constant public returns (uint){
uint weiPerCent = safeDiv(weiPerEther, centsPerEth);
return safeMul(weiPerCent, centsPerToken);
}
/*
Entry point for purchasing for one's self.
*/
function buy() payable public {
buyRecipient(msg.sender);
}
/*
Main purchasing function for the contract
1. Should validate the current state, from the getCurrentState() function
2. Should only allow the founder to order during the pre-sale
3. Should correctly calculate the values to be paid out during different stages of the contract.
*/
function buyRecipient(address recipient) payable public {
State current_state = getCurrentState(); // Get the current state of the contract.
uint usdCentsRaise = safeDiv(safeMul(msg.value, centsPerEth), weiPerEther); // Get the current number of cents raised by the payment.
if(current_state == State.PreSale)
{
require (presaleWhitelist[msg.sender] > 0);
raisePreSale = safeAdd(raisePreSale, usdCentsRaise); //add current raise to pre-sell amount
require(raisePreSale < capPreSale && usdCentsRaise < presaleWhitelist[msg.sender]); //ensure pre-sale cap, 15m usd * 100 so we have cents
presaleWhitelist[msg.sender] = presaleWhitelist[msg.sender] - usdCentsRaise; // Remove the amount purchased from the pre-sale permitted for that user
}
else if (current_state == State.Day1)
{
raiseDay1 = safeAdd(raiseDay1, usdCentsRaise); //add current raise to pre-sell amount
require(raiseDay1 < (capDay1 - raisePreSale)); //ensure day 1 cap, which is lower by the amount we pre-sold
}
else if (current_state == State.Day2)
{
raiseDay2 = safeAdd(raiseDay2, usdCentsRaise); //add current raise to pre-sell amount
require(raiseDay2 < capDay2); //ensure day 2 cap
}
else if (current_state == State.Day3)
{
raiseDay3 = safeAdd(raiseDay3, usdCentsRaise); //add current raise to pre-sell amount
require(raiseDay3 < capDay3); //ensure day 3 cap
}
else revert();
uint tokens = safeDiv(msg.value, getTokenPriceInWEI()); // Calculate number of tokens to be paid out
uint bonus = safeDiv(safeMul(tokens, getCurrentBonusInPercent()), 100); // Calculate number of bonus tokens
if (current_state == State.PreSale) {
// Remove the extra 5% from the totalTokensCompany, in order to keep the 550m on track.
totalTokensCompany = safeSub(totalTokensCompany, safeDiv(bonus, 4));
}
uint totalTokens = safeAdd(tokens, bonus);
balances[recipient] = safeAdd(balances[recipient], totalTokens);
totalSupply = safeAdd(totalSupply, totalTokens);
deposit.transfer(msg.value); // Send deposited Ether to the deposit address on file.
Buy(recipient, msg.value, totalTokens);
}
/*
Allocate reserved and founders tokens based on the running time and state of the contract.
*/
function allocateReserveAndFounderTokens() {
require(msg.sender==founder);
require(getCurrentState() == State.Running);
uint tokens = 0;
if(block.timestamp > saleEnd && !allocatedFounders)
{
allocatedFounders = true;
tokens = totalTokensCompany;
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > year1Unlock && !allocated1Year)
{
allocated1Year = true;
tokens = safeDiv(totalTokensReserve, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > year2Unlock && !allocated2Year)
{
allocated2Year = true;
tokens = safeDiv(totalTokensReserve, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > year3Unlock && !allocated3Year)
{
allocated3Year = true;
tokens = safeDiv(totalTokensReserve, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > year4Unlock && !allocated4Year)
{
allocated4Year = true;
tokens = safeDiv(totalTokensReserve, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else revert();
AllocateTokens(msg.sender);
}
/**
* Emergency Stop ICO.
*
* Applicable tests:
*
* - Test unhalting, buying, and succeeding
*/
function halt() {
require(msg.sender==founder);
halted = true;
}
function unhalt() {
require(msg.sender==founder);
halted = false;
}
/*
Change founder address (Controlling address for contract)
*/
function changeFounder(address newFounder) {
require(msg.sender==founder);
founder = newFounder;
}
/*
Change deposit address (Address to which funds are deposited)
*/
function changeDeposit(address newDeposit) {
require(msg.sender==founder);
deposit = newDeposit;
}
/*
Add people to the pre-sale whitelist
Amount should be the value in USD that the purchaser is allowed to buy
IE: 100 is $100 is 10000 cents. The correct value to enter is 100
*/
function addPresaleWhitelist(address toWhitelist, uint256 amount){
require(msg.sender==founder && amount > 0);
presaleWhitelist[toWhitelist] = amount * 100;
}
/**
* ERC 20 Standard Token interface transfer function
*
* Prevent transfers until freeze period is over.
*
* Applicable tests:
*
* - Test restricted early transfer
* - Test transfer after restricted period
*/
function transfer(address _to, uint256 _value) returns (bool success) {
require(block.timestamp > coinTradeStart);
return super.transfer(_to, _value);
}
/**
* ERC 20 Standard Token interface transfer function
*
* Prevent transfers until freeze period is over.
*/
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
require(block.timestamp > coinTradeStart);
return super.transferFrom(_from, _to, _value);
}
function() payable {
buyRecipient(msg.sender);
}
}
Write Contract 51 functions
These functions modify contract state and require a wallet transaction to execute.
addPresaleWhitelist 0x51e22125
address toWhitelist
uint256 amount
allocateReserveAndFounderTokens 0x916891aa
No parameters
allocated1Year 0x86a3e0a7
No parameters
returns: bool
allocated2Year 0x1a8932d9
No parameters
returns: bool
allocated3Year 0x57bd2a65
No parameters
returns: bool
allocated4Year 0x36eec28e
No parameters
returns: bool
allocatedFounders 0xd3e73312
No parameters
returns: bool
allowance 0xdd62ed3e
address _owner
address _spender
returns: uint256
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
balanceOf 0x70a08231
address _owner
returns: uint256
buy 0xa6f2ae3a
No parameters
buyRecipient 0x11a4c710
address recipient
capDay1 0xbeb3a38f
No parameters
returns: uint256
capDay2 0xfd8ac8d0
No parameters
returns: uint256
capDay3 0xb5cb6a17
No parameters
returns: uint256
capPreSale 0xfdb914e2
No parameters
returns: uint256
centsPerEth 0xf288753d
No parameters
returns: uint256
centsPerToken 0x8f3b6b84
No parameters
returns: uint256
changeDeposit 0x0fdc3609
address newDeposit
changeFounder 0x93c32e06
address newFounder
coinTradeStart 0xbf604019
No parameters
returns: uint256
day2Start 0x21914e29
No parameters
returns: uint256
day3Start 0x3bf4ac5c
No parameters
returns: uint256
deposit 0xd0e30db0
No parameters
returns: address
founder 0x4d853ee5
No parameters
returns: address
getCurrentBonusInPercent 0x3a232c2d
No parameters
returns: uint256
getCurrentState 0x378aa701
No parameters
returns: uint8
getTokenPriceInWEI 0x42ea74c0
No parameters
returns: uint256
halt 0x5ed7ca5b
No parameters
halted 0xb9b8af0b
No parameters
returns: bool
name 0x06fdde03
No parameters
returns: string
publicSaleStart 0x3360caa0
No parameters
returns: uint256
raiseDay1 0x8b22e1df
No parameters
returns: uint256
raiseDay2 0xd01678f0
No parameters
returns: uint256
raiseDay3 0x9cc73a6f
No parameters
returns: uint256
raisePreSale 0x3ccf127e
No parameters
returns: uint256
saleEnd 0xc10b9358
No parameters
returns: uint256
setETHUSDRate 0x67821686
uint256 centsPerEthInput
symbol 0x95d89b41
No parameters
returns: string
totalSupply 0x18160ddd
No parameters
returns: uint256
totalTokensCompany 0x4d597b2d
No parameters
returns: uint256
totalTokensReserve 0x472fdb67
No parameters
returns: uint256
totalTokensSale 0x4f9b7bc8
No parameters
returns: uint256
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
unhalt 0xcb3e64fd
No parameters
weiPerEther 0xf7c58b62
No parameters
returns: uint256
year1Unlock 0xf25633dd
No parameters
returns: uint256
year2Unlock 0xe3d5e6a3
No parameters
returns: uint256
year3Unlock 0x458c9ca4
No parameters
returns: uint256
year4Unlock 0x0b851937
No parameters
returns: uint256
Recent Transactions
This address has 1 on-chain transactions, but only 1.2% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →