Sponsored Link: Defeat FB+GOOG with Wolk's Decentralized Data ExchangeDownload Whitepaper and Participate in Token Event 8/28.
Contract Overview
ETH Balance: 0.083866914316549479 Ether
ETH USD Value: $26.94 (@ $321.17/ETH)
No Of Transactions: 174 txns
  Latest 25 txns from a total Of 174 transactions View All

TxHash Age From To Value [TxFee]
0x71fd66ecc41f0146a3bb998a19e711003ab64af067a1479a7951bb24b33439a010 hrs 52 mins agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.0017338
0x4681245918ad288cbd7991dedf53e917b5acf2ad723893c330208cbdc0a5a62e10 hrs 56 mins agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.0035321
0x210e4c1507c25d02250bf7b76402f960dd0e6e5f6344318c547d735ca20f6f3f10 hrs 56 mins ago0xbd3eb998c2df0d29ce96b56adf6a7c19881b66d9  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.05 Ether0.002719227
0x7146f1ab0c2b93c06bdb718a721d7a4501767d7d0a2977b9d6656616a3831cb19 days 10 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.004
0xf91ee398cbef12362bb948535894317696fba62fd9864d366b7e387c10312cdb9 days 10 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.0035321
0xd97013529233c24ad2eadc163cfeba14b6fb9d7b9d783ca299e135a41ce4619c9 days 10 hrs ago0x8e822b876dc9d223f75b59b4927ef57760d869da  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.05 Ether0.002719227
0x0e2e8926c88d9a8cc0b35704f0217aa855a24d11db946c39d096e9ea108544d89 days 10 hrs ago0x8e822b876dc9d223f75b59b4927ef57760d869da  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc1 Ether0.000653457
0xa2c77b9e20573809eeac2a24d3f0e61d226c6a11852cf46fa2826427967b5d0414 days 14 hrs ago0x73fdcc6552b6bc79ada5af3d3ac64678727a25b3  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.00060032
0x7977db7d9d1099b7887ba622720f8e9d69add086c55630a5153d3f65bbc7d33616 days 3 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.0017338
0xc07687b52a1f19ad44a821f85350844dfa6ed29163d3e8b3c0f94d6c71ef43bf16 days 3 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.00353082
0xa64e0becafa476fd4d2ca20e177d6d803eabbaf6935cc4ec83f88379783660d816 days 3 hrs ago0x7b8fe420548c09cfc22b86669533c41c39753676  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.02 Ether0.002719227
0x3756f1e1b3fa7519631bff9aad790cbaac078f477b11f3e810dd0630a366d1f716 days 4 hrs ago0x7b8fe420548c09cfc22b86669533c41c39753676  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.1 Ether0.000653457
0xc0ae2866013f72d266351f605b73aee17b0ef76acd77b0ddf0be69dcfc83764921 days 20 hrs ago0x73fdcc6552b6bc79ada5af3d3ac64678727a25b3  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.2 Ether0.00047156
0xabdd92c5edbe49795c7d22a234cf1b397cfa257a1739fd8573437a610418810022 days 11 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.00194432
0xcce0a98829b8d22c1de960167d42ca28168a605a9688a481adcf67978fba811d22 days 11 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.00353082
0x5326c3b837ca82736a88d47e7c8efd79629712a78a5f5fb9036297ea97c8c7b422 days 11 hrs ago0x5c1c9d5732b541edc5d7bf7b280521b683d49d0a  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.01 Ether0.002719227
0xa4010e50a5cc68ffb512e0e80ce41cb9514ad1926d5e083ceda8b736433c808822 days 12 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.0017338
0x26dbfa5ee67a2d7456ea1a15186c4afb8f058fc1a2bcbdf149c45477c7e4ddcb22 days 13 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.0035321
0xe885d47d2b1d4ad7dc507f524daa6e0014ae93afcd6330e5f7ec99f2e75a2a4d22 days 13 hrs ago0x5c1c9d5732b541edc5d7bf7b280521b683d49d0a  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.01 Ether0.002719227
0x0aa6640e7e5ce2d40d95fed190e6bdeeeb51137f9a4d3958789c48875bd7605a22 days 13 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.00194432
0x2bc926a659024f894c6421504f65ac49085308f38eb86272dbf3403652a9338522 days 13 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.0035321
0x1b0bbb22137352b8f9fb67a742ff9bba4ed31169c180c2bad108a280560b46c922 days 13 hrs ago0x5c1c9d5732b541edc5d7bf7b280521b683d49d0a  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.01 Ether0.002719227
0x773d07bb0497d4a0be32df25ca96e830db9d7bb2a3a64f24ed9653e626cccb3822 days 13 hrs ago0x5c1c9d5732b541edc5d7bf7b280521b683d49d0a  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0.01 Ether0.0021
0x515f1cbc265e7883f42b630200168d774f214041fe15221785f7e1c50cc1464123 days 16 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.00194432
0x69a6218a7fb838a462c6a449a726d6e7b31452188e04fd80b9972d58e0463e8723 days 16 hrs agoOraclize  IN   0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0 Ether0.00353082
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0x71fd66ecc41f0146a3bb998a19e711003ab64af067a1479a7951bb24b33439a0419158710 hrs 52 mins ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0xbd3eb998c2df0d29ce96b56adf6a7c19881b66d91 wei
0x4681245918ad288cbd7991dedf53e917b5acf2ad723893c330208cbdc0a5a62e419158010 hrs 56 mins ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00403327142086313 Ether
0x210e4c1507c25d02250bf7b76402f960dd0e6e5f6344318c547d735ca20f6f3f419157810 hrs 56 mins ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00403327142086313 Ether
0xf91ee398cbef12362bb948535894317696fba62fd9864d366b7e387c10312cdb41542239 days 10 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00403327142086313 Ether
0xd97013529233c24ad2eadc163cfeba14b6fb9d7b9d783ca299e135a41ce4619c41542219 days 10 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00403327142086313 Ether
0x0e2e8926c88d9a8cc0b35704f0217aa855a24d11db946c39d096e9ea108544d841541709 days 10 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x8e822b876dc9d223f75b59b4927ef57760d869da0.999999999999998 Ether
0xa2c77b9e20573809eeac2a24d3f0e61d226c6a11852cf46fa2826427967b5d04413296414 days 14 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x73fdcc6552b6bc79ada5af3d3ac64678727a25b30.290046855509572528 Ether
0x7977db7d9d1099b7887ba622720f8e9d69add086c55630a5153d3f65bbc7d336412668416 days 3 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x7b8fe420548c09cfc22b86669533c41c397536761 wei
0xc07687b52a1f19ad44a821f85350844dfa6ed29163d3e8b3c0f94d6c71ef43bf412667116 days 3 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0xa64e0becafa476fd4d2ca20e177d6d803eabbaf6935cc4ec83f88379783660d8412666916 days 3 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0x3756f1e1b3fa7519631bff9aad790cbaac078f477b11f3e810dd0630a366d1f7412655416 days 4 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x7b8fe420548c09cfc22b86669533c41c397536760.099999999999998 Ether
0xabdd92c5edbe49795c7d22a234cf1b397cfa257a1739fd8573437a6104188100410108722 days 11 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x5c1c9d5732b541edc5d7bf7b280521b683d49d0a0.0175 Ether
0xcce0a98829b8d22c1de960167d42ca28168a605a9688a481adcf67978fba811d410108022 days 11 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0x5326c3b837ca82736a88d47e7c8efd79629712a78a5f5fb9036297ea97c8c7b4410107822 days 11 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0xa4010e50a5cc68ffb512e0e80ce41cb9514ad1926d5e083ceda8b736433c8088410083622 days 12 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x5c1c9d5732b541edc5d7bf7b280521b683d49d0a1 wei
0x26dbfa5ee67a2d7456ea1a15186c4afb8f058fc1a2bcbdf149c45477c7e4ddcb410082822 days 13 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0xe885d47d2b1d4ad7dc507f524daa6e0014ae93afcd6330e5f7ec99f2e75a2a4d410082322 days 13 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0x0aa6640e7e5ce2d40d95fed190e6bdeeeb51137f9a4d3958789c48875bd7605a410071722 days 13 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x5c1c9d5732b541edc5d7bf7b280521b683d49d0a0.0175 Ether
0x2bc926a659024f894c6421504f65ac49085308f38eb86272dbf3403652a93385410070722 days 13 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0x1b0bbb22137352b8f9fb67a742ff9bba4ed31169c180c2bad108a280560b46c9410070322 days 13 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0x773d07bb0497d4a0be32df25ca96e830db9d7bb2a3a64f24ed9653e626cccb38410069422 days 13 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0x515f1cbc265e7883f42b630200168d774f214041fe15221785f7e1c50cc14641409545323 days 16 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0xfc6d39f08fa0850a84cb1b5efa165202942cab760.0175 Ether
0x69a6218a7fb838a462c6a449a726d6e7b31452188e04fd80b9972d58e0463e87409544623 days 16 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0xde24fa16e1dadae19fea1d3a3517f66a259db62fbe020c7774f2326b89695f50409544423 days 16 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0x6f28b146804dba2d6f944c03528a8fdbc673df2c0.00407352984010752 Ether
0x89c21cf8dd1b85ddd4ab1a80ed71e2f0f9efdffc5e03cf91e174aac7c68c3217409543323 days 16 hrs ago0xdd97853ba34af302f3d6a6415a750ae38e26d1fc0xfc6d39f08fa0850a84cb1b5efa165202942cab761 wei
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to DelegateCallReturnValue (low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: betContractUP
Compiler Version: v0.4.14-nightly.2017.7.21+commit.75b48616
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
// <ORACLIZE_API>
/*
Copyright (c) 2015-2016 Oraclize SRL
Copyright (c) 2016 Oraclize LTD



Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:



The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.



THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

pragma solidity ^0.4.0;//please import oraclizeAPI_pre0.4.sol when solidity < 0.4.0

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 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 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;
        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
        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;
        
        bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName());
        if (proofVerified == false) throw;
        
        _;
    }
    
    function matchBytes32Prefix(bytes32 content, bytes prefix) internal returns (bool){
        bool match_ = true;
        
        for (var i=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?
        }

        // 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>


//UP Contract

pragma solidity ^0.4.0;

contract betContractUP is usingOraclize
{

    event UpSuccess (string status,address indexed EtherSentBy);
    event UpPlayerResult(string result,address indexed player, uint query1Result,uint query2Result,uint time);
    event UpStats(uint indexed totalBets, uint indexed total_amount_won , uint indexed total_bets_won , uint win_rate );
    
    uint public UP_totalBets; // to store total no of bets
    uint public UP_etherWin; // total amount of ether Won by players
    uint public UP_winBets; // total no of bets 
    uint public UP_winRate; // to store win rate percentage
    uint public min_bet = 10000000000000000; //In wei
    uint public max_bet = 50000000000000000; //In wei
    
   struct Player
    {
    address playerAddress;
    uint playerbetvalue;
    bytes32 queryid1;
    bytes32 queryid2;
    uint queryResult1;
    uint queryResult2;
    }
  
   mapping (bytes32 => Player) Players;
 
    address owner;   //address owner of the contract

      // Functions with this modifier can only be executed by the owner
    modifier onlyOwner() {
       if (msg.sender != owner) {
         throw;
        }
       _;
     }
    
     function ()payable
     {
       if (msg.sender == owner)
       {
           UpSuccess("Contract is funded", owner);
       }
       else
       {
       createBet();
       }
     }
     
    function createBet()payable
    {  
       if(msg.value > max_bet || msg.value < min_bet)
       {
           UpSuccess("Invalid payment",msg.sender);
           msg.sender.transfer(msg.value - 2000);

       }
       else
       {
       UpSuccess("payment received",msg.sender);
       bytes32 rngId1= oraclize_query("URL","json(https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD).USD");
       
       Players[rngId1].playerAddress = msg.sender;
       Players[rngId1].playerbetvalue = msg.value;
       Players[rngId1].queryid1 = rngId1;
       Players[rngId1].queryid2 = 0;
       }
    }
    
    function betContractUP()payable
    {
        owner = msg.sender;
    }
    
      function __callback(bytes32 myid, string result)
      {
    if (msg.sender != oraclize_cbAddress())
         {
      // just to be sure the calling address is the Oraclize authorized one
      throw;
         }
    
        if (Players[myid].queryid1==myid && Players[myid].queryid2 == 0)
        {
            
             Players[myid].queryResult1 = stringToUint(result);
             bytes32 rngId2= oraclize_query(120,"URL","json(https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD).USD");
           
            Players[myid].queryid1=0;
            Players[rngId2].queryid1=0;
            Players[rngId2].playerAddress=Players[myid].playerAddress;
            Players[rngId2].playerbetvalue = Players[myid].playerbetvalue;
            Players[rngId2].queryResult1=Players[myid].queryResult1;
            Players[rngId2].queryid2=rngId2;
            
        }
        else if(Players[myid].queryid2==myid && Players[myid].queryid1==0)
        {
            
            /* the result is checked based on the results  
         fetched in call back function */
          
            Players[myid].queryResult2 = stringToUint(result);
        
        if(Players[myid].queryResult1  < Players[myid].queryResult2)
        {
            //player wins
            UP_totalBets++;
            UP_winBets++;
            UP_winRate = UP_winBets*10000/UP_totalBets; // Must be DIVIDED BY 100 when displayed on frontend
            UP_etherWin = UP_etherWin+((Players[myid].playerbetvalue *75)/100);
            UpPlayerResult("WIN",Players[myid].playerAddress,Players[myid].queryResult1,Players[myid].queryResult2,now);
            winnerReward(Players[myid].playerAddress,Players[myid].playerbetvalue);
        }
        else if(Players[myid].queryResult1 > Players[myid].queryResult2)
        {
            //player loses
            UP_totalBets++;
            UP_winRate = UP_winBets*10000/UP_totalBets; 
            UpPlayerResult("LOSE", Players[myid].playerAddress,Players[myid].queryResult1,Players[myid].queryResult2,now);
            loser(Players[myid].playerAddress);
        }
        else if(Players[myid].queryResult1 == Players[myid].queryResult2)
        {
            UP_totalBets++;
            UP_winRate = UP_winBets*10000/UP_totalBets;
            //bet draws if the price neither goes up nor down
            UpPlayerResult("DRAW",Players[myid].playerAddress,Players[myid].queryResult1,Players[myid].queryResult2,now);
            draw(Players[myid].playerAddress,Players[myid].playerbetvalue);
        }
        }

      }
       
    function winnerReward(address player,uint betvalue) payable
    {
        uint winningAmount = (betvalue * 175)/100;
        player.transfer(winningAmount);
        UpStats(UP_totalBets,UP_etherWin,UP_winBets,UP_winRate);
    }
    
    function loser(address player) payable
    {
        player.transfer(1);
        UpStats(UP_totalBets,UP_etherWin,UP_winBets,UP_winRate);
    }
    function draw(address player,uint betvalue) payable
    {
        player.transfer(betvalue);
        UpStats(UP_totalBets,UP_etherWin,UP_winBets,UP_winRate);
    }
    
  /* Failsafe drain - owner can withdraw all the ether from the contract
  */
	function drain()payable onlyOwner 
	{
		owner.transfer(this.balance);
	}
	
	function setMinBet(uint newMinBet) onlyOwner
	{
	    min_bet = newMinBet;
	}
	
	function setMaxBet(uint newMaxBet) onlyOwner
	{
	    max_bet = newMaxBet;
	}
	//Below function will convert string to integer removing decimal
	  function stringToUint(string s) returns (uint) {
        bytes memory b = bytes(s);
        uint i;
        uint result1 = 0;
        for (i = 0; i < b.length; i++) {
            uint c = uint(b[i]);
            if(c == 46)
            {
                // Do nothing --this will skip the decimal
            }
          else if (c >= 48 && c <= 57) {
                result1 = result1 * 10 + (c - 48);
              // usd_price=result;
                
            }
        }
        if (result1 < 10000) 
        {
            result1=result1*100;
            return result1;
        }
        else if(result1 < 100000)
        {
            result1=result1*10;
            return result1;
        }
        else
        {
            return result1;
        }
    }
}

  Contract ABI  
[{"constant":true,"inputs":[],"name":"UP_winRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"s","type":"string"}],"name":"stringToUint","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"UP_totalBets","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"},{"name":"proof","type":"bytes"}],"name":"__callback","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"player","type":"address"},{"name":"betvalue","type":"uint256"}],"name":"draw","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"UP_etherWin","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"max_bet","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newMaxBet","type":"uint256"}],"name":"setMaxBet","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newMinBet","type":"uint256"}],"name":"setMinBet","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"drain","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"UP_winBets","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"player","type":"address"}],"name":"loser","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"min_bet","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"player","type":"address"},{"name":"betvalue","type":"uint256"}],"name":"winnerReward","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[],"name":"createBet","outputs":[],"payable":true,"type":"function"},{"inputs":[],"payable":true,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"status","type":"string"},{"indexed":true,"name":"EtherSentBy","type":"address"}],"name":"UpSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"result","type":"string"},{"indexed":true,"name":"player","type":"address"},{"indexed":false,"name":"query1Result","type":"uint256"},{"indexed":false,"name":"query2Result","type":"uint256"},{"indexed":false,"name":"time","type":"uint256"}],"name":"UpPlayerResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"totalBets","type":"uint256"},{"indexed":true,"name":"total_amount_won","type":"uint256"},{"indexed":true,"name":"total_bets_won","type":"uint256"},{"indexed":false,"name":"win_rate","type":"uint256"}],"name":"UpStats","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052662386f26fc1000060095566b1a2bc2ec50000600a555b33600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b6126f68061006d6000396000f300606060405236156100e4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d7ccef146101f25780631bd951551461021b5780631e8a98cf1461028c57806327dc297e146102b557806338bbfa501461031f5780634a03707c146103cc57806357820829146104035780636a8e87111461042c578063881eff1e1461045557806388ea41b9146104785780639890220b1461049b5780639ce3f461146104a5578063c5d51586146104ce578063ca53135a146104fc578063d7a1595114610525578063dec9ba441461055c575b6101f05b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156101e457600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f483c8abd58112072502af47ea70db52cdf20bdc7e1f3d41284300131b1fd3dcd6040518080602001828103825260128152602001807f436f6e74726163742069732066756e646564000000000000000000000000000081525060200191505060405180910390a26101ed565b6101ec610566565b5b5b565b005b34156101fd57600080fd5b61020561085f565b6040518082815260200191505060405180910390f35b341561022657600080fd5b610276600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610865565b6040518082815260200191505060405180910390f35b341561029757600080fd5b61029f61098b565b6040518082815260200191505060405180910390f35b34156102c057600080fd5b61031d60048080356000191690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610991565b005b341561032a57600080fd5b6103ca60048080356000191690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611341565b005b610401600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611347565b005b341561040e57600080fd5b6104166113ce565b6040518082815260200191505060405180910390f35b341561043757600080fd5b61043f6113d4565b6040518082815260200191505060405180910390f35b341561046057600080fd5b61047660048080359060200190919050506113da565b005b341561048357600080fd5b6104996004808035906020019091905050611442565b005b6104a36114aa565b005b34156104b057600080fd5b6104b8611583565b6040518082815260200191505060405180910390f35b6104fa600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611589565b005b341561050757600080fd5b61050f611610565b6040518082815260200191505060405180910390f35b61055a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611616565b005b610564610566565b005b6000600a54341180610579575060095434105b15610646573373ffffffffffffffffffffffffffffffffffffffff167f483c8abd58112072502af47ea70db52cdf20bdc7e1f3d41284300131b1fd3dcd60405180806020018281038252600f8152602001807f496e76616c6964207061796d656e74000000000000000000000000000000000081525060200191505060405180910390a23373ffffffffffffffffffffffffffffffffffffffff166108fc6107d034039081150290604051600060405180830381858888f19350505050151561064157600080fd5b61085b565b3373ffffffffffffffffffffffffffffffffffffffff167f483c8abd58112072502af47ea70db52cdf20bdc7e1f3d41284300131b1fd3dcd6040518080602001828103825260108152602001807f7061796d656e742072656365697665640000000000000000000000000000000081525060200191505060405180910390a26107866040805190810160405280600381526020017f55524c0000000000000000000000000000000000000000000000000000000000815250608060405190810160405280604981526020017f6a736f6e2868747470733a2f2f6d696e2d6170692e63727970746f636f6d706181526020017f72652e636f6d2f646174612f70726963653f6673796d3d425443267473796d7381526020017f3d555344292e55534400000000000000000000000000000000000000000000008152506116b2565b905033600b6000836000191660001916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034600b600083600019166000191681526020019081526020016000206001018190555080600b6000836000191660001916815260200190815260200160002060020181600019169055506000600102600b6000836000191660001916815260200190815260200160002060030181600019169055505b5b50565b60085481565b600061086f612611565b600080600085935060009150600092505b835183101561094757838381518110151561089757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090049050602e81141561091557610939565b60308110158015610927575060398111155b156109385760308103600a83020191505b5b5b8280600101935050610880565b61271082101561095f57606482029150819450610982565b620186a082101561097857600a82029150819450610982565b819450610982565b5b5b50505050919050565b60055481565b600061099b611af9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109d457600080fd5b8260001916600b600085600019166000191681526020019081526020016000206002015460001916148015610a2e57506000600102600b600085600019166000191681526020019081526020016000206003015460001916145b15610cc257610a3c82610865565b600b6000856000191660001916815260200190815260200160002060040181905550610b2160786040805190810160405280600381526020017f55524c0000000000000000000000000000000000000000000000000000000000815250608060405190810160405280604981526020017f6a736f6e2868747470733a2f2f6d696e2d6170692e63727970746f636f6d706181526020017f72652e636f6d2f646174612f70726963653f6673796d3d425443267473796d7381526020017f3d555344292e5553440000000000000000000000000000000000000000000000815250611d12565b90506000600102600b6000856000191660001916815260200190815260200160002060020181600019169055506000600102600b600083600019166000191681526020019081526020016000206002018160001916905550600b6000846000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600b6000836000191660001916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600b6000846000191660001916815260200190815260200160002060010154600b6000836000191660001916815260200190815260200160002060010181905550600b6000846000191660001916815260200190815260200160002060040154600b600083600019166000191681526020019081526020016000206004018190555080600b60008360001916600019168152602001908152602001600020600301816000191690555061133b565b8260001916600b600085600019166000191681526020019081526020016000206003015460001916148015610d1c57506000600102600b600085600019166000191681526020019081526020016000206002015460001916145b1561133a57610d2a82610865565b600b6000856000191660001916815260200190815260200160002060050181905550600b6000846000191660001916815260200190815260200160002060050154600b60008560001916600019168152602001908152602001600020600401541015610f825760056000815480929190600101919050555060076000815480929190600101919050555060055461271060075402811515610dc757fe5b046008819055506064604b600b600086600019166000191681526020019081526020016000206001015402811515610dfb57fe5b0460065401600681905550600b6000846000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f73f5edce36937b42a46ccd4bce8d6e3d1cf1d4b3323ff91fa77b4d28099e132c600b6000866000191660001916815260200190815260200160002060040154600b6000876000191660001916815260200190815260200160002060050154426040518080602001858152602001848152602001838152602001828103825260038152602001807f57494e000000000000000000000000000000000000000000000000000000000081525060200194505050505060405180910390a2610f7d600b6000856000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600b6000866000191660001916815260200190815260200160002060010154611616565b611339565b600b6000846000191660001916815260200190815260200160002060050154600b6000856000191660001916815260200190815260200160002060040154111561114f5760056000815480929190600101919050555060055461271060075402811515610feb57fe5b04600881905550600b6000846000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f73f5edce36937b42a46ccd4bce8d6e3d1cf1d4b3323ff91fa77b4d28099e132c600b6000866000191660001916815260200190815260200160002060040154600b6000876000191660001916815260200190815260200160002060050154426040518080602001858152602001848152602001838152602001828103825260048152602001807f4c4f53450000000000000000000000000000000000000000000000000000000081525060200194505050505060405180910390a261114a600b6000856000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611589565b611338565b600b6000846000191660001916815260200190815260200160002060050154600b6000856000191660001916815260200190815260200160002060040154141561133757600560008154809291906001019190505550600554612710600754028115156111b857fe5b04600881905550600b6000846000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f73f5edce36937b42a46ccd4bce8d6e3d1cf1d4b3323ff91fa77b4d28099e132c600b6000866000191660001916815260200190815260200160002060040154600b6000876000191660001916815260200190815260200160002060050154426040518080602001858152602001848152602001838152602001828103825260048152602001807f445241570000000000000000000000000000000000000000000000000000000081525060200194505050505060405180910390a2611336600b6000856000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600b6000866000191660001916815260200190815260200160002060010154611347565b5b5b5b5b5b5b505050565b5b505050565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561138757600080fd5b6007546006546005547f73ce3c723d673a0dee9dbac4cef87e0583999295de26e5bb940f5aaabfa65a196008546040518082815260200191505060405180910390a45b5050565b60065481565b600a5481565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143657600080fd5b80600a819055505b5b50565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561149e57600080fd5b806009819055505b5b50565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561150657600080fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561157f57600080fd5b5b5b565b60075481565b8073ffffffffffffffffffffffffffffffffffffffff166108fc60019081150290604051600060405180830381858888f1935050505015156115ca57600080fd5b6007546006546005547f73ce3c723d673a0dee9dbac4cef87e0583999295de26e5bb940f5aaabfa65a196008546040518082815260200191505060405180910390a45b50565b60095481565b6000606460af830281151561162757fe5b0490508273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561166a57600080fd5b6007546006546005547f73ce3c723d673a0dee9dbac4cef87e0583999295de26e5bb940f5aaabfa65a196008546040518082815260200191505060405180910390a45b505050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611724575060006117226000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612159565b145b15611735576117336000612165565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156117c257600080fd5b6102c65a03f115156117d357600080fd5b50505060405180519050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663524f3889856000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118d15780820151818401525b6020810190506118b5565b50505050905090810190601f1680156118fe5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b151561191c57600080fd5b6102c65a03f1151561192d57600080fd5b50505060405180519050905062030d403a02670de0b6b3a76400000181111561195c5760006001029150611af1565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663adf59f9982600087876000604051602001526040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611a1e5780820151818401525b602081019050611a02565b50505050905090810190601f168015611a4b5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611a855780820151818401525b602081019050611a69565b50505050905090810190601f168015611ab25780820380516001836020036101000a031916815260200191505b50955050505050506020604051808303818588803b1515611ad257600080fd5b6125ee5a03f11515611ae357600080fd5b505050506040518051905091505b5b5092915050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611b6957506000611b676000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612159565b145b15611b7a57611b786000612165565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515611c0757600080fd5b6102c65a03f11515611c1857600080fd5b50505060405180519050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515611cf057600080fd5b6102c65a03f11515611d0157600080fd5b5050506040518051905090505b5b90565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611d8457506000611d826000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612159565b145b15611d9557611d936000612165565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515611e2257600080fd5b6102c65a03f11515611e3357600080fd5b50505060405180519050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663524f3889856000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f315780820151818401525b602081019050611f15565b50505050905090810190601f168015611f5e5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1515611f7c57600080fd5b6102c65a03f11515611f8d57600080fd5b50505060405180519050905062030d403a02670de0b6b3a764000001811115611fbc5760006001029150612150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663adf59f99828787876000604051602001526040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561207d5780820151818401525b602081019050612061565b50505050905090810190601f1680156120aa5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156120e45780820151818401525b6020810190506120c8565b50505050905090810190601f1680156121115780820380516001836020036101000a031916815260200191505b50955050505050506020604051808303818588803b151561213157600080fd5b6125ee5a03f1151561214257600080fd5b505050506040518051905091505b5b509392505050565b6000813b90505b919050565b600080612185731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed612159565b111561222657731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061221d6040805190810160405280600b81526020017f6574685f6d61696e6e65740000000000000000000000000000000000000000008152506125f6565b600190506125f1565b600061224573c03a2615d5efaf5f49f60b7bb6583eaec212fdf1612159565b11156122e65773c03a2615d5efaf5f49f60b7bb6583eaec212fdf16000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506122dd6040805190810160405280600c81526020017f6574685f726f707374656e3300000000000000000000000000000000000000008152506125f6565b600190506125f1565b600061230573b7a07bcf2ba2f2703b24c0691b5278999c59ac7e612159565b11156123a65773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061239d6040805190810160405280600981526020017f6574685f6b6f76616e00000000000000000000000000000000000000000000008152506125f6565b600190506125f1565b60006123c573146500cfd35b22e4a392fe0adc06de1a1368ed48612159565b11156124665773146500cfd35b22e4a392fe0adc06de1a1368ed486000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061245d6040805190810160405280600b81526020017f6574685f72696e6b6562790000000000000000000000000000000000000000008152506125f6565b600190506125f1565b6000612485736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475612159565b11156124e857736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506125f1565b60006125077320e12a1f859b3feae5fb2a0a32c18f5a65555bbf612159565b111561256a577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506125f1565b60006125897351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa612159565b11156125ec577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506125f1565b600090505b919050565b806002908051906020019061260c929190612625565b505b50565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061266657805160ff1916838001178555612694565b82800160010185558215612694579182015b82811115612693578251825591602001919060010190612678565b5b5090506126a191906126a5565b5090565b6126c791905b808211156126c35760008160009055506001016126ab565b5090565b905600a165627a7a723058208ecae726ace48107f640a6ff15493038a2a0690fd1e30a2fb485331871c9e1a90029

   Swarm Source:
bzzr://8ecae726ace48107f640a6ff15493038a2a0690fd1e30a2fb485331871c9e1a9
View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.