ETH Price: $2,061.90 (+5.55%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer49323602018-01-19 2:25:122960 days ago1516328712IN
0x78A0cFcf...84c8CdC8F
0.0111 ETH0.000091
Send To Address ...48713332018-01-07 22:38:032971 days ago1515364683IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0034897640
Send To Address ...48712722018-01-07 22:25:112971 days ago1515363911IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0034897640
Send To Address ...48712712018-01-07 22:25:062971 days ago1515363906IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0034897640
Send To Address ...48712482018-01-07 22:19:522971 days ago1515363592IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0034897640
Send To Address ...48712312018-01-07 22:16:232971 days ago1515363383IN
0x78A0cFcf...84c8CdC8F
0 ETH0.002615430
Send To Address ...48711932018-01-07 22:05:282971 days ago1515362728IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0009716440
__callback48707422018-01-07 20:10:552971 days ago1515355855IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0024271640
Transfer48707342018-01-07 20:08:302971 days ago1515355710IN
0x78A0cFcf...84c8CdC8F
0.168136 ETH0.0047929725
Transfer48705752018-01-07 19:29:582971 days ago1515353398IN
0x78A0cFcf...84c8CdC8F
0.177136 ETH0.00111353
Transfer48703112018-01-07 18:20:282971 days ago1515349228IN
0x78A0cFcf...84c8CdC8F
0.3368 ETH0.0045641435
__callback48701272018-01-07 17:35:502971 days ago1515346550IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0024271640
Transfer48701252018-01-07 17:35:162971 days ago1515346516IN
0x78A0cFcf...84c8CdC8F
0.02 ETH0.0040260921
Accept Ownership48700602018-01-07 17:20:042971 days ago1515345604IN
0x78A0cFcf...84c8CdC8F
0 ETH0.002214880
Transfer Ownersh...48700012018-01-07 17:04:242971 days ago1515344664IN
0x78A0cFcf...84c8CdC8F
0 ETH0.00537227121
Transfer48699002018-01-07 16:35:582971 days ago1515342958IN
0x78A0cFcf...84c8CdC8F
0.19 ETH0.01089121
__callback48696572018-01-07 15:34:112971 days ago1515339251IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0024271640
Transfer48696532018-01-07 15:33:462971 days ago1515339226IN
0x78A0cFcf...84c8CdC8F
0.05608585 ETH0.0047929725
Transfer48694512018-01-07 14:39:372971 days ago1515335977IN
0x78A0cFcf...84c8CdC8F
0.05 ETH0.003260125
__callback48693932018-01-07 14:24:582971 days ago1515335098IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0024271640
Transfer48693902018-01-07 14:24:132971 days ago1515335053IN
0x78A0cFcf...84c8CdC8F
0.08 ETH0.0037761225
Transfer48686572018-01-07 11:08:012972 days ago1515323281IN
0x78A0cFcf...84c8CdC8F
2 ETH0.00132363
Transfer48684752018-01-07 10:19:212972 days ago1515320361IN
0x78A0cFcf...84c8CdC8F
0.17769 ETH0.00115555
Transfer48684182018-01-07 10:04:072972 days ago1515319447IN
0x78A0cFcf...84c8CdC8F
0.078845 ETH0.00115555
__callback48681892018-01-07 9:06:052972 days ago1515315965IN
0x78A0cFcf...84c8CdC8F
0 ETH0.0024271640
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer49323602018-01-19 2:25:122960 days ago1516328712
0x78A0cFcf...84c8CdC8F
0.0080092 ETH
Transfer48707342018-01-07 20:08:302971 days ago1515355710
0x78A0cFcf...84c8CdC8F
0.15531155 ETH
Transfer48707342018-01-07 20:08:302971 days ago1515355710
0x78A0cFcf...84c8CdC8F
0.00480345 ETH
Transfer48707342018-01-07 20:08:302971 days ago1515355710
0x78A0cFcf...84c8CdC8F
0.008021 ETH
Transfer48703112018-01-07 18:20:282971 days ago1515349228
0x78A0cFcf...84c8CdC8F
0.326696 ETH
Transfer48703112018-01-07 18:20:282971 days ago1515349228
0x78A0cFcf...84c8CdC8F
0.010104 ETH
Transfer48701252018-01-07 17:35:162971 days ago1515346516
0x78A0cFcf...84c8CdC8F
0.01161963 ETH
Transfer48701252018-01-07 17:35:162971 days ago1515346516
0x78A0cFcf...84c8CdC8F
0.00035937 ETH
Transfer48701252018-01-07 17:35:162971 days ago1515346516
0x78A0cFcf...84c8CdC8F
0.008021 ETH
Transfer48699002018-01-07 16:35:582971 days ago1515342958
0x78A0cFcf...84c8CdC8F
0.008021 ETH
Transfer48696532018-01-07 15:33:462971 days ago1515339226
0x78A0cFcf...84c8CdC8F
0.0466229 ETH
Transfer48696532018-01-07 15:33:462971 days ago1515339226
0x78A0cFcf...84c8CdC8F
0.00144194 ETH
Transfer48696532018-01-07 15:33:462971 days ago1515339226
0x78A0cFcf...84c8CdC8F
0.008021 ETH
Transfer48694512018-01-07 14:39:372971 days ago1515335977
0x78A0cFcf...84c8CdC8F
0.0485 ETH
Transfer48694512018-01-07 14:39:372971 days ago1515335977
0x78A0cFcf...84c8CdC8F
0.0015 ETH
Transfer48693902018-01-07 14:24:132971 days ago1515335053
0x78A0cFcf...84c8CdC8F
0.06981963 ETH
Transfer48693902018-01-07 14:24:132971 days ago1515335053
0x78A0cFcf...84c8CdC8F
0.00215937 ETH
Transfer48693902018-01-07 14:24:132971 days ago1515335053
0x78A0cFcf...84c8CdC8F
0.008021 ETH
Transfer48681872018-01-07 9:05:402972 days ago1515315940
0x78A0cFcf...84c8CdC8F
0.27674973 ETH
Transfer48681872018-01-07 9:05:402972 days ago1515315940
0x78A0cFcf...84c8CdC8F
0.00855927 ETH
Transfer48681872018-01-07 9:05:402972 days ago1515315940
0x78A0cFcf...84c8CdC8F
0.008021 ETH
Transfer48679012018-01-07 7:58:152972 days ago1515311895
0x78A0cFcf...84c8CdC8F
1.93221963 ETH
Transfer48679012018-01-07 7:58:152972 days ago1515311895
0x78A0cFcf...84c8CdC8F
0.05975937 ETH
Transfer48679012018-01-07 7:58:152972 days ago1515311895
0x78A0cFcf...84c8CdC8F
0.008021 ETH
Transfer48676592018-01-07 6:49:282972 days ago1515307768
0x78A0cFcf...84c8CdC8F
1.90311963 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xab76BB81...B53E15725
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
NodePhases

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2017-12-04
*/

pragma solidity ^0.4.15;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
    function mul(uint256 a, uint256 b) internal constant returns (uint256) {
        uint256 c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) internal constant returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }

    function sub(uint256 a, uint256 b) internal constant returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    function add(uint256 a, uint256 b) internal constant returns (uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
    }
}

contract OraclizeI {
    address public cbAddress;
    function query(uint _timestamp, string _datasource, string _arg) payable returns (bytes32 _id);
    function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) payable returns (bytes32 _id);
    function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) payable returns (bytes32 _id);
    function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) payable returns (bytes32 _id);
    function queryN(uint _timestamp, string _datasource, bytes _argN) payable returns (bytes32 _id);
    function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) payable returns (bytes32 _id);
    function getPrice(string _datasource) returns (uint _dsprice);
    function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice);
    function useCoupon(string _coupon);
    function setProofType(byte _proofType);
    function setConfig(bytes32 _config);
    function setCustomGasPrice(uint _gasPrice);
    function randomDS_getSessionPubKeyHash() returns(bytes32);
}
contract OraclizeAddrResolverI {
    function getAddress() returns (address _addr);
}
contract usingOraclize {
    uint constant day = 60*60*24;
    uint constant week = 60*60*24*7;
    uint constant month = 60*60*24*30;
    byte constant proofType_NONE = 0x00;
    byte constant proofType_TLSNotary = 0x10;
    byte constant proofType_Android = 0x20;
    byte constant proofType_Ledger = 0x30;
    byte constant proofType_Native = 0xF0;
    byte constant proofStorage_IPFS = 0x01;
    uint8 constant networkID_auto = 0;
    uint8 constant networkID_mainnet = 1;
    uint8 constant networkID_testnet = 2;
    uint8 constant networkID_morden = 2;
    uint8 constant networkID_consensys = 161;

    OraclizeAddrResolverI OAR;

    OraclizeI oraclize;
    modifier oraclizeAPI {
        if((address(OAR)==0)||(getCodeSize(address(OAR))==0)) oraclize_setNetwork(networkID_auto);
        oraclize = OraclizeI(OAR.getAddress());
        _;
    }
    modifier coupon(string code){
        oraclize = OraclizeI(OAR.getAddress());
        oraclize.useCoupon(code);
        _;
    }

    function oraclize_setNetwork(uint8) internal returns(bool){
//    function oraclize_setNetwork(uint8 networkID) internal returns(bool){
        if (getCodeSize(0x1d3B2638a7cC9f2CB3D298A3DA7a90B67E5506ed)>0){ //mainnet
            OAR = OraclizeAddrResolverI(0x1d3B2638a7cC9f2CB3D298A3DA7a90B67E5506ed);
            oraclize_setNetworkName("eth_mainnet");
            return true;
        }
        if (getCodeSize(0xc03A2615D5efaf5F49F60B7BB6583eaec212fdf1)>0){ //ropsten testnet
            OAR = OraclizeAddrResolverI(0xc03A2615D5efaf5F49F60B7BB6583eaec212fdf1);
            oraclize_setNetworkName("eth_ropsten3");
            return true;
        }
        if (getCodeSize(0xB7A07BcF2Ba2f2703b24C0691b5278999C59AC7e)>0){ //kovan testnet
            OAR = OraclizeAddrResolverI(0xB7A07BcF2Ba2f2703b24C0691b5278999C59AC7e);
            oraclize_setNetworkName("eth_kovan");
            return true;
        }
        if (getCodeSize(0x146500cfd35B22E4A392Fe0aDc06De1a1368Ed48)>0){ //rinkeby testnet
            OAR = OraclizeAddrResolverI(0x146500cfd35B22E4A392Fe0aDc06De1a1368Ed48);
            oraclize_setNetworkName("eth_rinkeby");
            return true;
        }
        if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475)>0){ //ethereum-bridge
            OAR = OraclizeAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475);
            return true;
        }
        if (getCodeSize(0x20e12A1F859B3FeaE5Fb2A0A32C18F5a65555bBF)>0){ //ether.camp ide
            OAR = OraclizeAddrResolverI(0x20e12A1F859B3FeaE5Fb2A0A32C18F5a65555bBF);
            return true;
        }
        if (getCodeSize(0x51efaF4c8B3C9AfBD5aB9F4bbC82784Ab6ef8fAA)>0){ //browser-solidity
            OAR = OraclizeAddrResolverI(0x51efaF4c8B3C9AfBD5aB9F4bbC82784Ab6ef8fAA);
            return true;
        }
        return false;
    }

    function __callback(bytes32 myid, string result) {
        __callback(myid, result, new bytes(0));
    }
    function __callback(bytes32, string, bytes) {
//    function __callback(bytes32 myid, string result, bytes proof) {
    }

    function oraclize_useCoupon(string code) oraclizeAPI internal {
        oraclize.useCoupon(code);
    }

    function oraclize_getPrice(string datasource) oraclizeAPI internal returns (uint){
        return oraclize.getPrice(datasource);
    }

    function oraclize_getPrice(string datasource, uint gaslimit) oraclizeAPI internal returns (uint){
        return oraclize.getPrice(datasource, gaslimit);
    }

    function oraclize_query(string datasource, string arg) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query.value(price)(0, datasource, arg);
    }
    function oraclize_query(uint timestamp, string datasource, string arg) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query.value(price)(timestamp, datasource, arg);
    }
    function oraclize_query(uint timestamp, string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query_withGasLimit.value(price)(timestamp, datasource, arg, gaslimit);
    }
    function oraclize_query(string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query_withGasLimit.value(price)(0, datasource, arg, gaslimit);
    }
    function oraclize_query(string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query2.value(price)(0, datasource, arg1, arg2);
    }
    function oraclize_query(uint timestamp, string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query2.value(price)(timestamp, datasource, arg1, arg2);
    }
    function oraclize_query(uint timestamp, string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query2_withGasLimit.value(price)(timestamp, datasource, arg1, arg2, gaslimit);
    }
    function oraclize_query(string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query2_withGasLimit.value(price)(0, datasource, arg1, arg2, gaslimit);
    }
    function oraclize_query(string datasource, string[] argN) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        bytes memory args = stra2cbor(argN);
        return oraclize.queryN.value(price)(0, datasource, args);
    }
    function oraclize_query(uint timestamp, string datasource, string[] argN) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        bytes memory args = stra2cbor(argN);
        return oraclize.queryN.value(price)(timestamp, datasource, args);
    }
    function oraclize_query(uint timestamp, string datasource, string[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        bytes memory args = stra2cbor(argN);
        return oraclize.queryN_withGasLimit.value(price)(timestamp, datasource, args, gaslimit);
    }
    function oraclize_query(string datasource, string[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        bytes memory args = stra2cbor(argN);
        return oraclize.queryN_withGasLimit.value(price)(0, datasource, args, gaslimit);
    }
    function oraclize_query(string datasource, string[1] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](1);
        dynargs[0] = args[0];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[1] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](1);
        dynargs[0] = args[0];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](1);
        dynargs[0] = args[0];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](1);
        dynargs[0] = args[0];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_query(string datasource, string[2] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[2] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[3] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[3] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_query(string datasource, string[4] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[4] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[5] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[5] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[] argN) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        bytes memory args = ba2cbor(argN);
        return oraclize.queryN.value(price)(0, datasource, args);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[] argN) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        bytes memory args = ba2cbor(argN);
        return oraclize.queryN.value(price)(timestamp, datasource, args);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        bytes memory args = ba2cbor(argN);
        return oraclize.queryN_withGasLimit.value(price)(timestamp, datasource, args, gaslimit);
    }
    function oraclize_query(string datasource, bytes[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        bytes memory args = ba2cbor(argN);
        return oraclize.queryN_withGasLimit.value(price)(0, datasource, args, gaslimit);
    }
    function oraclize_query(string datasource, bytes[1] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](1);
        dynargs[0] = args[0];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[1] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](1);
        dynargs[0] = args[0];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](1);
        dynargs[0] = args[0];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](1);
        dynargs[0] = args[0];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_query(string datasource, bytes[2] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[2] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[3] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[3] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_query(string datasource, bytes[4] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[4] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[5] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[5] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_cbAddress() oraclizeAPI internal returns (address){
        return oraclize.cbAddress();
    }
    function oraclize_setProof(byte proofP) oraclizeAPI internal {
        return oraclize.setProofType(proofP);
    }
    function oraclize_setCustomGasPrice(uint gasPrice) oraclizeAPI internal {
        return oraclize.setCustomGasPrice(gasPrice);
    }
    function oraclize_setConfig(bytes32 config) oraclizeAPI internal {
        return oraclize.setConfig(config);
    }

    function oraclize_randomDS_getSessionPubKeyHash() oraclizeAPI internal returns (bytes32){
        return oraclize.randomDS_getSessionPubKeyHash();
    }

    function getCodeSize(address _addr) constant internal returns(uint _size) {
        assembly {
        _size := extcodesize(_addr)
        }
    }

    function parseAddr(string _a) internal returns (address){
        bytes memory tmp = bytes(_a);
        uint160 iaddr = 0;
        uint160 b1;
        uint160 b2;
        for (uint i=2; i<2+2*20; i+=2){
            iaddr *= 256;
            b1 = uint160(tmp[i]);
            b2 = uint160(tmp[i+1]);
            if ((b1 >= 97)&&(b1 <= 102)) b1 -= 87;
            else if ((b1 >= 65)&&(b1 <= 70)) b1 -= 55;
            else if ((b1 >= 48)&&(b1 <= 57)) b1 -= 48;
            if ((b2 >= 97)&&(b2 <= 102)) b2 -= 87;
            else if ((b2 >= 65)&&(b2 <= 70)) b2 -= 55;
            else if ((b2 >= 48)&&(b2 <= 57)) b2 -= 48;
            iaddr += (b1*16+b2);
        }
        return address(iaddr);
    }

    function strCompare(string _a, string _b) internal returns (int) {
        bytes memory a = bytes(_a);
        bytes memory b = bytes(_b);
        uint minLength = a.length;
        if (b.length < minLength) minLength = b.length;
        for (uint i = 0; i < minLength; i ++)
        if (a[i] < b[i])
        return -1;
        else if (a[i] > b[i])
        return 1;
        if (a.length < b.length)
        return -1;
        else if (a.length > b.length)
        return 1;
        else
        return 0;
    }

    function indexOf(string _haystack, string _needle) internal returns (int) {
        bytes memory h = bytes(_haystack);
        bytes memory n = bytes(_needle);
        if(h.length < 1 || n.length < 1 || (n.length > h.length))
        return -1;
        else if(h.length > (2**128 -1))
        return -1;
        else
        {
            uint subindex = 0;
            for (uint i = 0; i < h.length; i ++)
            {
                if (h[i] == n[0])
                {
                    subindex = 1;
                    while(subindex < n.length && (i + subindex) < h.length && h[i + subindex] == n[subindex])
                    {
                        subindex++;
                    }
                    if(subindex == n.length)
                    return int(i);
                }
            }
            return -1;
        }
    }

    function strConcat(string _a, string _b, string _c, string _d, string _e) internal returns (string) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory _bc = bytes(_c);
        bytes memory _bd = bytes(_d);
        bytes memory _be = bytes(_e);
        string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);
        bytes memory babcde = bytes(abcde);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
        for (i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
        for (i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
        for (i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
        for (i = 0; i < _be.length; i++) babcde[k++] = _be[i];
        return string(babcde);
    }

    function strConcat(string _a, string _b, string _c, string _d) internal returns (string) {
        return strConcat(_a, _b, _c, _d, "");
    }

    function strConcat(string _a, string _b, string _c) internal returns (string) {
        return strConcat(_a, _b, _c, "", "");
    }

    function strConcat(string _a, string _b) internal returns (string) {
        return strConcat(_a, _b, "", "", "");
    }

    // parseInt
    function parseInt(string _a) internal returns (uint) {
        return parseInt(_a, 0);
    }

    // parseInt(parseFloat*10^_b)
    function parseInt(string _a, uint _b) internal returns (uint) {
        bytes memory bresult = bytes(_a);
        uint mint = 0;
        bool decimals = false;
        for (uint i=0; i<bresult.length; i++){
            if ((bresult[i] >= 48)&&(bresult[i] <= 57)){
                if (decimals){
                    if (_b == 0) break;
                    else _b--;
                }
                mint *= 10;
                mint += uint(bresult[i]) - 48;
            } else if (bresult[i] == 46) decimals = true;
        }
        if (_b > 0) mint *= 10**_b;
        return mint;
    }

    function uint2str(uint i) internal returns (string){
        if (i == 0) return "0";
        uint j = i;
        uint len;
        while (j != 0){
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (i != 0){
            bstr[k--] = byte(48 + i % 10);
            i /= 10;
        }
        return string(bstr);
    }

    function stra2cbor(string[] arr) internal returns (bytes) {
        uint arrlen = arr.length;

        // get correct cbor output length
        uint outputlen = 0;
        bytes[] memory elemArray = new bytes[](arrlen);
        for (uint i = 0; i < arrlen; i++) {
            elemArray[i] = (bytes(arr[i]));
            outputlen += elemArray[i].length + (elemArray[i].length - 1)/23 + 3; //+3 accounts for paired identifier types
        }
        uint ctr = 0;
        uint cborlen = arrlen + 0x80;
        outputlen += byte(cborlen).length;
        bytes memory res = new bytes(outputlen);

        while (byte(cborlen).length > ctr) {
            res[ctr] = byte(cborlen)[ctr];
            ctr++;
        }
        for (i = 0; i < arrlen; i++) {
            res[ctr] = 0x5F;
            ctr++;
            for (uint x = 0; x < elemArray[i].length; x++) {
                // if there's a bug with larger strings, this may be the culprit
                if (x % 23 == 0) {
                    uint elemcborlen = elemArray[i].length - x >= 24 ? 23 : elemArray[i].length - x;
                    elemcborlen += 0x40;
                    uint lctr = ctr;
                    while (byte(elemcborlen).length > ctr - lctr) {
                        res[ctr] = byte(elemcborlen)[ctr - lctr];
                        ctr++;
                    }
                }
                res[ctr] = elemArray[i][x];
                ctr++;
            }
            res[ctr] = 0xFF;
            ctr++;
        }
        return res;
    }

    function ba2cbor(bytes[] arr) internal returns (bytes) {
        uint arrlen = arr.length;

        // get correct cbor output length
        uint outputlen = 0;
        bytes[] memory elemArray = new bytes[](arrlen);
        for (uint i = 0; i < arrlen; i++) {
            elemArray[i] = (bytes(arr[i]));
            outputlen += elemArray[i].length + (elemArray[i].length - 1)/23 + 3; //+3 accounts for paired identifier types
        }
        uint ctr = 0;
        uint cborlen = arrlen + 0x80;
        outputlen += byte(cborlen).length;
        bytes memory res = new bytes(outputlen);

        while (byte(cborlen).length > ctr) {
            res[ctr] = byte(cborlen)[ctr];
            ctr++;
        }
        for (i = 0; i < arrlen; i++) {
            res[ctr] = 0x5F;
            ctr++;
            for (uint x = 0; x < elemArray[i].length; x++) {
                // if there's a bug with larger strings, this may be the culprit
                if (x % 23 == 0) {
                    uint elemcborlen = elemArray[i].length - x >= 24 ? 23 : elemArray[i].length - x;
                    elemcborlen += 0x40;
                    uint lctr = ctr;
                    while (byte(elemcborlen).length > ctr - lctr) {
                        res[ctr] = byte(elemcborlen)[ctr - lctr];
                        ctr++;
                    }
                }
                res[ctr] = elemArray[i][x];
                ctr++;
            }
            res[ctr] = 0xFF;
            ctr++;
        }
        return res;
    }


    string oraclize_network_name;
    function oraclize_setNetworkName(string _network_name) internal {
        oraclize_network_name = _network_name;
    }

    function oraclize_getNetworkName() internal returns (string) {
        return oraclize_network_name;
    }

    function oraclize_newRandomDSQuery(uint _delay, uint _nbytes, uint _customGasLimit) internal returns (bytes32){
//        if ((_nbytes == 0)||(_nbytes > 32)) throw;
        require(_nbytes != 0 && _nbytes < 32);
        bytes memory nbytes = new bytes(1);
        nbytes[0] = byte(_nbytes);
        bytes memory unonce = new bytes(32);
        bytes memory sessionKeyHash = new bytes(32);
        bytes32 sessionKeyHash_bytes32 = oraclize_randomDS_getSessionPubKeyHash();
        assembly {
        mstore(unonce, 0x20)
        mstore(add(unonce, 0x20), xor(blockhash(sub(number, 1)), xor(coinbase, timestamp)))
        mstore(sessionKeyHash, 0x20)
        mstore(add(sessionKeyHash, 0x20), sessionKeyHash_bytes32)
        }
        bytes[3] memory args = [unonce, nbytes, sessionKeyHash];
        bytes32 queryId = oraclize_query(_delay, "random", args, _customGasLimit);
        oraclize_randomDS_setCommitment(queryId, sha3(bytes8(_delay), args[1], sha256(args[0]), args[2]));
        return queryId;
    }

    function oraclize_randomDS_setCommitment(bytes32 queryId, bytes32 commitment) internal {
        oraclize_randomDS_args[queryId] = commitment;
    }

    mapping(bytes32=>bytes32) oraclize_randomDS_args;
    mapping(bytes32=>bool) oraclize_randomDS_sessionKeysHashVerified;

    function verifySig(bytes32 tosignh, bytes dersig, bytes pubkey) internal returns (bool){
        bool sigok;
        address signer;

        bytes32 sigr;
        bytes32 sigs;

        bytes memory sigr_ = new bytes(32);
        uint offset = 4+(uint(dersig[3]) - 0x20);
        sigr_ = copyBytes(dersig, offset, 32, sigr_, 0);
        bytes memory sigs_ = new bytes(32);
        offset += 32 + 2;
        sigs_ = copyBytes(dersig, offset+(uint(dersig[offset-1]) - 0x20), 32, sigs_, 0);

        assembly {
        sigr := mload(add(sigr_, 32))
        sigs := mload(add(sigs_, 32))
        }


        (sigok, signer) = safer_ecrecover(tosignh, 27, sigr, sigs);
        if (address(sha3(pubkey)) == signer) return true;
        else {
            (sigok, signer) = safer_ecrecover(tosignh, 28, sigr, sigs);
            return (address(sha3(pubkey)) == signer);
        }
    }

    function oraclize_randomDS_proofVerify__sessionKeyValidity(bytes proof, uint sig2offset) internal returns (bool) {
        bool sigok;

        // Step 6: verify the attestation signature, APPKEY1 must sign the sessionKey from the correct ledger app (CODEHASH)
        bytes memory sig2 = new bytes(uint(proof[sig2offset+1])+2);
        copyBytes(proof, sig2offset, sig2.length, sig2, 0);

        bytes memory appkey1_pubkey = new bytes(64);
        copyBytes(proof, 3+1, 64, appkey1_pubkey, 0);

        bytes memory tosign2 = new bytes(1+65+32);
//        tosign2[0] = 1; //role
        tosign2[0] = 0x1; //role
        copyBytes(proof, sig2offset-65, 65, tosign2, 1);
        bytes memory CODEHASH = hex"fd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c";
        copyBytes(CODEHASH, 0, 32, tosign2, 1+65);
        sigok = verifySig(sha256(tosign2), sig2, appkey1_pubkey);

        if (sigok == false) return false;


        // Step 7: verify the APPKEY1 provenance (must be signed by Ledger)
        bytes memory LEDGERKEY = hex"7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e8537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e4";

        bytes memory tosign3 = new bytes(1+65);
        tosign3[0] = 0xFE;
        copyBytes(proof, 3, 65, tosign3, 1);

        bytes memory sig3 = new bytes(uint(proof[3+65+1])+2);
        copyBytes(proof, 3+65, sig3.length, sig3, 0);

        sigok = verifySig(sha256(tosign3), sig3, LEDGERKEY);

        return sigok;
    }

    modifier oraclize_randomDS_proofVerify(bytes32 _queryId, string _result, bytes _proof) {
        // Step 1: the prefix has to match 'LP\x01' (Ledger Proof version 1)
//        if ((_proof[0] != "L")||(_proof[1] != "P")||(_proof[2] != 1)) throw;
        require(_proof[0] == "L" && _proof[1] == "P" && _proof[2] == 1);

        bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName());
//        if (proofVerified == false) throw;
        require(proofVerified == true);

        _;
    }

    function oraclize_randomDS_proofVerify__returnCode(bytes32 _queryId, string _result, bytes _proof) internal returns (uint8){
        // Step 1: the prefix has to match 'LP\x01' (Ledger Proof version 1)
        if ((_proof[0] != "L")||(_proof[1] != "P")||(_proof[2] != 1)) return 1;

        bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName());
        if (proofVerified == false) return 2;

        return 0;
    }

    function matchBytes32Prefix(bytes32 content, bytes prefix) internal returns (bool){
        bool match_ = true;

//        for (var i=0; i<prefix.length; i++){
        for (var i=uint8(0); i<prefix.length; i++){
            if (content[i] != prefix[i]) match_ = false;
        }

        return match_;
    }

    function oraclize_randomDS_proofVerify__main(bytes proof, bytes32 queryId, bytes result, string context_name) internal returns (bool){
        bool checkok;


        // Step 2: the unique keyhash has to match with the sha256 of (context name + queryId)
        uint ledgerProofLength = 3+65+(uint(proof[3+65+1])+2)+32;
        bytes memory keyhash = new bytes(32);
        copyBytes(proof, ledgerProofLength, 32, keyhash, 0);
        checkok = (sha3(keyhash) == sha3(sha256(context_name, queryId)));
        if (checkok == false) return false;

        bytes memory sig1 = new bytes(uint(proof[ledgerProofLength+(32+8+1+32)+1])+2);
        copyBytes(proof, ledgerProofLength+(32+8+1+32), sig1.length, sig1, 0);


        // Step 3: we assume sig1 is valid (it will be verified during step 5) and we verify if 'result' is the prefix of sha256(sig1)
        checkok = matchBytes32Prefix(sha256(sig1), result);
        if (checkok == false) return false;


        // Step 4: commitment match verification, sha3(delay, nbytes, unonce, sessionKeyHash) == commitment in storage.
        // This is to verify that the computed args match with the ones specified in the query.
        bytes memory commitmentSlice1 = new bytes(8+1+32);
        copyBytes(proof, ledgerProofLength+32, 8+1+32, commitmentSlice1, 0);

        bytes memory sessionPubkey = new bytes(64);
        uint sig2offset = ledgerProofLength+32+(8+1+32)+sig1.length+65;
        copyBytes(proof, sig2offset-64, 64, sessionPubkey, 0);

        bytes32 sessionPubkeyHash = sha256(sessionPubkey);
        if (oraclize_randomDS_args[queryId] == sha3(commitmentSlice1, sessionPubkeyHash)){ //unonce, nbytes and sessionKeyHash match
            delete oraclize_randomDS_args[queryId];
        } else return false;


        // Step 5: validity verification for sig1 (keyhash and args signed with the sessionKey)
        bytes memory tosign1 = new bytes(32+8+1+32);
        copyBytes(proof, ledgerProofLength, 32+8+1+32, tosign1, 0);
        checkok = verifySig(sha256(tosign1), sig1, sessionPubkey);
        if (checkok == false) return false;

        // verify if sessionPubkeyHash was verified already, if not.. let's do it!
        if (oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash] == false){
            oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash] = oraclize_randomDS_proofVerify__sessionKeyValidity(proof, sig2offset);
        }

        return oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash];
    }


    // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
    function copyBytes(bytes from, uint fromOffset, uint length, bytes to, uint toOffset) internal returns (bytes) {
        uint minLength = length + toOffset;

//        if (to.length < minLength) {
            // Buffer too small
//            throw; // Should be a better way?
//        }
        require(to.length > minLength);

        // NOTE: the offset 32 is added to skip the `size` field of both bytes variables
        uint i = 32 + fromOffset;
        uint j = 32 + toOffset;

        while (i < (32 + fromOffset + length)) {
            assembly {
            let tmp := mload(add(from, i))
            mstore(add(to, j), tmp)
            }
            i += 32;
            j += 32;
        }

        return to;
    }

    // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
    // Duplicate Solidity's ecrecover, but catching the CALL return value
    function safer_ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal returns (bool, address) {
        // We do our own memory management here. Solidity uses memory offset
        // 0x40 to store the current end of memory. We write past it (as
        // writes are memory extensions), but don't update the offset so
        // Solidity will reuse it. The memory used here is only needed for
        // this context.

        // FIXME: inline assembly can't access return values
        bool ret;
        address addr;

        assembly {
        let size := mload(0x40)
        mstore(size, hash)
        mstore(add(size, 32), v)
        mstore(add(size, 64), r)
        mstore(add(size, 96), s)

        // NOTE: we can reuse the request memory because we deal with
        //       the return code
        ret := call(3000, 1, 0, size, 128, size, 32)
        addr := mload(size)
        }

        return (ret, addr);
    }

    // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
    function ecrecovery(bytes32 hash, bytes sig) internal returns (bool, address) {
        bytes32 r;
        bytes32 s;
        uint8 v;

        if (sig.length != 65)
        return (false, 0);

        // The signature format is a compact form of:
        //   {bytes32 r}{bytes32 s}{uint8 v}
        // Compact means, uint8 is not padded to 32 bytes.
        assembly {
        r := mload(add(sig, 32))
        s := mload(add(sig, 64))

        // Here we are loading the last 32 bytes. We exploit the fact that
        // 'mload' will pad with zeroes if we overread.
        // There is no 'mload8' to do this, but that would be nicer.
        v := byte(0, mload(add(sig, 96)))

        // Alternative solution:
        // 'byte' is not working due to the Solidity parser, so lets
        // use the second best option, 'and'
        // v := and(mload(add(sig, 65)), 255)
    }

// albeit non-transactional signatures are not specified by the YP, one would expect it
// to match the YP range of [27, 28]
//
// geth uses [0, 1] and some clients have followed. This might change, see:
//  https://github.com/ethereum/go-ethereum/issues/2053
if (v < 27)
v += 27;

if (v != 27 && v != 28)
return (false, 0);

return safer_ecrecover(hash, v, r, s);
}

}
// </ORACLIZE_API>
/* solhint-enable */

contract Ownable {
    //Variables
    address public owner;

    address public newOwner;

    //    Modifiers
    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    function Ownable() public {
        owner = msg.sender;
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param _newOwner The address to transfer ownership to.
     */
    function transferOwnership(address _newOwner) public onlyOwner {
        require(_newOwner != address(0));
        newOwner = _newOwner;
    }

    function acceptOwnership() public {
        if (msg.sender == newOwner) {
            owner = newOwner;
        }
    }
}

contract TokenRecipient {
    function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public;
}


contract ERC20 is Ownable {

    using SafeMath for uint256;

    /* Public variables of the token */
    string public standard;

    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public initialSupply;

    bool public locked;

    uint256 public creationBlock;

    mapping (address => uint256) public balances;

    mapping (address => mapping (address => uint256)) public allowance;

    /* This generates a public event on the blockchain that will notify clients */
    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed _owner, address indexed _spender, uint _value);

    modifier onlyPayloadSize(uint numwords) {
        assert(msg.data.length == numwords.mul(32).add(4));
        _;
    }

    /* Initializes contract with initial supply tokens to the creator of the contract */
    function ERC20(
        uint256 _initialSupply,
        string _tokenName,
        uint8 _decimalUnits,
        string _tokenSymbol,
        bool _transferAllSupplyToOwner,
        bool _locked
    ) {
        standard = "ERC20 0.1";

        initialSupply = _initialSupply;

        if (_transferAllSupplyToOwner) {
            setBalance(msg.sender, initialSupply);
        } else {
            setBalance(this, initialSupply);
        }

        name = _tokenName;
        // Set the name for display purposes
        symbol = _tokenSymbol;
        // Set the symbol for display purposes
        decimals = _decimalUnits;
        // Amount of decimals for display purposes
        locked = _locked;
        creationBlock = block.number;
    }

    /* public methods */
    function totalSupply() public constant returns (uint256) {
        return initialSupply;
    }

    function balanceOf(address _address) public constant returns (uint256) {
        return balances[_address];
    }

    function transfer(address _to, uint256 _value) public onlyPayloadSize(2) returns (bool) {
        require(locked == false);

        bool status = transferInternal(msg.sender, _to, _value);

        require(status == true);

        return true;
    }

    function approve(address _spender, uint256 _value) public returns (bool success) {
        if (locked) {
            return false;
        }

        allowance[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);

        return true;
    }

    function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
        if (locked) {
            return false;
        }

        TokenRecipient spender = TokenRecipient(_spender);

        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, this, _extraData);
            return true;
        }
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        if (locked) {
            return false;
        }

        if (allowance[_from][msg.sender] < _value) {
            return false;
        }

        bool _success = transferInternal(_from, _to, _value);

        if (_success) {
            allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
        }

        return _success;
    }

    /* internal balances */
    function setBalance(address _holder, uint256 _amount) internal {
        balances[_holder] = _amount;
    }

    function transferInternal(address _from, address _to, uint256 _value) internal returns (bool success) {
        if (_value == 0) {
            Transfer(_from, _to, 0);
            return true;
        }

        if (balances[_from] < _value) {
            return false;
        }

        setBalance(_from, balances[_from].sub(_value));
        setBalance(_to, balances[_to].add(_value));

        Transfer(_from, _to, _value);

        return true;
    }

}

contract MintingERC20 is ERC20 {

    using SafeMath for uint256;

    uint256 public maxSupply;

    mapping (address => bool) public minters;

    modifier onlyMinters () {
        require(true == minters[msg.sender]);
        _;
    }

    function MintingERC20(
        uint256 _initialSupply,
        uint256 _maxSupply,
        string _tokenName,
        uint8 _decimals,
        string _symbol,
        bool _transferAllSupplyToOwner,
        bool _locked
    )
        ERC20(_initialSupply, _tokenName, _decimals, _symbol, _transferAllSupplyToOwner, _locked)
    {
        minters[msg.sender] = true;
        maxSupply = _maxSupply;
    }

    function addMinter(address _newMinter) public onlyOwner {
        minters[_newMinter] = true;
    }

    function removeMinter(address _minter) public onlyOwner {
        minters[_minter] = false;
    }

    function mint(address _addr, uint256 _amount) public onlyMinters returns (uint256) {
        if (_amount == uint256(0)) {
            return uint256(0);
        }

        if (totalSupply().add(_amount) > maxSupply) {
            return uint256(0);
        }

        initialSupply = initialSupply.add(_amount);
        balances[_addr] = balances[_addr].add(_amount);
        Transfer(0, _addr, _amount);

        return _amount;
    }
}

contract Node is MintingERC20 {

    using SafeMath for uint256;

    NodePhases public nodePhases;

    // Block token transfers till ICO end.
    bool public transferFrozen = true;

    function Node(
        uint256 _maxSupply,
        string _tokenName,
        string _tokenSymbol,
        uint8 _precision,
        bool _locked
    ) MintingERC20(0, _maxSupply, _tokenName, _precision, _tokenSymbol, false, _locked) {
        standard = "Node 0.1";
    }

    function setLocked(bool _locked) public onlyOwner {
        locked = _locked;
    }

    function setNodePhases(address _nodePhases) public onlyOwner {
        nodePhases = NodePhases(_nodePhases);
    }

    function unfreeze() public onlyOwner {
        if (nodePhases != address(0) && nodePhases.isFinished(1)) {
            transferFrozen = false;
        }
    }

    function buyBack(address _address) public onlyMinters returns (uint256) {
        require(address(_address) != address(0));

        uint256 balance = balanceOf(_address);
        setBalance(_address, 0);
        setBalance(this, balanceOf(this).add(balance));
        Transfer(_address, this, balance);

        return balance;
    }

    function transfer(address _to, uint _value) public returns (bool) {
        require(!transferFrozen);

        return super.transfer(_to, _value);
    }

    function transferFrom(address _from, address _to, uint _value) public returns (bool success) {
        require(!transferFrozen);

        return super.transferFrom(_from, _to, _value);
    }

}

contract NodeAllocation is Ownable {

    using SafeMath for uint256;

    PreICOAllocation[] public preIcoAllocation;

    ICOAllocation[] public icoAllocation;

    uint256[] public distributionThresholds;

    address public bountyAddress;

    struct PreICOAllocation {
        uint8 percentage;
        address destAddress;
    }

    struct ICOAllocation {
        uint8 percentage;
        address destAddress;
    }

    function NodeAllocation(
        address _bountyAddress, //2%
        address[] _preICOAddresses, //according - 3% and 97%
        address[] _icoAddresses, //according - 3% 47% and 50%
        uint256[] _distributionThresholds
    ) {
        require((address(_bountyAddress) != address(0)) && _distributionThresholds.length > 0);

        bountyAddress = _bountyAddress;
        distributionThresholds = _distributionThresholds;

        require(setPreICOAllocation(_preICOAddresses) == true);
        require(setICOAllocation(_icoAddresses) == true);
    }

    function getPreICOAddress(uint8 _id) public returns (address) {
        PreICOAllocation storage allocation = preIcoAllocation[_id];

        return allocation.destAddress;
    }

    function getPreICOPercentage(uint8 _id) public returns (uint8) {
        PreICOAllocation storage allocation = preIcoAllocation[_id];

        return allocation.percentage;
    }

    function getPreICOLength() public returns (uint8) {
        return uint8(preIcoAllocation.length);
    }

    function getICOAddress(uint8 _id) public returns (address) {
        ICOAllocation storage allocation = icoAllocation[_id];

        return allocation.destAddress;
    }

    function getICOPercentage(uint8 _id) public returns (uint8) {
        ICOAllocation storage allocation = icoAllocation[_id];

        return allocation.percentage;
    }

    function getICOLength() public returns (uint8) {
        return uint8(icoAllocation.length);
    }

    function getThreshold(uint8 _id) public returns (uint256) {
        return uint256(distributionThresholds[_id]);
    }

    function getThresholdsLength() public returns (uint8) {
        return uint8(distributionThresholds.length);
    }

    function setPreICOAllocation(address[] _addresses) internal returns (bool) {
        if (_addresses.length < 2) {
            return false;
        }
        preIcoAllocation.push(PreICOAllocation(3, _addresses[0]));
        preIcoAllocation.push(PreICOAllocation(97, _addresses[1]));

        return true;
    }

    function setICOAllocation(address[] _addresses) internal returns (bool) {
        if (_addresses.length < 3) {
            return false;
        }
        icoAllocation.push(ICOAllocation(3, _addresses[0]));
        icoAllocation.push(ICOAllocation(47, _addresses[1]));
        icoAllocation.push(ICOAllocation(50, _addresses[2]));

        return true;
    }
}

contract NodePhases is usingOraclize, Ownable {

    using SafeMath for uint256;

    Node public node;

    NodeAllocation public nodeAllocation;

    Phase[] public phases;

    uint256 public constant HOUR = 3600;

    uint256 public constant DAY = 86400;

    uint256 public collectedEthers;

    uint256 public soldTokens;

    uint256 public priceUpdateAt;

    uint256 public investorsCount;

    uint256 public lastDistributedAmount;

    mapping (address => uint256) public icoEtherBalances;

    mapping (address => bool) private investors;

    event NewOraclizeQuery(string description);

    event NewNodePriceTicker(string price);

    event Refund(address holder, uint256 ethers, uint256 tokens);

    struct Phase {
        uint256 price;
        uint256 minInvest;
        uint256 softCap;
        uint256 hardCap;
        uint256 since;
        uint256 till;
        bool isSucceed;
    }

    function NodePhases(
        address _node,
        uint256 _minInvest,
        uint256 _tokenPrice, //0.0032835596 ethers
        uint256 _preIcoMaxCap,
        uint256 _preIcoSince,
        uint256 _preIcoTill,
        uint256 _icoMinCap,
        uint256 _icoMaxCap,
        uint256 _icoSince,
        uint256 _icoTill
    ) {
        require(address(_node) != address(0));
        node = Node(address(_node));

        require((_preIcoSince < _preIcoTill) && (_icoSince < _icoTill) && (_preIcoTill <= _icoSince));

        require((_preIcoMaxCap < _icoMaxCap) && (_icoMaxCap < node.maxSupply()));

        phases.push(Phase(_tokenPrice, _minInvest, 0, _preIcoMaxCap, _preIcoSince, _preIcoTill, false));
        phases.push(Phase(_tokenPrice, _minInvest, _icoMinCap, _icoMaxCap, _icoSince, _icoTill, false));

        priceUpdateAt = now;

        oraclize_setNetwork(networkID_auto);
        oraclize = OraclizeI(OAR.getAddress());
    }

    function() public payable {
        require(buy(msg.sender, msg.value) == true);
    }

    function __callback(bytes32, string _result, bytes) public {
        require(msg.sender == oraclize_cbAddress());

        uint256 price = uint256(10 ** 23).div(parseInt(_result, 5));

        require(price > 0);

        for (uint i = 0; i < phases.length; i++) {
            Phase storage phase = phases[i];
            phase.price = price;
        }

        NewNodePriceTicker(_result);
    }

    function setCurrentRate(uint256 _rate) public onlyOwner {
        require(_rate > 0);
        for (uint i = 0; i < phases.length; i++) {
            Phase storage phase = phases[i];
            phase.price = _rate;
        }
        priceUpdateAt = now;
    }

    function setNode(address _node) public onlyOwner {
        require(address(_node) != address(0));
        node = Node(_node);
    }

    function setNodeAllocation(address _nodeAllocation) public onlyOwner {
        require(address(_nodeAllocation) != address(0));
        nodeAllocation = NodeAllocation(_nodeAllocation);
    }

    function setPhase(
        uint8 _phaseId,
        uint256 _since,
        uint256 _till,
        uint256 _price,
        uint256 _softCap,
        uint256 _hardCap
    ) public onlyOwner returns (bool) {
        require((phases.length > _phaseId) && (_price > 0));
        require((_till > _since) && (_since > 0));
        require((node.maxSupply() > _hardCap) && (_hardCap > _softCap) && (_softCap >= 0));

        Phase storage phase = phases[_phaseId];

        if (phase.isSucceed == true) {
            return false;
        }
        phase.since = _since;
        phase.till = _till;
        phase.price = _price;
        phase.softCap = _softCap;
        phase.hardCap = _hardCap;

        return true;
    }

    function sendToAddress(address _address, uint256 _tokens) public onlyOwner returns (bool) {
        return sendToAddressWithTime(_address, _tokens, now);
    }

    function sendToAddressWithTime(
        address _address,
        uint256 _tokens,
        uint256 _time
    ) public onlyOwner returns (bool) {
        if (_tokens == 0 || address(_address) == address(0) || _time == 0) {
            return false;
        }

        uint256 totalAmount = _tokens.add(getBonusAmount(_tokens, _time));

        require(totalAmount == node.mint(_address, totalAmount));

        soldTokens = soldTokens.add(totalAmount);
        increaseInvestorsCount(_address);

        return true;
    }

    function sendToAddressWithBonus(
        address _address,
        uint256 _tokens,
        uint256 _bonus
    ) public onlyOwner returns (bool) {
        if (_tokens == 0 || address(_address) == address(0) || _bonus == 0) {
            return false;
        }

        uint256 totalAmount = _tokens.add(_bonus);

        require(totalAmount == node.mint(_address, totalAmount));

        soldTokens = soldTokens.add(totalAmount);
        increaseInvestorsCount(_address);

        return true;
    }

    function getTokens() public constant returns (uint256) {
        return node.totalSupply();
    }

    function getSoldToken() public constant returns (uint256) {
        return soldTokens;
    }

    function getAllInvestors() public constant returns (uint256) {
        return investorsCount;
    }

    function getBalanceContract() public constant returns (uint256) {
        return collectedEthers;
    }

    function isSucceed(uint8 phaseId) public returns (bool) {
        if (phases.length < phaseId) {
            return false;
        }
        Phase storage phase = phases[phaseId];
        if (phase.isSucceed == true) {
            return true;
        }
        if (phase.till > now) {
            return false;
        }
        if (phase.softCap != 0 && phase.softCap > getTokens()) {
            return false;
        }
        phase.isSucceed = true;
        if (phaseId == 1) {
            allocateBounty();
        }

        return true;
    }

    function refund() public returns (bool) {
        Phase storage icoPhase = phases[1];
        if (icoPhase.till > now) {
            return false;
        }
        if (icoPhase.softCap < getTokens()) {
            return false;
        }
        if (icoEtherBalances[msg.sender] == 0) {
            return false;
        }

        uint256 refundAmount = icoEtherBalances[msg.sender];
        uint256 tokens = node.buyBack(msg.sender);
        icoEtherBalances[msg.sender] = 0;
        msg.sender.transfer(refundAmount);
        Refund(msg.sender, refundAmount, tokens);

        return true;
    }

    function isFinished(uint8 phaseId) public constant returns (bool) {
        if (phases.length < phaseId) {
            return false;
        }
        Phase storage phase = phases[phaseId];

        return (phase.isSucceed || now > phase.till);
    }

    function getCurrentPhase(uint256 _time) public constant returns (uint8) {
        if (_time == 0) {
            return uint8(phases.length);
        }
        for (uint8 i = 0; i < phases.length; i++) {
            Phase storage phase = phases[i];
            if (phase.since > _time) {
                continue;
            }

            if (phase.till < _time) {
                continue;
            }

            return i;
        }

        return uint8(phases.length);
    }

    function update() internal {
        if (oraclize_getPrice("URL") > this.balance) {
            NewOraclizeQuery("Oraclize query was NOT sent, please add some ETH to cover for the query fee");
        } else {
            NewOraclizeQuery("Oraclize query was sent, standing by for the answer..");
            oraclize_query("URL", "json(https://api.kraken.com/0/public/Ticker?pair=ETHUSD).result.XETHZUSD.c.0");
        }
    }

    function buy(address _address, uint256 _value) internal returns (bool) {
        if (_value == 0) {
            return false;
        }

        uint8 currentPhase = getCurrentPhase(now);

        if (phases.length < currentPhase) {
            return false;
        }

        if (priceUpdateAt.add(HOUR) < now) {
            update();
            priceUpdateAt = now;
        }

        uint256 amount = getTokensAmount(_value, currentPhase);

        if (amount == 0) {
            return false;
        }

        amount = amount.add(getBonusAmount(amount, now));

        require(amount == node.mint(_address, amount));

        onSuccessfulBuy(_address, _value, amount, currentPhase);
        allocate(currentPhase);

        return true;
    }

    function onSuccessfulBuy(address _address, uint256 _value, uint256 _amount, uint8 _currentPhase) internal {
        collectedEthers = collectedEthers.add(_value);
        soldTokens = soldTokens.add(_amount);
        increaseInvestorsCount(_address);

        if (_currentPhase == 1) {
            icoEtherBalances[_address] = icoEtherBalances[_address].add(_value);
        }
    }

    function increaseInvestorsCount(address _address) internal {
        if (address(_address) != address(0) && investors[_address] == false) {
            investors[_address] = true;
            investorsCount = investorsCount.add(1);
        }
    }

    function getTokensAmount(uint256 _value, uint8 _currentPhase) internal returns (uint256) {
        if (_value == 0 || phases.length < _currentPhase) {
            return 0;
        }

        Phase storage phase = phases[_currentPhase];

        uint256 amount = _value.mul(uint256(10) ** node.decimals()).div(phase.price);

        if (amount < phase.minInvest) {
            return 0;
        }

        if (getTokens().add(amount) > phase.hardCap) {
            return 0;
        }

        return amount;
    }

    function getBonusAmount(uint256 _amount, uint256 _time) internal returns (uint256) {
        uint8 currentPhase = getCurrentPhase(_time);
        if (_amount == 0 || _time == 0 || phases.length < currentPhase) {
            return 0;
        }

        if (currentPhase == 0) {
            return _amount.mul(50).div(100);
        }

        if (currentPhase == 1) {
            return getICOBonusAmount(_amount, _time);
        }

        return 0;
    }

    function getICOBonusAmount(uint256 _amount, uint256 _time) internal returns (uint256) {
        Phase storage ico = phases[1];
        if (_time.sub(ico.since) < 11 * DAY) {// 11d since ico => reward 30%;
            return _amount.mul(30).div(100);
        }
        if (_time.sub(ico.since) < 21 * DAY) {// 21d since ico => reward 20%
            return _amount.mul(20).div(100);
        }
        if (_time.sub(ico.since) < 31 * DAY) {// 31d since ico => reward 15%
            return _amount.mul(15).div(100);
        }
        if (_time.sub(ico.since) < 41 * DAY) {// 41d since ico => reward 10%
            return _amount.mul(10).div(100);
        }

        return 0;
    }

    function allocateICOEthers() internal returns (bool) {
        uint8 length = nodeAllocation.getICOLength();
        require(length > 0);

        uint256 totalAmount = this.balance;
        for (uint8 i = 0; i < length; i++) {
            uint256 amount = totalAmount.mul(nodeAllocation.getICOPercentage(i)).div(100);
            if ((i + 1) == length) {
                amount = this.balance;
            }
            if (amount > 0) {
                nodeAllocation.getICOAddress(i).transfer(amount);
            }
        }

        return true;
    }

    function allocatePreICOEthers() internal returns (bool) {
        uint8 length = nodeAllocation.getPreICOLength();
        require(length > 0);

        uint256 totalAmount = this.balance;
        for (uint8 i = 0; i < length; i++) {
            uint256 amount = totalAmount.mul(nodeAllocation.getPreICOPercentage(i)).div(100);
            if ((i + 1) == length) {
                amount = this.balance;
            }
            if (amount > 0) {
                nodeAllocation.getPreICOAddress(i).transfer(amount);
            }
        }

        return true;
    }

    function allocate(uint8 _currentPhase) internal {
        if (_currentPhase == 0) {
            allocatePreICOEthers();
        }
        if (_currentPhase == 1) {
            uint8 length = nodeAllocation.getThresholdsLength();
            require(uint8(length) > 0);

            for (uint8 j = 0; j < length; j++) {
                uint256 threshold = nodeAllocation.getThreshold(j);

                if ((threshold > lastDistributedAmount) && (soldTokens >= threshold)) {
                    allocateICOEthers();
                    lastDistributedAmount = threshold;
                }
            }
        }
    }

    function allocateBounty() internal {
        if (isFinished(1)) {
            allocateICOEthers();
            uint256 amount = node.maxSupply().mul(2).div(100);
            uint256 mintedAmount = node.mint(nodeAllocation.bountyAddress(), amount);
            require(mintedAmount == amount);
        }
    }

}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[],"name":"collectedEthers","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_rate","type":"uint256"}],"name":"setCurrentRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"DAY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"investorsCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"phaseId","type":"uint8"}],"name":"isFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"phases","outputs":[{"name":"price","type":"uint256"},{"name":"minInvest","type":"uint256"},{"name":"softCap","type":"uint256"},{"name":"hardCap","type":"uint256"},{"name":"since","type":"uint256"},{"name":"till","type":"uint256"},{"name":"isSucceed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nodeAllocation","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"","type":"bytes32"},{"name":"_result","type":"string"},{"name":"","type":"bytes"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_tokens","type":"uint256"}],"name":"sendToAddress","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_phaseId","type":"uint8"},{"name":"_since","type":"uint256"},{"name":"_till","type":"uint256"},{"name":"_price","type":"uint256"},{"name":"_softCap","type":"uint256"},{"name":"_hardCap","type":"uint256"}],"name":"setPhase","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_time","type":"uint256"}],"name":"getCurrentPhase","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"soldTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBalanceContract","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"priceUpdateAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastDistributedAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_tokens","type":"uint256"},{"name":"_bonus","type":"uint256"}],"name":"sendToAddressWithBonus","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"icoEtherBalances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"phaseId","type":"uint8"}],"name":"isSucceed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"HOUR","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nodeAllocation","type":"address"}],"name":"setNodeAllocation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_node","type":"address"}],"name":"setNode","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getAllInvestors","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"},{"name":"_tokens","type":"uint256"},{"name":"_time","type":"uint256"}],"name":"sendToAddressWithTime","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"node","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getSoldToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_node","type":"address"},{"name":"_minInvest","type":"uint256"},{"name":"_tokenPrice","type":"uint256"},{"name":"_preIcoMaxCap","type":"uint256"},{"name":"_preIcoSince","type":"uint256"},{"name":"_preIcoTill","type":"uint256"},{"name":"_icoMinCap","type":"uint256"},{"name":"_icoMaxCap","type":"uint256"},{"name":"_icoSince","type":"uint256"},{"name":"_icoTill","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"description","type":"string"}],"name":"NewOraclizeQuery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"price","type":"string"}],"name":"NewNodePriceTicker","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"holder","type":"address"},{"indexed":false,"name":"ethers","type":"uint256"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Refund","type":"event"}]

0x606060405234156200001057600080fd5b60405161014080620032978339810160405280805191906020018051919060200180519190602001805191906020018051919060200180519190602001805191906020018051919060200180519190602001805160058054600160a060020a03191633600160a060020a03908116919091179091559092508b16151590506200009857600080fd5b60078054600160a060020a031916600160a060020a038c161790558486108015620000c257508082105b8015620000cf5750818511155b1515620000db57600080fd5b8287108015620001675750600754600160a060020a031663d5abeb016000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156200014857600080fd5b6102c65a03f115156200015a57600080fd5b5050506040518051905083105b15156200017357600080fd5b6009805460018101620001878382620007a3565b9160005260206000209060070201600060e060405190810160409081528c8252602082018e90526000908201819052606082018c9052608082018b905260a082018a905260c0820152919050815181556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151600691909101805460ff191691151591909117905550506009805460018101620002398382620007a3565b9160005260206000209060070201600060e060405190810160409081528c8252602082018e90528101889052606081018790526080810186905260a08101859052600060c0820152919050815181556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151600691909101805460ff1916911515919091179055505042600c55620002f46000640100000000620003a481026200259f1704565b5060008054600160a060020a0316906338cc483190604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156200035857600080fd5b6102c65a03f115156200036a57600080fd5b505050604051805160018054600160a060020a031916600160a060020a039290921691909117905550620008c79950505050505050505050565b600080620003d4731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6401000000006200259b6200078682021704565b1115620004565760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed1790556200044d60408051908101604052600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152640100000000620028d76200078a82021704565b50600162000781565b60006200048573c03a2615d5efaf5f49f60b7bb6583eaec212fdf16401000000006200259b6200078682021704565b1115620004fe5760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf11790556200044d60408051908101604052600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152640100000000620028d76200078a82021704565b60006200052d73b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6401000000006200259b6200078682021704565b1115620005a65760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e1790556200044d60408051908101604052600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152640100000000620028d76200078a82021704565b6000620005d573146500cfd35b22e4a392fe0adc06de1a1368ed486401000000006200259b6200078682021704565b11156200064e5760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed481790556200044d60408051908101604052600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152640100000000620028d76200078a82021704565b60006200067d736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756401000000006200259b6200078682021704565b1115620006b3575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475179055600162000781565b6000620006e27320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6401000000006200259b6200078682021704565b111562000718575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf179055600162000781565b6000620007477351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6401000000006200259b6200078682021704565b11156200077d575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa179055600162000781565b5060005b919050565b3b90565b60028180516200079f929160200190620007d7565b5050565b815481835581811511620007d257600702816007028360005260206000209182019101620007d291906200085c565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200081a57805160ff19168380011785556200084a565b828001600101855582156200084a579182015b828111156200084a5782518255916020019190600101906200082d565b5062000858929150620008aa565b5090565b620008a791905b808211156200085857600080825560018201819055600282018190556003820181905560048201819055600582015560068101805460ff1916905560070162000863565b90565b620008a791905b80821115620008585760008155600101620008b1565b6129c080620008d76000396000f30060606040526004361061017c5763ffffffff60e060020a6000350416630200b10d81146101965780630b5f2efd146101bb57806327cfe856146101d157806327dc297e146101e45780632b7110511461023a5780632d3b9e591461024d5780632e37eef61461027a578063387bef56146102ce57806338bbfa50146102fd5780633debd2d8146103955780634c45c7ec146103b7578063572e85ec146103df578063590e1ae31461040b5780635ed9ebfc1461041e57806366bd78fd1461043157806379ba5097146104445780637ea15da114610457578063819046761461046a57806388c912b81461047d5780638da5cb5b146104a257806396c36170146104b55780639df5cbda146104d4578063a39dc9be146104ed578063a53818ca14610500578063aa6ca8081461051f578063c21d5ab714610532578063d0a2f2c414610551578063d4ee1d9014610564578063d603fd2814610577578063d70754ec1461059c578063f2fde38b146105af578063f30a4a70146105ce575b61018633346105e1565b151560011461019457600080fd5b005b34156101a157600080fd5b6101a9610722565b60405190815260200160405180910390f35b34156101c657600080fd5b610194600435610728565b34156101dc57600080fd5b6101a961079b565b34156101ef57600080fd5b610194600480359060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506107a295505050505050565b341561024557600080fd5b6101a96107d4565b341561025857600080fd5b61026660ff600435166107da565b604051901515815260200160405180910390f35b341561028557600080fd5b610290600435610839565b60405196875260208701959095526040808701949094526060860192909252608085015260a084015290151560c083015260e0909101905180910390f35b34156102d957600080fd5b6102e1610889565b604051600160a060020a03909116815260200160405180910390f35b341561030857600080fd5b610194600480359060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965061089895505050505050565b34156103a057600080fd5b610266600160a060020a03600435166024356109d5565b34156103c257600080fd5b61026660ff6004351660243560443560643560843560a435610a05565b34156103ea57600080fd5b6103f5600435610b57565b60405160ff909116815260200160405180910390f35b341561041657600080fd5b610266610be1565b341561042957600080fd5b6101a9610d97565b341561043c57600080fd5b6101a9610d9d565b341561044f57600080fd5b610194610da4565b341561046257600080fd5b6101a9610de0565b341561047557600080fd5b6101a9610de6565b341561048857600080fd5b610266600160a060020a0360043516602435604435610dec565b34156104ad57600080fd5b6102e1610efb565b34156104c057600080fd5b6101a9600160a060020a0360043516610f0a565b34156104df57600080fd5b61026660ff60043516610f1c565b34156104f857600080fd5b6101a9610fe5565b341561050b57600080fd5b610194600160a060020a0360043516610feb565b341561052a57600080fd5b6101a961103d565b341561053d57600080fd5b610194600160a060020a03600435166110a6565b341561055c57600080fd5b6101a96110f8565b341561056f57600080fd5b6102e16110fe565b341561058257600080fd5b610266600160a060020a036004351660243560443561110d565b34156105a757600080fd5b6102e1611172565b34156105ba57600080fd5b610194600160a060020a0360043516611181565b34156105d957600080fd5b6101a96111d3565b600080808315156105f5576000925061071a565b6105fe42610b57565b60095490925060ff8316901015610618576000925061071a565b600c54429061062f90610e1063ffffffff6111d916565b10156106425761063d6111f3565b42600c555b61064c8483611445565b905080151561065e576000925061071a565b61067861066b8242611561565b829063ffffffff6111d916565b600754909150600160a060020a03166340c10f19868360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156106da57600080fd5b6102c65a03f115156106eb57600080fd5b50505060405180518214905061070057600080fd5b61070c858583856115df565b61071582611669565b600192505b505092915050565b600a5481565b600554600090819033600160a060020a0390811691161461074857600080fd5b6000831161075557600080fd5b600091505b60095482101561079257600980548390811061077257fe5b60009182526020909120600790910201838155600190920191905061075a565b505042600c5550565b6201518081565b6107d0828260006040518059106107b65750595b818152601f19601f83011681016020016040529050610898565b5050565b600d5481565b6000808260ff1660098054905010156107f65760009150610833565b6009805460ff851690811061080757fe5b60009182526020909120600790910201600681015490915060ff16806108305750806005015442115b91505b50919050565b600980548290811061084757fe5b60009182526020909120600790910201805460018201546002830154600384015460048501546005860154600690960154949650929491939092919060ff1687565b600854600160a060020a031681565b60008060006108a56117b6565b600160a060020a031633600160a060020a03161415156108c457600080fd5b6108e96108d28660056118b1565b69152d02c7e14af68000009063ffffffff611a1f16565b9250600083116108f857600080fd5b600091505b60095482101561093557600980548390811061091557fe5b6000918252602090912060079091020183815560019092019190506108fd565b7f2056ab36abd4f7e4b22f5465bd2363a103bd16148d91715b538e47d46171a58c8560405160208082528190810183818151815260200191508051906020019080838360005b8381101561099357808201518382015260200161097b565b50505050905090810190601f1680156109c05780820380516001836020036101000a031916815260200191505b509250505060405180910390a1505050505050565b60055460009033600160a060020a039081169116146109f357600080fd5b6109fe83834261110d565b9392505050565b600554600090819033600160a060020a03908116911614610a2557600080fd5b60095460ff891690118015610a3a5750600085115b1515610a4557600080fd5b8686118015610a545750600087115b1515610a5f57600080fd5b6007548390600160a060020a031663d5abeb016000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610aa957600080fd5b6102c65a03f11515610aba57600080fd5b50505060405180519050118015610ad057508383115b8015610add575060008410155b1515610ae857600080fd5b6009805460ff8a16908110610af957fe5b6000918252602090912060066007909202019081015490915060ff16151560011415610b285760009150610b4c565b60048101879055600581018690558481556002810184905560038101839055600191505b509695505050505050565b60008080831515610b6c576009549250610bda565b600091505b60095460ff83161015610bd4576009805460ff8416908110610b8f57fe5b906000526020600020906007020190508381600401541115610bb057610bc9565b8381600501541015610bc157610bc9565b819250610bda565b600190910190610b71565b60095492505b5050919050565b60008060008060096001815481101515610bf757fe5b906000526020600020906007020192504283600501541115610c1c5760009350610d91565b610c2461103d565b83600201541015610c385760009350610d91565b600160a060020a0333166000908152600f60205260409020541515610c605760009350610d91565b600160a060020a03338181166000908152600f6020526040808220546007549096509093169263a1ae8da0929190516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610cd157600080fd5b6102c65a03f11515610ce257600080fd5b5050506040518051600160a060020a0333166000818152600f602052604080822091909155919350915083156108fc0290849051600060405180830381858888f193505050501515610d3357600080fd5b7f73f04af9dcc582a923ec15d3eea990fe34adabfff2879e28d44572e01a54abb63383836040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a1600193505b50505090565b600b5481565b600a545b90565b60065433600160a060020a0390811691161415610dde5760065460058054600160a060020a031916600160a060020a039092169190911790555b565b600c5481565b600e5481565b600554600090819033600160a060020a03908116911614610e0c57600080fd5b831580610e205750600160a060020a038516155b80610e29575082155b15610e375760009150610ef3565b610e47848463ffffffff6111d916565b600754909150600160a060020a03166340c10f19868360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610ea957600080fd5b6102c65a03f11515610eba57600080fd5b505050604051805182149050610ecf57600080fd5b600b54610ee2908263ffffffff6111d916565b600b55610eee85611a36565b600191505b509392505050565b600554600160a060020a031681565b600f6020526000908152604090205481565b6000808260ff166009805490501015610f385760009150610833565b6009805460ff8516908110610f4957fe5b6000918252602090912060066007909202019081015490915060ff16151560011415610f785760019150610833565b4281600501541115610f8d5760009150610833565b600281015415801590610faa5750610fa361103d565b8160020154115b15610fb85760009150610833565b60068101805460ff1916600190811790915560ff84161415610fdc57610fdc611aaa565b50600192915050565b610e1081565b60055433600160a060020a0390811691161461100657600080fd5b600160a060020a038116151561101b57600080fd5b60088054600160a060020a031916600160a060020a0392909216919091179055565b600754600090600160a060020a03166318160ddd82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561108757600080fd5b6102c65a03f1151561109857600080fd5b505050604051805191505090565b60055433600160a060020a039081169116146110c157600080fd5b600160a060020a03811615156110d657600080fd5b60078054600160a060020a031916600160a060020a0392909216919091179055565b600d5490565b600654600160a060020a031681565b600554600090819033600160a060020a0390811691161461112d57600080fd5b8315806111415750600160a060020a038516155b8061114a575082155b156111585760009150610ef3565b610e476111658585611561565b859063ffffffff6111d916565b600754600160a060020a031681565b60055433600160a060020a0390811691161461119c57600080fd5b600160a060020a03811615156111b157600080fd5b60068054600160a060020a031916600160a060020a0392909216919091179055565b600b5490565b6000828201838110156111e857fe5b8091505b5092915050565b30600160a060020a03163161123a60408051908101604052600381527f55524c00000000000000000000000000000000000000000000000000000000006020820152611c2a565b11156112f6577f096835e36c2ccea88ff2b3aca87dfc938b977e52ea656873ff76a8dba50d4d346040516020808252604b908201527f4f7261636c697a6520717565727920776173204e4f542073656e742c20706c656040808301919091527f6173652061646420736f6d652045544820746f20636f76657220666f7220746860608301527f6520717565727920666565000000000000000000000000000000000000000000608083015260a0909101905180910390a1610dde565b7f096835e36c2ccea88ff2b3aca87dfc938b977e52ea656873ff76a8dba50d4d3460405160208082526035908201527f4f7261636c697a65207175657279207761732073656e742c207374616e64696e6040808301919091527f6720627920666f722074686520616e737765722e2e000000000000000000000060608301526080909101905180910390a16114426040805190810160405280600381526020017f55524c0000000000000000000000000000000000000000000000000000000000815250608060405190810160405280604c81526020017f6a736f6e2868747470733a2f2f6170692e6b72616b656e2e636f6d2f302f707581526020017f626c69632f5469636b65723f706169723d455448555344292e726573756c742e81526020017f584554485a5553442e632e300000000000000000000000000000000000000000815250611db4565b50565b6000808084158061145b575060095460ff851690105b15611469576000925061071a565b6009805460ff861690811061147a57fe5b600091825260208220600791820201805491549094506115169261150a91600160a060020a03169063313ce56790604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156114dd57600080fd5b6102c65a03f115156114ee57600080fd5b505050604051805189915060ff16600a0a63ffffffff6120a416565b9063ffffffff611a1f16565b9050816001015481101561152d576000925061071a565b816003015461154a8261153e61103d565b9063ffffffff6111d916565b1115611559576000925061071a565b949350505050565b60008061156d83610b57565b905083158061157a575082155b8061158a575060095460ff821690105b1561159857600091506111ec565b60ff811615156115bf576115b8606461150a86603263ffffffff6120a416565b91506111ec565b8060ff16600114156115d5576115b884846120c8565b5060009392505050565b600a546115f2908463ffffffff6111d916565b600a55600b54611608908363ffffffff6111d916565b600b5561161484611a36565b8060ff166001141561166357600160a060020a0384166000908152600f6020526040902054611649908463ffffffff6111d916565b600160a060020a0385166000908152600f60205260409020555b50505050565b6000808060ff841615156116815761167f6121ca565b505b8360ff166001141561166357600854600160a060020a0316639e1d14f16000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156116d557600080fd5b6102c65a03f115156116e657600080fd5b5050506040518051935050600060ff84161161170157600080fd5b600091505b8260ff168260ff16101561166357600854600160a060020a031663de7bea748360006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561176757600080fd5b6102c65a03f1151561177857600080fd5b505050604051805190509050600e5481118015611797575080600b5410155b156117ab576117a46123cd565b50600e8190555b600190910190611706565b60008054600160a060020a031615806117e157506000546117df90600160a060020a031661259b565b155b156117f2576117f0600061259f565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561183b57600080fd5b6102c65a03f1151561184c57600080fd5b505050604051805160018054600160a060020a031916600160a060020a03928316179081905516905063c281d19e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561108757600080fd5b60006118bb6128ea565b5082600080805b8351811015611a02577f30000000000000000000000000000000000000000000000000000000000000008482815181106118f857fe5b016020015160f860020a900460f860020a02600160f860020a0319161015801561196957507f390000000000000000000000000000000000000000000000000000000000000084828151811061194a57fe5b016020015160f860020a900460f860020a02600160f860020a03191611155b156119bf5781156119885785151561198057611a02565b600019909501945b600a83029250603084828151811061199c57fe5b016020015160f860020a900460f860020a0260f860020a900403830192506119fa565b8381815181106119cb57fe5b016020015160f860020a900460f860020a02600160f860020a031916602e60f860020a0214156119fa57600191505b6001016118c2565b6000861115611a145785600a0a830292505b509095945050505050565b6000808284811515611a2d57fe5b04949350505050565b600160a060020a03811615801590611a675750600160a060020a03811660009081526010602052604090205460ff16155b1561144257600160a060020a0381166000908152601060205260409020805460ff19166001908117909155600d54611aa49163ffffffff6111d916565b600d5550565b600080611ab760016107da565b156107d057611ac46123cd565b50600754611b429060649061150a90600290600160a060020a031663d5abeb016000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611b1b57600080fd5b6102c65a03f11515611b2c57600080fd5b505050604051805191905063ffffffff6120a416565b600754600854919350600160a060020a03908116916340c10f19911663c516358f6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611b9a57600080fd5b6102c65a03f11515611bab57600080fd5b505050604051805190508460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515611c0257600080fd5b6102c65a03f11515611c1357600080fd5b50505060405180519150508181146107d057600080fd5b60008054600160a060020a03161580611c555750600054611c5390600160a060020a031661259b565b155b15611c6657611c64600061259f565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611caf57600080fd5b6102c65a03f11515611cc057600080fd5b505050604051805160018054600160a060020a031916600160a060020a03928316179081905516905063524f3889836000604051602001526040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d47578082015183820152602001611d2f565b50505050905090810190601f168015611d745780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1515611d9257600080fd5b6102c65a03f11515611da357600080fd5b50505060405180519150505b919050565b600080548190600160a060020a03161580611de15750600054611ddf90600160a060020a031661259b565b155b15611df257611df0600061259f565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611e3b57600080fd5b6102c65a03f11515611e4c57600080fd5b505050604051805160018054600160a060020a031916600160a060020a03928316179081905516905063524f3889856000604051602001526040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ed3578082015183820152602001611ebb565b50505050905090810190601f168015611f005780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1515611f1e57600080fd5b6102c65a03f11515611f2f57600080fd5b5050506040518051915050670de0b6b3a764000062030d403a0201811115611f5a57600091506111ec565b600154600160a060020a031663adf59f99826000878782604051602001526040518563ffffffff1660e060020a028152600401808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611fd1578082015183820152602001611fb9565b50505050905090810190601f168015611ffe5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561203457808201518382015260200161201c565b50505050905090810190601f1680156120615780820380516001836020036101000a031916815260200191505b50955050505050506020604051808303818588803b151561208157600080fd5b6125ee5a03f1151561209257600080fd5b50505050604051805195945050505050565b60008282028315806120c057508284828115156120bd57fe5b04145b15156111e857fe5b600080600960018154811015156120db57fe5b9060005260206000209060070201905062015180600b026121098260040154856128c590919063ffffffff16565b1015612125576115b8606461150a86601e63ffffffff6120a416565b6004810154621baf809061214090859063ffffffff6128c516565b101561215c576115b8606461150a86601463ffffffff6120a416565b60048101546228de809061217790859063ffffffff6128c516565b1015612193576115b8606461150a86600f63ffffffff6120a416565b600481015462360d80906121ae90859063ffffffff6128c516565b10156115d5576115b8606461150a86600a63ffffffff6120a416565b6008546000908190819081908190600160a060020a03166360a4d59982604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561221c57600080fd5b6102c65a03f1151561222d57600080fd5b5050506040518051945050600060ff85161161224857600080fd5b30600160a060020a0316319250600091505b8360ff168260ff1610156123c2576008546122f09060649061150a90600160a060020a031663a356fdf38660006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156122c657600080fd5b6102c65a03f115156122d757600080fd5b505050604051805187915060ff1663ffffffff6120a416565b90508360ff168260010160ff1614156123105750600160a060020a033016315b60008111156123b757600854600160a060020a031663858310d88360006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561236c57600080fd5b6102c65a03f1151561237d57600080fd5b5050506040518051600160a060020a0316905081156108fc0282604051600060405180830381858888f1935050505015156123b757600080fd5b60019091019061225a565b600194505050505090565b6008546000908190819081908190600160a060020a03166351b2270f82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561241f57600080fd5b6102c65a03f1151561243057600080fd5b5050506040518051945050600060ff85161161244b57600080fd5b30600160a060020a0316319250600091505b8360ff168260ff1610156123c2576008546124c99060649061150a90600160a060020a0316631c572f8c8660006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156122c657600080fd5b90508360ff168260010160ff1614156124e95750600160a060020a033016315b600081111561259057600854600160a060020a031663e4a13fa48360006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561254557600080fd5b6102c65a03f1151561255657600080fd5b5050506040518051600160a060020a0316905081156108fc0282604051600060405180830381858888f19350505050151561259057600080fd5b60019091019061245d565b3b90565b6000806125bf731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed61259b565b111561262f5760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17905561262760408051908101604052600b81527f6574685f6d61696e6e657400000000000000000000000000000000000000000060208201526128d7565b506001611daf565b600061264e73c03a2615d5efaf5f49f60b7bb6583eaec212fdf161259b565b11156126b65760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf117905561262760408051908101604052600c81527f6574685f726f707374656e33000000000000000000000000000000000000000060208201526128d7565b60006126d573b7a07bcf2ba2f2703b24c0691b5278999c59ac7e61259b565b111561273d5760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e17905561262760408051908101604052600981527f6574685f6b6f76616e000000000000000000000000000000000000000000000060208201526128d7565b600061275c73146500cfd35b22e4a392fe0adc06de1a1368ed4861259b565b11156127c45760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed4817905561262760408051908101604052600b81527f6574685f72696e6b65627900000000000000000000000000000000000000000060208201526128d7565b60006127e3736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47561259b565b1115612817575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4751790556001611daf565b60006128367320e12a1f859b3feae5fb2a0a32c18f5a65555bbf61259b565b111561286a575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf1790556001611daf565b60006128897351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa61259b565b11156128bd575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa1790556001611daf565b506000919050565b6000828211156128d157fe5b50900390565b60028180516107d09291602001906128fc565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061293d57805160ff191683800117855561296a565b8280016001018555821561296a579182015b8281111561296a57825182559160200191906001019061294f565b5061297692915061297a565b5090565b610da191905b8082111561297657600081556001016129805600a165627a7a723058201a328892dc1165bcb813019fdbdb6d34508022cf12cc15181275a56539ea0fba002900000000000000000000000041fe87d16d60d069d533e2dc67462cfe4eeeadee00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000bb9551fc2400000000000000000000000000000000000000000000000000000000000047868c0000000000000000000000000000000000000000000000000000000005a288480000000000000000000000000000000000000000000000000000000005a52b47f0000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000003a699d00000000000000000000000000000000000000000000000000000000005a84cd80000000000000000000000000000000000000000000000000000000005ad3e77f

Deployed Bytecode

0x60606040526004361061017c5763ffffffff60e060020a6000350416630200b10d81146101965780630b5f2efd146101bb57806327cfe856146101d157806327dc297e146101e45780632b7110511461023a5780632d3b9e591461024d5780632e37eef61461027a578063387bef56146102ce57806338bbfa50146102fd5780633debd2d8146103955780634c45c7ec146103b7578063572e85ec146103df578063590e1ae31461040b5780635ed9ebfc1461041e57806366bd78fd1461043157806379ba5097146104445780637ea15da114610457578063819046761461046a57806388c912b81461047d5780638da5cb5b146104a257806396c36170146104b55780639df5cbda146104d4578063a39dc9be146104ed578063a53818ca14610500578063aa6ca8081461051f578063c21d5ab714610532578063d0a2f2c414610551578063d4ee1d9014610564578063d603fd2814610577578063d70754ec1461059c578063f2fde38b146105af578063f30a4a70146105ce575b61018633346105e1565b151560011461019457600080fd5b005b34156101a157600080fd5b6101a9610722565b60405190815260200160405180910390f35b34156101c657600080fd5b610194600435610728565b34156101dc57600080fd5b6101a961079b565b34156101ef57600080fd5b610194600480359060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506107a295505050505050565b341561024557600080fd5b6101a96107d4565b341561025857600080fd5b61026660ff600435166107da565b604051901515815260200160405180910390f35b341561028557600080fd5b610290600435610839565b60405196875260208701959095526040808701949094526060860192909252608085015260a084015290151560c083015260e0909101905180910390f35b34156102d957600080fd5b6102e1610889565b604051600160a060020a03909116815260200160405180910390f35b341561030857600080fd5b610194600480359060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965061089895505050505050565b34156103a057600080fd5b610266600160a060020a03600435166024356109d5565b34156103c257600080fd5b61026660ff6004351660243560443560643560843560a435610a05565b34156103ea57600080fd5b6103f5600435610b57565b60405160ff909116815260200160405180910390f35b341561041657600080fd5b610266610be1565b341561042957600080fd5b6101a9610d97565b341561043c57600080fd5b6101a9610d9d565b341561044f57600080fd5b610194610da4565b341561046257600080fd5b6101a9610de0565b341561047557600080fd5b6101a9610de6565b341561048857600080fd5b610266600160a060020a0360043516602435604435610dec565b34156104ad57600080fd5b6102e1610efb565b34156104c057600080fd5b6101a9600160a060020a0360043516610f0a565b34156104df57600080fd5b61026660ff60043516610f1c565b34156104f857600080fd5b6101a9610fe5565b341561050b57600080fd5b610194600160a060020a0360043516610feb565b341561052a57600080fd5b6101a961103d565b341561053d57600080fd5b610194600160a060020a03600435166110a6565b341561055c57600080fd5b6101a96110f8565b341561056f57600080fd5b6102e16110fe565b341561058257600080fd5b610266600160a060020a036004351660243560443561110d565b34156105a757600080fd5b6102e1611172565b34156105ba57600080fd5b610194600160a060020a0360043516611181565b34156105d957600080fd5b6101a96111d3565b600080808315156105f5576000925061071a565b6105fe42610b57565b60095490925060ff8316901015610618576000925061071a565b600c54429061062f90610e1063ffffffff6111d916565b10156106425761063d6111f3565b42600c555b61064c8483611445565b905080151561065e576000925061071a565b61067861066b8242611561565b829063ffffffff6111d916565b600754909150600160a060020a03166340c10f19868360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156106da57600080fd5b6102c65a03f115156106eb57600080fd5b50505060405180518214905061070057600080fd5b61070c858583856115df565b61071582611669565b600192505b505092915050565b600a5481565b600554600090819033600160a060020a0390811691161461074857600080fd5b6000831161075557600080fd5b600091505b60095482101561079257600980548390811061077257fe5b60009182526020909120600790910201838155600190920191905061075a565b505042600c5550565b6201518081565b6107d0828260006040518059106107b65750595b818152601f19601f83011681016020016040529050610898565b5050565b600d5481565b6000808260ff1660098054905010156107f65760009150610833565b6009805460ff851690811061080757fe5b60009182526020909120600790910201600681015490915060ff16806108305750806005015442115b91505b50919050565b600980548290811061084757fe5b60009182526020909120600790910201805460018201546002830154600384015460048501546005860154600690960154949650929491939092919060ff1687565b600854600160a060020a031681565b60008060006108a56117b6565b600160a060020a031633600160a060020a03161415156108c457600080fd5b6108e96108d28660056118b1565b69152d02c7e14af68000009063ffffffff611a1f16565b9250600083116108f857600080fd5b600091505b60095482101561093557600980548390811061091557fe5b6000918252602090912060079091020183815560019092019190506108fd565b7f2056ab36abd4f7e4b22f5465bd2363a103bd16148d91715b538e47d46171a58c8560405160208082528190810183818151815260200191508051906020019080838360005b8381101561099357808201518382015260200161097b565b50505050905090810190601f1680156109c05780820380516001836020036101000a031916815260200191505b509250505060405180910390a1505050505050565b60055460009033600160a060020a039081169116146109f357600080fd5b6109fe83834261110d565b9392505050565b600554600090819033600160a060020a03908116911614610a2557600080fd5b60095460ff891690118015610a3a5750600085115b1515610a4557600080fd5b8686118015610a545750600087115b1515610a5f57600080fd5b6007548390600160a060020a031663d5abeb016000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610aa957600080fd5b6102c65a03f11515610aba57600080fd5b50505060405180519050118015610ad057508383115b8015610add575060008410155b1515610ae857600080fd5b6009805460ff8a16908110610af957fe5b6000918252602090912060066007909202019081015490915060ff16151560011415610b285760009150610b4c565b60048101879055600581018690558481556002810184905560038101839055600191505b509695505050505050565b60008080831515610b6c576009549250610bda565b600091505b60095460ff83161015610bd4576009805460ff8416908110610b8f57fe5b906000526020600020906007020190508381600401541115610bb057610bc9565b8381600501541015610bc157610bc9565b819250610bda565b600190910190610b71565b60095492505b5050919050565b60008060008060096001815481101515610bf757fe5b906000526020600020906007020192504283600501541115610c1c5760009350610d91565b610c2461103d565b83600201541015610c385760009350610d91565b600160a060020a0333166000908152600f60205260409020541515610c605760009350610d91565b600160a060020a03338181166000908152600f6020526040808220546007549096509093169263a1ae8da0929190516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610cd157600080fd5b6102c65a03f11515610ce257600080fd5b5050506040518051600160a060020a0333166000818152600f602052604080822091909155919350915083156108fc0290849051600060405180830381858888f193505050501515610d3357600080fd5b7f73f04af9dcc582a923ec15d3eea990fe34adabfff2879e28d44572e01a54abb63383836040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a1600193505b50505090565b600b5481565b600a545b90565b60065433600160a060020a0390811691161415610dde5760065460058054600160a060020a031916600160a060020a039092169190911790555b565b600c5481565b600e5481565b600554600090819033600160a060020a03908116911614610e0c57600080fd5b831580610e205750600160a060020a038516155b80610e29575082155b15610e375760009150610ef3565b610e47848463ffffffff6111d916565b600754909150600160a060020a03166340c10f19868360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610ea957600080fd5b6102c65a03f11515610eba57600080fd5b505050604051805182149050610ecf57600080fd5b600b54610ee2908263ffffffff6111d916565b600b55610eee85611a36565b600191505b509392505050565b600554600160a060020a031681565b600f6020526000908152604090205481565b6000808260ff166009805490501015610f385760009150610833565b6009805460ff8516908110610f4957fe5b6000918252602090912060066007909202019081015490915060ff16151560011415610f785760019150610833565b4281600501541115610f8d5760009150610833565b600281015415801590610faa5750610fa361103d565b8160020154115b15610fb85760009150610833565b60068101805460ff1916600190811790915560ff84161415610fdc57610fdc611aaa565b50600192915050565b610e1081565b60055433600160a060020a0390811691161461100657600080fd5b600160a060020a038116151561101b57600080fd5b60088054600160a060020a031916600160a060020a0392909216919091179055565b600754600090600160a060020a03166318160ddd82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561108757600080fd5b6102c65a03f1151561109857600080fd5b505050604051805191505090565b60055433600160a060020a039081169116146110c157600080fd5b600160a060020a03811615156110d657600080fd5b60078054600160a060020a031916600160a060020a0392909216919091179055565b600d5490565b600654600160a060020a031681565b600554600090819033600160a060020a0390811691161461112d57600080fd5b8315806111415750600160a060020a038516155b8061114a575082155b156111585760009150610ef3565b610e476111658585611561565b859063ffffffff6111d916565b600754600160a060020a031681565b60055433600160a060020a0390811691161461119c57600080fd5b600160a060020a03811615156111b157600080fd5b60068054600160a060020a031916600160a060020a0392909216919091179055565b600b5490565b6000828201838110156111e857fe5b8091505b5092915050565b30600160a060020a03163161123a60408051908101604052600381527f55524c00000000000000000000000000000000000000000000000000000000006020820152611c2a565b11156112f6577f096835e36c2ccea88ff2b3aca87dfc938b977e52ea656873ff76a8dba50d4d346040516020808252604b908201527f4f7261636c697a6520717565727920776173204e4f542073656e742c20706c656040808301919091527f6173652061646420736f6d652045544820746f20636f76657220666f7220746860608301527f6520717565727920666565000000000000000000000000000000000000000000608083015260a0909101905180910390a1610dde565b7f096835e36c2ccea88ff2b3aca87dfc938b977e52ea656873ff76a8dba50d4d3460405160208082526035908201527f4f7261636c697a65207175657279207761732073656e742c207374616e64696e6040808301919091527f6720627920666f722074686520616e737765722e2e000000000000000000000060608301526080909101905180910390a16114426040805190810160405280600381526020017f55524c0000000000000000000000000000000000000000000000000000000000815250608060405190810160405280604c81526020017f6a736f6e2868747470733a2f2f6170692e6b72616b656e2e636f6d2f302f707581526020017f626c69632f5469636b65723f706169723d455448555344292e726573756c742e81526020017f584554485a5553442e632e300000000000000000000000000000000000000000815250611db4565b50565b6000808084158061145b575060095460ff851690105b15611469576000925061071a565b6009805460ff861690811061147a57fe5b600091825260208220600791820201805491549094506115169261150a91600160a060020a03169063313ce56790604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156114dd57600080fd5b6102c65a03f115156114ee57600080fd5b505050604051805189915060ff16600a0a63ffffffff6120a416565b9063ffffffff611a1f16565b9050816001015481101561152d576000925061071a565b816003015461154a8261153e61103d565b9063ffffffff6111d916565b1115611559576000925061071a565b949350505050565b60008061156d83610b57565b905083158061157a575082155b8061158a575060095460ff821690105b1561159857600091506111ec565b60ff811615156115bf576115b8606461150a86603263ffffffff6120a416565b91506111ec565b8060ff16600114156115d5576115b884846120c8565b5060009392505050565b600a546115f2908463ffffffff6111d916565b600a55600b54611608908363ffffffff6111d916565b600b5561161484611a36565b8060ff166001141561166357600160a060020a0384166000908152600f6020526040902054611649908463ffffffff6111d916565b600160a060020a0385166000908152600f60205260409020555b50505050565b6000808060ff841615156116815761167f6121ca565b505b8360ff166001141561166357600854600160a060020a0316639e1d14f16000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156116d557600080fd5b6102c65a03f115156116e657600080fd5b5050506040518051935050600060ff84161161170157600080fd5b600091505b8260ff168260ff16101561166357600854600160a060020a031663de7bea748360006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561176757600080fd5b6102c65a03f1151561177857600080fd5b505050604051805190509050600e5481118015611797575080600b5410155b156117ab576117a46123cd565b50600e8190555b600190910190611706565b60008054600160a060020a031615806117e157506000546117df90600160a060020a031661259b565b155b156117f2576117f0600061259f565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561183b57600080fd5b6102c65a03f1151561184c57600080fd5b505050604051805160018054600160a060020a031916600160a060020a03928316179081905516905063c281d19e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561108757600080fd5b60006118bb6128ea565b5082600080805b8351811015611a02577f30000000000000000000000000000000000000000000000000000000000000008482815181106118f857fe5b016020015160f860020a900460f860020a02600160f860020a0319161015801561196957507f390000000000000000000000000000000000000000000000000000000000000084828151811061194a57fe5b016020015160f860020a900460f860020a02600160f860020a03191611155b156119bf5781156119885785151561198057611a02565b600019909501945b600a83029250603084828151811061199c57fe5b016020015160f860020a900460f860020a0260f860020a900403830192506119fa565b8381815181106119cb57fe5b016020015160f860020a900460f860020a02600160f860020a031916602e60f860020a0214156119fa57600191505b6001016118c2565b6000861115611a145785600a0a830292505b509095945050505050565b6000808284811515611a2d57fe5b04949350505050565b600160a060020a03811615801590611a675750600160a060020a03811660009081526010602052604090205460ff16155b1561144257600160a060020a0381166000908152601060205260409020805460ff19166001908117909155600d54611aa49163ffffffff6111d916565b600d5550565b600080611ab760016107da565b156107d057611ac46123cd565b50600754611b429060649061150a90600290600160a060020a031663d5abeb016000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611b1b57600080fd5b6102c65a03f11515611b2c57600080fd5b505050604051805191905063ffffffff6120a416565b600754600854919350600160a060020a03908116916340c10f19911663c516358f6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611b9a57600080fd5b6102c65a03f11515611bab57600080fd5b505050604051805190508460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515611c0257600080fd5b6102c65a03f11515611c1357600080fd5b50505060405180519150508181146107d057600080fd5b60008054600160a060020a03161580611c555750600054611c5390600160a060020a031661259b565b155b15611c6657611c64600061259f565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611caf57600080fd5b6102c65a03f11515611cc057600080fd5b505050604051805160018054600160a060020a031916600160a060020a03928316179081905516905063524f3889836000604051602001526040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d47578082015183820152602001611d2f565b50505050905090810190601f168015611d745780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1515611d9257600080fd5b6102c65a03f11515611da357600080fd5b50505060405180519150505b919050565b600080548190600160a060020a03161580611de15750600054611ddf90600160a060020a031661259b565b155b15611df257611df0600061259f565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611e3b57600080fd5b6102c65a03f11515611e4c57600080fd5b505050604051805160018054600160a060020a031916600160a060020a03928316179081905516905063524f3889856000604051602001526040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ed3578082015183820152602001611ebb565b50505050905090810190601f168015611f005780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1515611f1e57600080fd5b6102c65a03f11515611f2f57600080fd5b5050506040518051915050670de0b6b3a764000062030d403a0201811115611f5a57600091506111ec565b600154600160a060020a031663adf59f99826000878782604051602001526040518563ffffffff1660e060020a028152600401808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611fd1578082015183820152602001611fb9565b50505050905090810190601f168015611ffe5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561203457808201518382015260200161201c565b50505050905090810190601f1680156120615780820380516001836020036101000a031916815260200191505b50955050505050506020604051808303818588803b151561208157600080fd5b6125ee5a03f1151561209257600080fd5b50505050604051805195945050505050565b60008282028315806120c057508284828115156120bd57fe5b04145b15156111e857fe5b600080600960018154811015156120db57fe5b9060005260206000209060070201905062015180600b026121098260040154856128c590919063ffffffff16565b1015612125576115b8606461150a86601e63ffffffff6120a416565b6004810154621baf809061214090859063ffffffff6128c516565b101561215c576115b8606461150a86601463ffffffff6120a416565b60048101546228de809061217790859063ffffffff6128c516565b1015612193576115b8606461150a86600f63ffffffff6120a416565b600481015462360d80906121ae90859063ffffffff6128c516565b10156115d5576115b8606461150a86600a63ffffffff6120a416565b6008546000908190819081908190600160a060020a03166360a4d59982604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561221c57600080fd5b6102c65a03f1151561222d57600080fd5b5050506040518051945050600060ff85161161224857600080fd5b30600160a060020a0316319250600091505b8360ff168260ff1610156123c2576008546122f09060649061150a90600160a060020a031663a356fdf38660006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156122c657600080fd5b6102c65a03f115156122d757600080fd5b505050604051805187915060ff1663ffffffff6120a416565b90508360ff168260010160ff1614156123105750600160a060020a033016315b60008111156123b757600854600160a060020a031663858310d88360006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561236c57600080fd5b6102c65a03f1151561237d57600080fd5b5050506040518051600160a060020a0316905081156108fc0282604051600060405180830381858888f1935050505015156123b757600080fd5b60019091019061225a565b600194505050505090565b6008546000908190819081908190600160a060020a03166351b2270f82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561241f57600080fd5b6102c65a03f1151561243057600080fd5b5050506040518051945050600060ff85161161244b57600080fd5b30600160a060020a0316319250600091505b8360ff168260ff1610156123c2576008546124c99060649061150a90600160a060020a0316631c572f8c8660006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b15156122c657600080fd5b90508360ff168260010160ff1614156124e95750600160a060020a033016315b600081111561259057600854600160a060020a031663e4a13fa48360006040516020015260405160e060020a63ffffffff841602815260ff9091166004820152602401602060405180830381600087803b151561254557600080fd5b6102c65a03f1151561255657600080fd5b5050506040518051600160a060020a0316905081156108fc0282604051600060405180830381858888f19350505050151561259057600080fd5b60019091019061245d565b3b90565b6000806125bf731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed61259b565b111561262f5760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17905561262760408051908101604052600b81527f6574685f6d61696e6e657400000000000000000000000000000000000000000060208201526128d7565b506001611daf565b600061264e73c03a2615d5efaf5f49f60b7bb6583eaec212fdf161259b565b11156126b65760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf117905561262760408051908101604052600c81527f6574685f726f707374656e33000000000000000000000000000000000000000060208201526128d7565b60006126d573b7a07bcf2ba2f2703b24c0691b5278999c59ac7e61259b565b111561273d5760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e17905561262760408051908101604052600981527f6574685f6b6f76616e000000000000000000000000000000000000000000000060208201526128d7565b600061275c73146500cfd35b22e4a392fe0adc06de1a1368ed4861259b565b11156127c45760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed4817905561262760408051908101604052600b81527f6574685f72696e6b65627900000000000000000000000000000000000000000060208201526128d7565b60006127e3736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47561259b565b1115612817575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4751790556001611daf565b60006128367320e12a1f859b3feae5fb2a0a32c18f5a65555bbf61259b565b111561286a575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf1790556001611daf565b60006128897351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa61259b565b11156128bd575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa1790556001611daf565b506000919050565b6000828211156128d157fe5b50900390565b60028180516107d09291602001906128fc565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061293d57805160ff191683800117855561296a565b8280016001018555821561296a579182015b8281111561296a57825182559160200191906001019061294f565b5061297692915061297a565b5090565b610da191905b8082111561297657600081556001016129805600a165627a7a723058201a328892dc1165bcb813019fdbdb6d34508022cf12cc15181275a56539ea0fba0029

Swarm Source

bzzr://1a328892dc1165bcb813019fdbdb6d34508022cf12cc15181275a56539ea0fba

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.