ETH Price: $2,151.85 (-1.95%)

Contract

0x5A13CAA82851342E14cd2Ad0257707CDdb8A31b7
 

Overview

ETH Balance

50 wei

Eth Value

Less Than $0.01 (@ $2,151.85/ETH)

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Balance231520252025-08-16 7:11:59215 days ago1755328319IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000006690.2824018
Withdraw Balance231387802025-08-14 10:46:11217 days ago1755168371IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000036541.54155858
Withdraw Balance231229062025-08-12 5:33:47219 days ago1754976827IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000007470.31550758
Withdraw Balance231224342025-08-12 3:59:23219 days ago1754971163IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000008680.36619287
Withdraw Balance231212452025-08-12 0:00:59219 days ago1754956859IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000009660.40787596
Withdraw Balance231101402025-08-10 10:44:23221 days ago1754822663IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000009190.3879538
Withdraw Balance231087512025-08-10 6:04:23221 days ago1754805863IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.00000910.38415675
Withdraw Balance231051472025-08-09 17:58:59222 days ago1754762339IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000019980.84318813
Withdraw Balance230987592025-08-08 20:35:35223 days ago1754685335IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000017980.75858467
Withdraw Balance230904812025-08-07 16:49:35224 days ago1754585375IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000042671.80018547
Withdraw Balance230826522025-08-06 14:33:59225 days ago1754490839IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000024141.01856802
Withdraw Balance230744422025-08-05 11:03:35226 days ago1754391815IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000005730.24176049
Withdraw Balance230730542025-08-05 6:24:47226 days ago1754375087IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000006190.26114277
Withdraw Balance230716662025-08-05 1:45:11226 days ago1754358311IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000004670.19735198
Withdraw Balance230709362025-08-04 23:18:11226 days ago1754349491IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000005330.2250902
Withdraw Balance230694722025-08-04 18:24:47227 days ago1754331887IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000014170.59781552
Withdraw Balance230632162025-08-03 21:26:35228 days ago1754256395IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000006150.25974929
Withdraw Balance230602242025-08-03 11:25:11228 days ago1754220311IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.00000680.28692809
Withdraw Balance230015962025-07-26 6:42:11236 days ago1753512131IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000007570.31958423
Withdraw Balance230013392025-07-26 5:50:35236 days ago1753509035IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000006090.25699227
Withdraw Balance230007282025-07-26 3:48:11236 days ago1753501691IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000007030.29662282
Withdraw Balance229992492025-07-25 22:50:23236 days ago1753483823IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000007460.31481533
Withdraw Balance229900532025-07-24 15:57:35238 days ago1753372655IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000035661.50474694
Withdraw Balance229837832025-07-23 18:54:35239 days ago1753296875IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000021850.92210403
Withdraw Balance229021022025-07-12 9:10:35250 days ago1752311435IN
0x5A13CAA8...Ddb8A31b7
0 ETH0.000098763.41133534
View all transactions

Latest 22 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer229021022025-07-12 9:10:35250 days ago1752311435
0x5A13CAA8...Ddb8A31b7
1.00939999 ETH
Transfer229019672025-07-12 8:43:35250 days ago1752309815
0x5A13CAA8...Ddb8A31b7
1.00939999 ETH
Transfer228758092025-07-08 16:57:35254 days ago1751993855
0x5A13CAA8...Ddb8A31b7
1.00939999 ETH
Transfer38901882017-06-18 1:07:303196 days ago1497748050
0x5A13CAA8...Ddb8A31b7
0.09639999 ETH
Transfer38695202017-06-14 3:39:383200 days ago1497411578
0x5A13CAA8...Ddb8A31b7
0.00814416 ETH
Transfer38634742017-06-13 0:08:253201 days ago1497312505
0x5A13CAA8...Ddb8A31b7
0.00814416 ETH
Transfer38634432017-06-13 0:01:423201 days ago1497312102
0x5A13CAA8...Ddb8A31b7
0.00814416 ETH
Transfer38613312017-06-12 14:34:543202 days ago1497278094
0x5A13CAA8...Ddb8A31b7
0.05879999 ETH
Transfer38610062017-06-12 13:02:553202 days ago1497272575
0x5A13CAA8...Ddb8A31b7
0.00814416 ETH
Transfer38580362017-06-11 23:10:303202 days ago1497222630
0x5A13CAA8...Ddb8A31b7
0.01959999 ETH
Transfer38572482017-06-11 19:37:263203 days ago1497209846
0x5A13CAA8...Ddb8A31b7
0.00818876 ETH
Transfer38563552017-06-11 15:44:133203 days ago1497195853
0x5A13CAA8...Ddb8A31b7
0.00818876 ETH
Transfer38552442017-06-11 10:36:463203 days ago1497177406
0x5A13CAA8...Ddb8A31b7
0.00818876 ETH
Transfer38543452017-06-11 6:24:053203 days ago1497162245
0x5A13CAA8...Ddb8A31b7
0.00818876 ETH
Transfer38542982017-06-11 6:11:483203 days ago1497161508
0x5A13CAA8...Ddb8A31b7
0.11759999 ETH
Transfer38542722017-06-11 6:06:173203 days ago1497161177
0x5A13CAA8...Ddb8A31b7
0.00818876 ETH
Transfer38542502017-06-11 5:59:153203 days ago1497160755
0x5A13CAA8...Ddb8A31b7
0.02939999 ETH
Transfer38542302017-06-11 5:53:393203 days ago1497160419
0x5A13CAA8...Ddb8A31b7
0.00818876 ETH
Transfer38533332017-06-11 1:50:403203 days ago1497145840
0x5A13CAA8...Ddb8A31b7
0.00818876 ETH
Transfer38533062017-06-11 1:43:473203 days ago1497145427
0x5A13CAA8...Ddb8A31b7
0.02939999 ETH
Transfer38532942017-06-11 1:39:573203 days ago1497145197
0x5A13CAA8...Ddb8A31b7
0.00059999 ETH
Transfer38531352017-06-11 0:55:193203 days ago1497142519
0x5A13CAA8...Ddb8A31b7
0.00818876 ETH
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

Contract Source Code Verified (Exact Match)

Contract Name:
EthereumPot

Compiler Version
v0.4.11+commit.68ef5810

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-06-11
*/

pragma solidity ^0.4.0;

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


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){
        networkID = networkID;
        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) {
        myid = myid; result = result; proof = 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) {
        _addr = _addr;
        assembly {
            _size := extcodesize(_addr)
        }
        _size = _size;
    }

    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();
        sessionKeyHash_bytes32 = sessionKeyHash_bytes32;
        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;
        from = from;
        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;
        hash = hash; v = v; r = r; s = s;
        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>
contract EthereumPot is usingOraclize {

    address public owner;
    address[] public addresses;
    address public winnerAddress;
    
    mapping(address => uint) public balances;
    
    uint[] public slots;
    uint minBetSize = 0.01 ether;
    uint public potSize = 0;
    uint public amountWon;
    uint public potTime = 300;
    uint public endTime = now + potTime;
    uint public totalBet = 0;
    uint public random_number;
    
    bool public locked = false;

    event debug(string msg);
    event debugInt(uint random);
    event potSizeChanged(
        uint _potSize
    );
    event winnerAnnounced(
        address winner,
        uint amount
    );
    event timeLeft(uint left);
    

    function EthereumPot() public {
        oraclize_setProof(proofType_Ledger); // sets the Ledger authenticity proof in the constructor
        owner = msg.sender;
    }
    
    function getBalance(address addr) constant returns(uint balance) {
        return balances[addr];
    }
    
    //allows users to withdraw balance
    function withdrawBalance() payable public {
        if(balances[msg.sender] > 0) {
            uint balance = balances[msg.sender];
            balances[msg.sender] = 0;
            if(!msg.sender.send(balance)) {
                balances[msg.sender] += balance;
            }
        }
    }
    
    
    function __callback(bytes32 _queryId, string _result, bytes _proof) oraclize_randomDS_proofVerify(_queryId, _result, _proof)
    {
        // if we reach this point successfully, it means that the attached authenticity proof has passed!
        if(msg.sender != oraclize_cbAddress()) throw;
        
         // generate a random number between potSize(number of tickets sold) and 1
        random_number = uint(sha3(_result))%potSize + 1;
        
          // find that winner based on the random number generated
        winnerAddress = findWinner(random_number);
        
        // winner wins 98% of the remaining balance after oraclize fees
        uint total = potSize * minBetSize - 400000;//less oraclize fee
        amountWon = total * 98 / 100 ;
        uint fee = total - amountWon;
        
        balances[winnerAddress] += amountWon;
        balances[owner] += fee;
        
        // announce winner
        winnerAnnounced(winnerAddress, amountWon);
        
        
        openPot();
        
    }
    
    function update() internal{
        uint delay = 0; // number of seconds to wait before the execution takes place
        bytes32 queryId = oraclize_newRandomDSQuery(delay, 10, 400000); 
        queryId = queryId;// this function internally generates the correct oraclize_query and returns its queryId
    }
    
    function findWinner(uint random) constant returns (address winner) {
        
        for(uint i = 0; i < slots.length; i++) {
            
           if(random <= slots[i]) {
               return addresses[i];
           }
            
        }    
        
    }
    
    function joinPot() public payable {
        
        if(now > endTime) throw;
        if(locked) throw;
        
        uint tickets = 0;
        
        for(uint i = msg.value; i >= minBetSize; i-= minBetSize) {
            tickets++;
        }
        if(tickets > 0) {
            addresses.push(msg.sender);
            slots.push(potSize += tickets);
            totalBet+= tickets;
            potSizeChanged(potSize);
            timeLeft(endTime - now);
        }
    }
    
    function getPlayers() constant public returns(address[]) {
        return addresses;
    }
    
    function getSlots() constant public returns(uint[]) {
        return slots;
    }

    function getEndTime() constant public returns (uint) {
        return endTime;
    }
    
    function openPot() internal {
        potSize = 0;
        endTime = now + potTime;
        timeLeft(endTime - now);
        delete slots;
        delete addresses;
        
        locked = false;
    }
    
    function rewardWinner() public payable {
        
        //assert time & locked state
        if(now < endTime) throw;
        //allow for a retry after potTime seconds
        if(locked && now < (endTime + potTime)) throw;
        locked = true;
        
        if(potSize > 0) {
            //if only 1 person bet, wait until they've been challenged
            if(addresses.length == 1) {
                endTime = now + potTime;
                timeLeft(endTime - now);
                locked = false;
            }
                
            else {
             update();
            }
            
        }
        else {
            winnerAnnounced(0x0000000000000000000000000000000000000000, 0);
            openPot();
        }
        
    }
    
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"random","type":"uint256"}],"name":"findWinner","outputs":[{"name":"winner","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"joinPot","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"amountWon","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"slots","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_queryId","type":"bytes32"},{"name":"_result","type":"string"},{"name":"_proof","type":"bytes"}],"name":"__callback","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getEndTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdrawBalance","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"random_number","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"potSize","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getPlayers","outputs":[{"name":"","type":"address[]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"locked","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"winnerAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"addresses","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"potTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getBalance","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getSlots","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalBet","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"rewardWinner","outputs":[],"payable":true,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"msg","type":"string"}],"name":"debug","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"random","type":"uint256"}],"name":"debugInt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_potSize","type":"uint256"}],"name":"potSizeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winner","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"winnerAnnounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"left","type":"uint256"}],"name":"timeLeft","type":"event"}]

6060604052662386f26fc10000600a556000600b81905561012c600d8190554201600e55600f556011805460ff1916905534156200003957fe5b5b620000737f300000000000000000000000000000000000000000000000000000000000000064010000000062002df76200009582021704565b60058054600160a060020a03191633600160a060020a03161790555b620006f4565b600054600160a060020a03161580620000d05750600054620000ce90600160a060020a031664010000000062001b736200022782021704565b155b15620000f257620000f0600064010000000062001b7b6200022f82021704565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b15156200016757fe5b6102c65a03f115156200017657fe5b505060408051805160018054600160a060020a031916600160a060020a0392831617908190557f688dcfd70000000000000000000000000000000000000000000000000000000083527fff000000000000000000000000000000000000000000000000000000000000008616600484015292519216925063688dcfd791602480830192600092919082900301818387803b15156200021057fe5b6102c65a03f115156200021f57fe5b5050505b5b50565b803b5b919050565b6000806200025f731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed64010000000062001b736200022782021704565b1115620002e25760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17905560408051808201909152600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152620002d9906401000000006200221c6200063082021704565b5060016200022a565b60006200031173c03a2615d5efaf5f49f60b7bb6583eaec212fdf164010000000062001b736200022782021704565b1115620003945760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf117905560408051808201909152600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152620002d9906401000000006200221c6200063082021704565b5060016200022a565b6000620003c373b7a07bcf2ba2f2703b24c0691b5278999c59ac7e64010000000062001b736200022782021704565b1115620004465760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e17905560408051808201909152600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152620002d9906401000000006200221c6200063082021704565b5060016200022a565b60006200047573146500cfd35b22e4a392fe0adc06de1a1368ed4864010000000062001b736200022782021704565b1115620004f85760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed4817905560408051808201909152600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152620002d9906401000000006200221c6200063082021704565b5060016200022a565b600062000527736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47564010000000062001b736200022782021704565b11156200055d575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47517905560016200022a565b60006200058c7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf64010000000062001b736200022782021704565b1115620005c2575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf17905560016200022a565b6000620005f17351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa64010000000062001b736200022782021704565b111562000627575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa17905560016200022a565b5060005b919050565b8051620006459060029060208401906200064a565b505b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200068d57805160ff1916838001178555620006bd565b82800160010185558215620006bd579182015b82811115620006bd578251825591602001919060010190620006a0565b5b50620006cc929150620006d0565b5090565b620006f191905b80821115620006cc5760008155600101620006d7565b5090565b90565b612f7680620007046000396000f3006060604052361561010c5763ffffffff60e060020a60003504166305e49d1d811461010e57806311daca811461013d57806327dc297e1461014757806327e235e3146101a057806328102e54146101ce5780633197cbb6146101f0578063387dd9e91461021257806338bbfa5014610237578063439f5ac2146102cd5780635fd8c710146102ef57806360a59bdb146102f957806368b6d55d1461031b5780638b5b9ccc1461033d5780638da5cb5b146103a8578063cf309012146103d4578063ed7a4e0b146103f8578063edf26d9b14610424578063f05a64bc14610453578063f8b2cb4f14610475578063fab2c469146104a3578063fe5e18531461050e578063febdb9b814610530575bfe5b341561011657fe5b61012160043561053a565b60408051600160a060020a039092168252519081900360200190f35b6101456105b1565b005b341561014f57fe5b60408051602060046024803582810135601f810185900485028601850190965285855261014595833595939460449493929092019181908401838280828437509496506106e895505050505050565b005b34156101a857fe5b6101bc600160a060020a0360043516610718565b60408051918252519081900360200190f35b34156101d657fe5b6101bc61072a565b60408051918252519081900360200190f35b34156101f857fe5b6101bc610730565b60408051918252519081900360200190f35b341561021a57fe5b6101bc600435610736565b60408051918252519081900360200190f35b341561023f57fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610145958335959394604494939290920191819084018382808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375094965061075995505050505050565b005b34156102d557fe5b6101bc6109ee565b60408051918252519081900360200190f35b6101456109f5565b005b341561030157fe5b6101bc610a7a565b60408051918252519081900360200190f35b341561032357fe5b6101bc610a80565b60408051918252519081900360200190f35b341561034557fe5b61034d610a86565b6040805160208082528351818301528351919283929083019185810191028083838215610395575b80518252602083111561039557601f199092019160209182019101610375565b5050509050019250505060405180910390f35b34156103b057fe5b610121610aef565b60408051600160a060020a039092168252519081900360200190f35b34156103dc57fe5b6103e4610afe565b604080519115158252519081900360200190f35b341561040057fe5b610121610b07565b60408051600160a060020a039092168252519081900360200190f35b341561042c57fe5b610121600435610b16565b60408051600160a060020a039092168252519081900360200190f35b341561045b57fe5b6101bc610b48565b60408051918252519081900360200190f35b341561047d57fe5b6101bc600160a060020a0360043516610b4e565b60408051918252519081900360200190f35b34156104ab57fe5b61034d610b6d565b6040805160208082528351818301528351919283929083019185810191028083838215610395575b80518252602083111561039557601f199092019160209182019101610375565b5050509050019250505060405180910390f35b341561051657fe5b6101bc610bcc565b60408051918252519081900360200190f35b610145610bd2565b005b6000805b6009548110156105aa57600980548290811061055657fe5b906000526020600020900160005b505483116105a157600680548290811061057a57fe5b906000526020600020900160005b9054906101000a9004600160a060020a031691506105aa565b5b60010161053e565b5b50919050565b60006000600e544211156105c55760006000fd5b60115460ff16156105d65760006000fd5b5060009050345b600a5481106105f7576001909101905b600a5490036105dd565b60008211156106e35760068054600181016106128382612c25565b916000526020600020900160005b8154600160a060020a033381166101009390930a928302920219161790555060098054600181016106518382612c25565b916000526020600020900160005b50600b805485019081905590819055600f80548501905560408051918252517f3f806783bc3dfbc90a04ec9fc1771225c19c6a7a089ce5e989271b8efb3b8fb592509081900360200190a1600e5460408051429092038252517f47cb7a68b9a99da719793a1a0c738a0f11e017572dab413350e670563929472b9181900360200190a15b5b5050565b6106e3828260006040518059106106fc5750595b908082528060200260200182016040525b50610759565b5b5050565b60086020526000908152604090205481565b600c5481565b600e5481565b600980548290811061074457fe5b906000526020600020900160005b5054905081565b60006000848484600081600081518110151561077157fe5b90602001015160f860020a900460f860020a02600160f860020a0319167f4c0000000000000000000000000000000000000000000000000000000000000014158061080757508160018151811015156107c657fe5b90602001015160f860020a900460f860020a02600160f860020a0319167f500000000000000000000000000000000000000000000000000000000000000014155b80610851575081600281518110151561081c57fe5b01602001517fff0000000000000000000000000000000000000000000000000000000000000060f860020a9182900482021614155b1561085c5760006000fd5b61086f82858561086a610ccd565b610d63565b905080151561087e5760006000fd5b6108866112d3565b600160a060020a031633600160a060020a03161415156108a65760006000fd5b600b54886040518082805190602001908083835b602083106108d95780518252601f1990920191602091820191016108ba565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209250505081151561090f57fe5b0660010160108190555061092460105461053a565b60078054600160a060020a031916600160a060020a0392909216919091179055600a54600b540262061a7f190195506064606287025b04600c81815560078054600160a060020a03908116600090815260086020908152604080832080548801905560055484168352918290208054968d0396870190559254935481519490921684529183015280519297507f2c5337dd1889c1b96fb759950346d9aa34b909162ab5aca44033cfad062bb3ed92918290030190a16109e1611411565b5b5b505050505050505050565b600e545b90565b600160a060020a03331660009081526008602052604081205481901115610a755750600160a060020a033316600081815260086020526040808220805490839055905190929183156108fc02918491818181858888f193505050501515610a7557600160a060020a03331660009081526008602052604090208054820190555b5b5b50565b60105481565b600b5481565b610a8e612c79565b6006805480602002602001604051908101604052809291908181526020018280548015610ae457602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610ac6575b505050505090505b90565b600554600160a060020a031681565b60115460ff1681565b600754600160a060020a031681565b6006805482908110610b2457fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b600d5481565b600160a060020a0381166000908152600860205260409020545b919050565b610b75612c79565b6009805480602002602001604051908101604052809291908181526020018280548015610ae457602002820191906000526020600020905b815481526020019060010190808311610bad575b505050505090505b90565b600f5481565b600e54421015610be25760006000fd5b60115460ff168015610bf95750600d54600e540142105b15610c045760006000fd5b6011805460ff19166001179055600b546000901115610c865760065460011415610c7857600d5442908101600e81905560408051929091038252517f47cb7a68b9a99da719793a1a0c738a0f11e017572dab413350e670563929472b9181900360200190a16011805460ff19169055610c80565b610c8061147c565b5b610cc9565b604080516000808252602082015281517f2c5337dd1889c1b96fb759950346d9aa34b909162ab5aca44033cfad062bb3ed929181900390910190a1610cc9611411565b5b5b565b610cd5612c79565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610ae45780601f10610d2d57610100808354040283529160200191610ae4565b820191906000526020600020905b815481529060010190602001808311610d3b57829003601f168201915b505050505090505b90565b600060006000610d71612c79565b610d79612c79565b610d81612c79565b610d89612c79565b60006000610d95612c79565b8d6045815181101515610da457fe5b90602001015160f860020a900460f860020a0260f860020a900460020160440160200197506020604051805910610dd85750595b908082528060200260200182016040525b509650610dfb8e8960208a6000611495565b5060028b8e6000604051602001526040518083805190602001908083835b60208310610e385780518252601f199092019160209182019101610e19565b51815160209384036101000a60001901801990921691161790529201938452506040518382019450909290915081900382018160008661646e5a03f11515610e7c57fe5b50506040516020808220895190928a92909182918401908083835b60208310610eb65780518252601f199092019160209182019101610e97565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120939093149b508b9250610ef891505057600099506112c2565b8d518e90604a8a01908110610f0957fe5b90602001015160f860020a900460f860020a0260f860020a9004600201604051805910610f335750595b908082528060200260200182016040525b509550610f598e896049018851896000611495565b50610fe06002876000604051602001526040518082805190602001908083835b60208310610f985780518252601f199092019160209182019101610f79565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f11515610fd457fe5b5050604051518d6114f2565b9850881515610ff257600099506112c2565b60296040518059106110015750595b908082528060200260200182016040525b5094506110278e896020016029886000611495565b5060406040518059106110375750595b908082528060200260200182016040525b50935085518860200160290101604101925061106c8e604085036040876000611495565b506002846000604051602001526040518082805190602001908083835b602083106110a85780518252601f199092019160209182019101611089565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f115156110e457fe5b50506040518051865190935086918491819060208501908083835b6020831061111e5780518252601f1990920191602091820191016110ff565b6001836020036101000a038019825116818451168082178552505050505050905001826000191660001916815260200192505050604051809103902060001916600360008f60001916600019168152602001908152602001600020546000191614156111985760008d8152600360205260408120556111a1565b600099506112c2565b60496040518059106111b05750595b908082528060200260200182016040525b5090506111d38e896049846000611495565b5061125b6002826000604051602001526040518082805190602001908083835b602083106112125780518252601f1990920191602091820191016111f3565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f1151561124e57fe5b5050604051518786611575565b985088151561126d57600099506112c2565b60008281526004602052604090205460ff1615156112ad5761128f8e846117a1565b6000838152600460205260409020805460ff19169115159190911790555b60008281526004602052604090205460ff1699505b505050505050505050949350505050565b60008054600160a060020a031615806112fe57506000546112fc90600160a060020a0316611b73565b155b1561130f5761130d6000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b151561136a57fe5b6102c65a03f1151561137857fe5b505060408051805160018054600160a060020a031916600160a060020a0392831617908190556000602093840181905284517fc281d19e000000000000000000000000000000000000000000000000000000008152945191909216945063c281d19e9360048082019493918390030190829087803b15156113f557fe5b6102c65a03f1151561140357fe5b5050604051519150505b5b90565b6000600b55600d5442908101600e81905560408051929091038252517f47cb7a68b9a99da719793a1a0c738a0f11e017572dab413350e670563929472b9181900360200190a161146360096000612cc1565b61146f60066000612cc1565b6011805460ff191690555b565b60008061148e81600a62061a80611ebe565b90505b5050565b61149d612c79565b8251848301906000908190839010156114b65760006000fd5b505060208087019084015b8688602001018210156114e2578882015186820152602091820191016114c1565b8593505b50505095945050505050565b60006001815b83518160ff16101561156957838160ff1681518110151561151557fe5b90602001015160f860020a900460f860020a02600160f860020a031916858260ff1660208110151561154357fe5b1a60f860020a02600160f860020a03191614151561156057600091505b5b6001016114f8565b8192505b505092915050565b60006000600060006000611587612c79565b6000611591612c79565b60206040518059106115a05750595b908082528060200260200182016040525b50925060208a60038151811015156115c557fe5b90602001015160f860020a900460f860020a0260f860020a90040360040191506115f48a836020866000611495565b925060206040518059106116055750595b908082528060200260200182016040525b50905060228201915061165d8a60208c6001860381518110151561163657fe5b90602001015160f860020a900460f860020a0260f860020a90040384016020846000611495565b9050602083015194506020810151935061167a8b601b87876121d2565b809750819850505085600160a060020a0316896040518082805190602001908083835b602083106116bc5780518252601f19909201916020918201910161169d565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060019004600160a060020a031614156117055760019750611792565b6117128b601c87876121d2565b809750819850505085600160a060020a0316896040518082805190602001908083835b602083106117545780518252601f199092019160209182019101611735565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060019004600160a060020a03161497505b5b505050505050509392505050565b600060006117ad612c79565b6117b5612c79565b6117bd612c79565b6117c5612c79565b6117cd612c79565b6117d5612c79565b6117dd612c79565b8a8a6001018151811015156117ee57fe5b90602001015160f860020a900460f860020a0260f860020a90046002016040518059106118185750595b908082528060200260200182016040525b50965061183b8b8b89518a6000611495565b50604060405180591061184b5750595b908082528060200260200182016040525b50955061186f8b60046040896000611495565b50606260405180591061187f5750595b908082528060200260200182016040525b509450600160f860020a028560008151811015156118aa57fe5b906020010190600160f860020a031916908160001a9053506118d48b60418c036041886001611495565b50604060405190810160405280602081526020017ffd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c815250935061191e8460006020886042611495565b506119a66002866000604051602001526040518082805190602001908083835b6020831061195d5780518252601f19909201916020918201910161193e565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f1151561199957fe5b5050604051518888611575565b97508715156119b85760009850611b65565b606060405190810160405280604081526020017f7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e881526020017f537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e481525092506042604051805910611a265750595b908082528060200260200182016040525b50915060fe60f860020a02826000815181101515611a5157fe5b906020010190600160f860020a031916908160001a905350611a798b60036041856001611495565b508a6045815181101515611a8957fe5b90602001015160f860020a900460f860020a0260f860020a9004600201604051805910611ab35750595b908082528060200260200182016040525b509050611ad78b60448351846000611495565b50611b5f6002836000604051602001526040518082805190602001908083835b60208310611b165780518252601f199092019160209182019101611af7565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f11515611b5257fe5b5050604051518285611575565b97508798505b505050505050505092915050565b803b5b919050565b600080611b9b731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611b73565b1115611c0c5760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17905560408051808201909152600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152611c049061221c565b506001610b68565b6000611c2b73c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611b73565b1115611c9c5760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf117905560408051808201909152600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152611c049061221c565b506001610b68565b6000611cbb73b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611b73565b1115611d2c5760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e17905560408051808201909152600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152611c049061221c565b506001610b68565b6000611d4b73146500cfd35b22e4a392fe0adc06de1a1368ed48611b73565b1115611dbc5760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed4817905560408051808201909152600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152611c049061221c565b506001610b68565b6000611ddb736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611b73565b1115611e0f575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4751790556001610b68565b6000611e2e7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611b73565b1115611e62575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf1790556001610b68565b6000611e817351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611b73565b1115611eb5575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa1790556001610b68565b5060005b919050565b6000611ec8612c79565b611ed0612c79565b611ed8612c79565b6000611ee2612d05565b6000881580611ef15750602089115b15611efc5760006000fd5b6001604051805910611f0b5750595b908082528060200260200182016040525b5095508860f860020a02866000815181101515611f3557fe5b906020010190600160f860020a031916908160001a9053506020604051805910611f5c5750595b908082528060200260200182016040525b5094506020604051805910611f7f5750595b908082528060200260200182016040525b509350611f9b612234565b92508292506020855242411860014303401860208601526020845282602085015260606040519081016040528086815260200187815260200185815250915061201c8a604060405190810160405280600681526020017f72616e646f6d0000000000000000000000000000000000000000000000000000815250848b612372565b90506121c18178010000000000000000000000000000000000000000000000008c028460015b602002015160028660005b60200201516000604051602001526040518082805190602001908083835b6020831061208a5780518252601f19909201916020918201910161206b565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f115156120c657fe5b5050604051518660025b6020020151604051808577ffffffffffffffffffffffffffffffffffffffffffffffff191677ffffffffffffffffffffffffffffffffffffffffffffffff1916815260080184805190602001908083835b602083106121405780518252601f199092019160209182019101612121565b51815160209384036101000a60001901801990921691161790529201858152845190830192850191508083835b6020831061218c5780518252601f19909201916020918201910161216d565b6001836020036101000a038019825116818451168082178552505050505050905001945050505050604051809103902061250c565b8096505b5050505050509392505050565b604080518581526020808201869052918101849052606081018390526000918291829182919081608081856001610bb8f1925080519150508181935093505b505094509492505050565b80516106e3906002906020840190612d33565b505b50565b60008054600160a060020a0316158061225f575060005461225d90600160a060020a0316611b73565b155b156122705761226e6000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b15156122cb57fe5b6102c65a03f115156122d957fe5b505060408051805160018054600160a060020a031916600160a060020a0392831617908190556000602093840181905284517fabaa5f3e000000000000000000000000000000000000000000000000000000008152945191909216945063abaa5f3e9360048082019493918390030190829087803b15156113f557fe5b6102c65a03f1151561140357fe5b5050604051519150505b5b90565b600061237c612c79565b600054600160a060020a031615806123a657506000546123a490600160a060020a0316611b73565b155b156123b7576123b56000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b151561241257fe5b6102c65a03f1151561242057fe5b5050604051805160018054600160a060020a031916600160a060020a03909216919091179055600391508059106124545750595b90808252806020026020018201604052801561248a57816020015b612477612c79565b81526020019060019003908161246f5790505b5090508360005b60200201518160008151811015156124a557fe5b602090810290910101528360015b60200201518160018151811015156124c757fe5b602090810290910101528360025b60200201518160028151811015156124e957fe5b602090810290910101526124ff86868386612522565b91505b5b50949350505050565b60008281526003602052604090208190555b5050565b6000600061252e612c79565b600054600160a060020a03161580612558575060005461255690600160a060020a0316611b73565b155b15612569576125676000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b15156125c457fe5b6102c65a03f115156125d257fe5b505060408051805160018054600160a060020a031916600160a060020a039283161790819055600060209384015283517f2ef3accc000000000000000000000000000000000000000000000000000000008152602481018a9052600481019485528b5160448201528b51919092169450632ef3accc938b938a9391928392606401918601908083838215612681575b80518252602083111561268157601f199092019160209182019101612661565b505050905090810190601f1680156126ad5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15156126c957fe5b6102c65a03f115156126d757fe5b505060405151925050670de0b6b3a76400003a8502018211156126fd5760009250612875565b61270685612880565b9050600160009054906101000a9004600160a060020a0316600160a060020a031663c55c1cb683898985896000604051602001526040518663ffffffff1660e060020a0281526004018085815260200180602001806020018481526020018381038352868181518152602001915080519060200190808383600083146127a7575b8051825260208311156127a757601f199092019160209182019101612787565b505050905090810190601f1680156127d35780820380516001836020036101000a031916815260200191505b5083810382528551815285516020918201918701908083838215612812575b80518252602083111561281257601f1990920191602091820191016127f2565b505050905090810190601f16801561283e5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b151561285c57fe5b6125ee5a03f1151561286a57fe5b505060405151945050505b5b5050949350505050565b612888612c79565b60006000612894612c79565b6000600060006128a2612c79565b6000600060008b51995060009850896040518059106128be5750595b9080825280602002602001820160405280156128f457816020015b6128e1612c79565b8152602001906001900390816128d95790505b509750600096505b8987101561298c578b8781518110151561291257fe5b90602001906020020151888881518110151561292a57fe5b9060200190602002018190525060176001898981518110151561294957fe5b90602001906020020151510381151561295e57fe5b04888881518110151561296d57fe5b906020019060200201515101600301890198505b6001909601956128fc565b60009550896080019450600160ff1689019850886040518059106129ad5750595b908082528060200260200182016040525b5093505b600186901115612a165760f860020a850286600181106129de57fe5b1a60f860020a0284878151811015156129f357fe5b906020010190600160f860020a031916908160001a9053506001909501946129c2565b600096505b89871015612c125783517f5f0000000000000000000000000000000000000000000000000000000000000090859088908110612a5357fe5b906020010190600160f860020a031916908160001a905350600190950194600092505b8787815181101515612a8457fe5b9060200190602002015151831015612bb8576017835b061515612b47576018838989815181101515612ab257fe5b9060200190602002015151031015612ae457828888815181101515612ad357fe5b906020019060200201515103612ae7565b60175b60400191508590505b80860360011115612b475760f860020a820281870360018110612b0f57fe5b1a60f860020a028487815181101515612b2457fe5b906020010190600160f860020a031916908160001a905350600190950194612af0565b5b8787815181101515612b5657fe5b9060200190602002015183815181101515612b6d57fe5b90602001015160f860020a900460f860020a028487815181101515612b8e57fe5b906020010190600160f860020a031916908160001a9053506001909501945b600190920191612a76565b83517fff0000000000000000000000000000000000000000000000000000000000000090859088908110612be857fe5b906020010190600160f860020a031916908160001a9053506001909501945b600190960195612a1b565b839a505b50505050505050505050919050565b815481835581811511612c4957600083815260209020612c49918101908301612dd6565b5b505050565b815481835581811511612c4957600083815260209020612c49918101908301612dd6565b5b505050565b60408051602081019091526000815290565b60408051602081019091526000815290565b60408051602081019091526000815290565b60408051602081019091526000815290565b5080546000825590600052602060002090810190610a759190612dd6565b5b50565b5080546000825590600052602060002090810190610a759190612dd6565b5b50565b6060604051908101604052806003905b612d1d612c79565b815260200190600190039081612d155790505090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612d7457805160ff1916838001178555612da1565b82800160010185558215612da1579182015b82811115612da1578251825591602001919060010190612d86565b5b50612dae929150612dd6565b5090565b60408051602081019091526000815290565b60408051602081019091526000815290565b6109f291905b80821115612dae5760008155600101612ddc565b5090565b90565b600054600160a060020a03161580612e215750600054612e1f90600160a060020a0316611b73565b155b15612e3257612e306000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b1515612e8d57fe5b6102c65a03f11515612e9b57fe5b505060408051805160018054600160a060020a031916600160a060020a0392831617908190557f688dcfd70000000000000000000000000000000000000000000000000000000083527fff000000000000000000000000000000000000000000000000000000000000008616600484015292519216925063688dcfd791602480830192600092919082900301818387803b1515612f3457fe5b6102c65a03f11515612f4257fe5b5050505b5b505600a165627a7a72305820eafb62125a70bc34324f6c33c86e531f7f450fc81581124f4a708fc6dc7276f70029

Deployed Bytecode

0x6060604052361561010c5763ffffffff60e060020a60003504166305e49d1d811461010e57806311daca811461013d57806327dc297e1461014757806327e235e3146101a057806328102e54146101ce5780633197cbb6146101f0578063387dd9e91461021257806338bbfa5014610237578063439f5ac2146102cd5780635fd8c710146102ef57806360a59bdb146102f957806368b6d55d1461031b5780638b5b9ccc1461033d5780638da5cb5b146103a8578063cf309012146103d4578063ed7a4e0b146103f8578063edf26d9b14610424578063f05a64bc14610453578063f8b2cb4f14610475578063fab2c469146104a3578063fe5e18531461050e578063febdb9b814610530575bfe5b341561011657fe5b61012160043561053a565b60408051600160a060020a039092168252519081900360200190f35b6101456105b1565b005b341561014f57fe5b60408051602060046024803582810135601f810185900485028601850190965285855261014595833595939460449493929092019181908401838280828437509496506106e895505050505050565b005b34156101a857fe5b6101bc600160a060020a0360043516610718565b60408051918252519081900360200190f35b34156101d657fe5b6101bc61072a565b60408051918252519081900360200190f35b34156101f857fe5b6101bc610730565b60408051918252519081900360200190f35b341561021a57fe5b6101bc600435610736565b60408051918252519081900360200190f35b341561023f57fe5b60408051602060046024803582810135601f8101859004850286018501909652858552610145958335959394604494939290920191819084018382808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375094965061075995505050505050565b005b34156102d557fe5b6101bc6109ee565b60408051918252519081900360200190f35b6101456109f5565b005b341561030157fe5b6101bc610a7a565b60408051918252519081900360200190f35b341561032357fe5b6101bc610a80565b60408051918252519081900360200190f35b341561034557fe5b61034d610a86565b6040805160208082528351818301528351919283929083019185810191028083838215610395575b80518252602083111561039557601f199092019160209182019101610375565b5050509050019250505060405180910390f35b34156103b057fe5b610121610aef565b60408051600160a060020a039092168252519081900360200190f35b34156103dc57fe5b6103e4610afe565b604080519115158252519081900360200190f35b341561040057fe5b610121610b07565b60408051600160a060020a039092168252519081900360200190f35b341561042c57fe5b610121600435610b16565b60408051600160a060020a039092168252519081900360200190f35b341561045b57fe5b6101bc610b48565b60408051918252519081900360200190f35b341561047d57fe5b6101bc600160a060020a0360043516610b4e565b60408051918252519081900360200190f35b34156104ab57fe5b61034d610b6d565b6040805160208082528351818301528351919283929083019185810191028083838215610395575b80518252602083111561039557601f199092019160209182019101610375565b5050509050019250505060405180910390f35b341561051657fe5b6101bc610bcc565b60408051918252519081900360200190f35b610145610bd2565b005b6000805b6009548110156105aa57600980548290811061055657fe5b906000526020600020900160005b505483116105a157600680548290811061057a57fe5b906000526020600020900160005b9054906101000a9004600160a060020a031691506105aa565b5b60010161053e565b5b50919050565b60006000600e544211156105c55760006000fd5b60115460ff16156105d65760006000fd5b5060009050345b600a5481106105f7576001909101905b600a5490036105dd565b60008211156106e35760068054600181016106128382612c25565b916000526020600020900160005b8154600160a060020a033381166101009390930a928302920219161790555060098054600181016106518382612c25565b916000526020600020900160005b50600b805485019081905590819055600f80548501905560408051918252517f3f806783bc3dfbc90a04ec9fc1771225c19c6a7a089ce5e989271b8efb3b8fb592509081900360200190a1600e5460408051429092038252517f47cb7a68b9a99da719793a1a0c738a0f11e017572dab413350e670563929472b9181900360200190a15b5b5050565b6106e3828260006040518059106106fc5750595b908082528060200260200182016040525b50610759565b5b5050565b60086020526000908152604090205481565b600c5481565b600e5481565b600980548290811061074457fe5b906000526020600020900160005b5054905081565b60006000848484600081600081518110151561077157fe5b90602001015160f860020a900460f860020a02600160f860020a0319167f4c0000000000000000000000000000000000000000000000000000000000000014158061080757508160018151811015156107c657fe5b90602001015160f860020a900460f860020a02600160f860020a0319167f500000000000000000000000000000000000000000000000000000000000000014155b80610851575081600281518110151561081c57fe5b01602001517fff0000000000000000000000000000000000000000000000000000000000000060f860020a9182900482021614155b1561085c5760006000fd5b61086f82858561086a610ccd565b610d63565b905080151561087e5760006000fd5b6108866112d3565b600160a060020a031633600160a060020a03161415156108a65760006000fd5b600b54886040518082805190602001908083835b602083106108d95780518252601f1990920191602091820191016108ba565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209250505081151561090f57fe5b0660010160108190555061092460105461053a565b60078054600160a060020a031916600160a060020a0392909216919091179055600a54600b540262061a7f190195506064606287025b04600c81815560078054600160a060020a03908116600090815260086020908152604080832080548801905560055484168352918290208054968d0396870190559254935481519490921684529183015280519297507f2c5337dd1889c1b96fb759950346d9aa34b909162ab5aca44033cfad062bb3ed92918290030190a16109e1611411565b5b5b505050505050505050565b600e545b90565b600160a060020a03331660009081526008602052604081205481901115610a755750600160a060020a033316600081815260086020526040808220805490839055905190929183156108fc02918491818181858888f193505050501515610a7557600160a060020a03331660009081526008602052604090208054820190555b5b5b50565b60105481565b600b5481565b610a8e612c79565b6006805480602002602001604051908101604052809291908181526020018280548015610ae457602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610ac6575b505050505090505b90565b600554600160a060020a031681565b60115460ff1681565b600754600160a060020a031681565b6006805482908110610b2457fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b600d5481565b600160a060020a0381166000908152600860205260409020545b919050565b610b75612c79565b6009805480602002602001604051908101604052809291908181526020018280548015610ae457602002820191906000526020600020905b815481526020019060010190808311610bad575b505050505090505b90565b600f5481565b600e54421015610be25760006000fd5b60115460ff168015610bf95750600d54600e540142105b15610c045760006000fd5b6011805460ff19166001179055600b546000901115610c865760065460011415610c7857600d5442908101600e81905560408051929091038252517f47cb7a68b9a99da719793a1a0c738a0f11e017572dab413350e670563929472b9181900360200190a16011805460ff19169055610c80565b610c8061147c565b5b610cc9565b604080516000808252602082015281517f2c5337dd1889c1b96fb759950346d9aa34b909162ab5aca44033cfad062bb3ed929181900390910190a1610cc9611411565b5b5b565b610cd5612c79565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610ae45780601f10610d2d57610100808354040283529160200191610ae4565b820191906000526020600020905b815481529060010190602001808311610d3b57829003601f168201915b505050505090505b90565b600060006000610d71612c79565b610d79612c79565b610d81612c79565b610d89612c79565b60006000610d95612c79565b8d6045815181101515610da457fe5b90602001015160f860020a900460f860020a0260f860020a900460020160440160200197506020604051805910610dd85750595b908082528060200260200182016040525b509650610dfb8e8960208a6000611495565b5060028b8e6000604051602001526040518083805190602001908083835b60208310610e385780518252601f199092019160209182019101610e19565b51815160209384036101000a60001901801990921691161790529201938452506040518382019450909290915081900382018160008661646e5a03f11515610e7c57fe5b50506040516020808220895190928a92909182918401908083835b60208310610eb65780518252601f199092019160209182019101610e97565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120939093149b508b9250610ef891505057600099506112c2565b8d518e90604a8a01908110610f0957fe5b90602001015160f860020a900460f860020a0260f860020a9004600201604051805910610f335750595b908082528060200260200182016040525b509550610f598e896049018851896000611495565b50610fe06002876000604051602001526040518082805190602001908083835b60208310610f985780518252601f199092019160209182019101610f79565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f11515610fd457fe5b5050604051518d6114f2565b9850881515610ff257600099506112c2565b60296040518059106110015750595b908082528060200260200182016040525b5094506110278e896020016029886000611495565b5060406040518059106110375750595b908082528060200260200182016040525b50935085518860200160290101604101925061106c8e604085036040876000611495565b506002846000604051602001526040518082805190602001908083835b602083106110a85780518252601f199092019160209182019101611089565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f115156110e457fe5b50506040518051865190935086918491819060208501908083835b6020831061111e5780518252601f1990920191602091820191016110ff565b6001836020036101000a038019825116818451168082178552505050505050905001826000191660001916815260200192505050604051809103902060001916600360008f60001916600019168152602001908152602001600020546000191614156111985760008d8152600360205260408120556111a1565b600099506112c2565b60496040518059106111b05750595b908082528060200260200182016040525b5090506111d38e896049846000611495565b5061125b6002826000604051602001526040518082805190602001908083835b602083106112125780518252601f1990920191602091820191016111f3565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f1151561124e57fe5b5050604051518786611575565b985088151561126d57600099506112c2565b60008281526004602052604090205460ff1615156112ad5761128f8e846117a1565b6000838152600460205260409020805460ff19169115159190911790555b60008281526004602052604090205460ff1699505b505050505050505050949350505050565b60008054600160a060020a031615806112fe57506000546112fc90600160a060020a0316611b73565b155b1561130f5761130d6000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b151561136a57fe5b6102c65a03f1151561137857fe5b505060408051805160018054600160a060020a031916600160a060020a0392831617908190556000602093840181905284517fc281d19e000000000000000000000000000000000000000000000000000000008152945191909216945063c281d19e9360048082019493918390030190829087803b15156113f557fe5b6102c65a03f1151561140357fe5b5050604051519150505b5b90565b6000600b55600d5442908101600e81905560408051929091038252517f47cb7a68b9a99da719793a1a0c738a0f11e017572dab413350e670563929472b9181900360200190a161146360096000612cc1565b61146f60066000612cc1565b6011805460ff191690555b565b60008061148e81600a62061a80611ebe565b90505b5050565b61149d612c79565b8251848301906000908190839010156114b65760006000fd5b505060208087019084015b8688602001018210156114e2578882015186820152602091820191016114c1565b8593505b50505095945050505050565b60006001815b83518160ff16101561156957838160ff1681518110151561151557fe5b90602001015160f860020a900460f860020a02600160f860020a031916858260ff1660208110151561154357fe5b1a60f860020a02600160f860020a03191614151561156057600091505b5b6001016114f8565b8192505b505092915050565b60006000600060006000611587612c79565b6000611591612c79565b60206040518059106115a05750595b908082528060200260200182016040525b50925060208a60038151811015156115c557fe5b90602001015160f860020a900460f860020a0260f860020a90040360040191506115f48a836020866000611495565b925060206040518059106116055750595b908082528060200260200182016040525b50905060228201915061165d8a60208c6001860381518110151561163657fe5b90602001015160f860020a900460f860020a0260f860020a90040384016020846000611495565b9050602083015194506020810151935061167a8b601b87876121d2565b809750819850505085600160a060020a0316896040518082805190602001908083835b602083106116bc5780518252601f19909201916020918201910161169d565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060019004600160a060020a031614156117055760019750611792565b6117128b601c87876121d2565b809750819850505085600160a060020a0316896040518082805190602001908083835b602083106117545780518252601f199092019160209182019101611735565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060019004600160a060020a03161497505b5b505050505050509392505050565b600060006117ad612c79565b6117b5612c79565b6117bd612c79565b6117c5612c79565b6117cd612c79565b6117d5612c79565b6117dd612c79565b8a8a6001018151811015156117ee57fe5b90602001015160f860020a900460f860020a0260f860020a90046002016040518059106118185750595b908082528060200260200182016040525b50965061183b8b8b89518a6000611495565b50604060405180591061184b5750595b908082528060200260200182016040525b50955061186f8b60046040896000611495565b50606260405180591061187f5750595b908082528060200260200182016040525b509450600160f860020a028560008151811015156118aa57fe5b906020010190600160f860020a031916908160001a9053506118d48b60418c036041886001611495565b50604060405190810160405280602081526020017ffd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c815250935061191e8460006020886042611495565b506119a66002866000604051602001526040518082805190602001908083835b6020831061195d5780518252601f19909201916020918201910161193e565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f1151561199957fe5b5050604051518888611575565b97508715156119b85760009850611b65565b606060405190810160405280604081526020017f7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e881526020017f537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e481525092506042604051805910611a265750595b908082528060200260200182016040525b50915060fe60f860020a02826000815181101515611a5157fe5b906020010190600160f860020a031916908160001a905350611a798b60036041856001611495565b508a6045815181101515611a8957fe5b90602001015160f860020a900460f860020a0260f860020a9004600201604051805910611ab35750595b908082528060200260200182016040525b509050611ad78b60448351846000611495565b50611b5f6002836000604051602001526040518082805190602001908083835b60208310611b165780518252601f199092019160209182019101611af7565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f11515611b5257fe5b5050604051518285611575565b97508798505b505050505050505092915050565b803b5b919050565b600080611b9b731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611b73565b1115611c0c5760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17905560408051808201909152600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152611c049061221c565b506001610b68565b6000611c2b73c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611b73565b1115611c9c5760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf117905560408051808201909152600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152611c049061221c565b506001610b68565b6000611cbb73b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611b73565b1115611d2c5760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e17905560408051808201909152600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152611c049061221c565b506001610b68565b6000611d4b73146500cfd35b22e4a392fe0adc06de1a1368ed48611b73565b1115611dbc5760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed4817905560408051808201909152600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152611c049061221c565b506001610b68565b6000611ddb736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611b73565b1115611e0f575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4751790556001610b68565b6000611e2e7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611b73565b1115611e62575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf1790556001610b68565b6000611e817351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611b73565b1115611eb5575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa1790556001610b68565b5060005b919050565b6000611ec8612c79565b611ed0612c79565b611ed8612c79565b6000611ee2612d05565b6000881580611ef15750602089115b15611efc5760006000fd5b6001604051805910611f0b5750595b908082528060200260200182016040525b5095508860f860020a02866000815181101515611f3557fe5b906020010190600160f860020a031916908160001a9053506020604051805910611f5c5750595b908082528060200260200182016040525b5094506020604051805910611f7f5750595b908082528060200260200182016040525b509350611f9b612234565b92508292506020855242411860014303401860208601526020845282602085015260606040519081016040528086815260200187815260200185815250915061201c8a604060405190810160405280600681526020017f72616e646f6d0000000000000000000000000000000000000000000000000000815250848b612372565b90506121c18178010000000000000000000000000000000000000000000000008c028460015b602002015160028660005b60200201516000604051602001526040518082805190602001908083835b6020831061208a5780518252601f19909201916020918201910161206b565b51815160209384036101000a6000190180199092169116179052604051919093019450919250508083038160008661646e5a03f115156120c657fe5b5050604051518660025b6020020151604051808577ffffffffffffffffffffffffffffffffffffffffffffffff191677ffffffffffffffffffffffffffffffffffffffffffffffff1916815260080184805190602001908083835b602083106121405780518252601f199092019160209182019101612121565b51815160209384036101000a60001901801990921691161790529201858152845190830192850191508083835b6020831061218c5780518252601f19909201916020918201910161216d565b6001836020036101000a038019825116818451168082178552505050505050905001945050505050604051809103902061250c565b8096505b5050505050509392505050565b604080518581526020808201869052918101849052606081018390526000918291829182919081608081856001610bb8f1925080519150508181935093505b505094509492505050565b80516106e3906002906020840190612d33565b505b50565b60008054600160a060020a0316158061225f575060005461225d90600160a060020a0316611b73565b155b156122705761226e6000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b15156122cb57fe5b6102c65a03f115156122d957fe5b505060408051805160018054600160a060020a031916600160a060020a0392831617908190556000602093840181905284517fabaa5f3e000000000000000000000000000000000000000000000000000000008152945191909216945063abaa5f3e9360048082019493918390030190829087803b15156113f557fe5b6102c65a03f1151561140357fe5b5050604051519150505b5b90565b600061237c612c79565b600054600160a060020a031615806123a657506000546123a490600160a060020a0316611b73565b155b156123b7576123b56000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b151561241257fe5b6102c65a03f1151561242057fe5b5050604051805160018054600160a060020a031916600160a060020a03909216919091179055600391508059106124545750595b90808252806020026020018201604052801561248a57816020015b612477612c79565b81526020019060019003908161246f5790505b5090508360005b60200201518160008151811015156124a557fe5b602090810290910101528360015b60200201518160018151811015156124c757fe5b602090810290910101528360025b60200201518160028151811015156124e957fe5b602090810290910101526124ff86868386612522565b91505b5b50949350505050565b60008281526003602052604090208190555b5050565b6000600061252e612c79565b600054600160a060020a03161580612558575060005461255690600160a060020a0316611b73565b155b15612569576125676000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b15156125c457fe5b6102c65a03f115156125d257fe5b505060408051805160018054600160a060020a031916600160a060020a039283161790819055600060209384015283517f2ef3accc000000000000000000000000000000000000000000000000000000008152602481018a9052600481019485528b5160448201528b51919092169450632ef3accc938b938a9391928392606401918601908083838215612681575b80518252602083111561268157601f199092019160209182019101612661565b505050905090810190601f1680156126ad5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15156126c957fe5b6102c65a03f115156126d757fe5b505060405151925050670de0b6b3a76400003a8502018211156126fd5760009250612875565b61270685612880565b9050600160009054906101000a9004600160a060020a0316600160a060020a031663c55c1cb683898985896000604051602001526040518663ffffffff1660e060020a0281526004018085815260200180602001806020018481526020018381038352868181518152602001915080519060200190808383600083146127a7575b8051825260208311156127a757601f199092019160209182019101612787565b505050905090810190601f1680156127d35780820380516001836020036101000a031916815260200191505b5083810382528551815285516020918201918701908083838215612812575b80518252602083111561281257601f1990920191602091820191016127f2565b505050905090810190601f16801561283e5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b151561285c57fe5b6125ee5a03f1151561286a57fe5b505060405151945050505b5b5050949350505050565b612888612c79565b60006000612894612c79565b6000600060006128a2612c79565b6000600060008b51995060009850896040518059106128be5750595b9080825280602002602001820160405280156128f457816020015b6128e1612c79565b8152602001906001900390816128d95790505b509750600096505b8987101561298c578b8781518110151561291257fe5b90602001906020020151888881518110151561292a57fe5b9060200190602002018190525060176001898981518110151561294957fe5b90602001906020020151510381151561295e57fe5b04888881518110151561296d57fe5b906020019060200201515101600301890198505b6001909601956128fc565b60009550896080019450600160ff1689019850886040518059106129ad5750595b908082528060200260200182016040525b5093505b600186901115612a165760f860020a850286600181106129de57fe5b1a60f860020a0284878151811015156129f357fe5b906020010190600160f860020a031916908160001a9053506001909501946129c2565b600096505b89871015612c125783517f5f0000000000000000000000000000000000000000000000000000000000000090859088908110612a5357fe5b906020010190600160f860020a031916908160001a905350600190950194600092505b8787815181101515612a8457fe5b9060200190602002015151831015612bb8576017835b061515612b47576018838989815181101515612ab257fe5b9060200190602002015151031015612ae457828888815181101515612ad357fe5b906020019060200201515103612ae7565b60175b60400191508590505b80860360011115612b475760f860020a820281870360018110612b0f57fe5b1a60f860020a028487815181101515612b2457fe5b906020010190600160f860020a031916908160001a905350600190950194612af0565b5b8787815181101515612b5657fe5b9060200190602002015183815181101515612b6d57fe5b90602001015160f860020a900460f860020a028487815181101515612b8e57fe5b906020010190600160f860020a031916908160001a9053506001909501945b600190920191612a76565b83517fff0000000000000000000000000000000000000000000000000000000000000090859088908110612be857fe5b906020010190600160f860020a031916908160001a9053506001909501945b600190960195612a1b565b839a505b50505050505050505050919050565b815481835581811511612c4957600083815260209020612c49918101908301612dd6565b5b505050565b815481835581811511612c4957600083815260209020612c49918101908301612dd6565b5b505050565b60408051602081019091526000815290565b60408051602081019091526000815290565b60408051602081019091526000815290565b60408051602081019091526000815290565b5080546000825590600052602060002090810190610a759190612dd6565b5b50565b5080546000825590600052602060002090810190610a759190612dd6565b5b50565b6060604051908101604052806003905b612d1d612c79565b815260200190600190039081612d155790505090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612d7457805160ff1916838001178555612da1565b82800160010185558215612da1579182015b82811115612da1578251825591602001919060010190612d86565b5b50612dae929150612dd6565b5090565b60408051602081019091526000815290565b60408051602081019091526000815290565b6109f291905b80821115612dae5760008155600101612ddc565b5090565b90565b600054600160a060020a03161580612e215750600054612e1f90600160a060020a0316611b73565b155b15612e3257612e306000611b7b565b505b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b1515612e8d57fe5b6102c65a03f11515612e9b57fe5b505060408051805160018054600160a060020a031916600160a060020a0392831617908190557f688dcfd70000000000000000000000000000000000000000000000000000000083527fff000000000000000000000000000000000000000000000000000000000000008616600484015292519216925063688dcfd791602480830192600092919082900301818387803b1515612f3457fe5b6102c65a03f11515612f4257fe5b5050505b5b505600a165627a7a72305820eafb62125a70bc34324f6c33c86e531f7f450fc81581124f4a708fc6dc7276f70029

Swarm Source

bzzr://eafb62125a70bc34324f6c33c86e531f7f450fc81581124f4a708fc6dc7276f7

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.