ETH Price: $3,562.66 (-1.36%)

Contract

0x18DD9Ae3383DE623DB1EA37D8dA5DdE1Dc74d356
 

Overview

ETH Balance

0.54565580387804805 ETH

Eth Value

$1,943.98 (@ $3,562.66/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
__callback101946912020-06-03 19:10:481644 days ago1591211448IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0011324116
__callback101946902020-06-03 19:10:461644 days ago1591211446IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0010687115.1
Get Winning Tick...101946862020-06-03 19:10:331644 days ago1591211433IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0025913916
Get Winning Tick...101946712020-06-03 19:05:541644 days ago1591211154IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0026358815.1
__callback101943532020-06-03 17:58:081644 days ago1591207088IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0011286617
Get Winning Tick...101943522020-06-03 17:58:031644 days ago1591207083IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0029675517
__callback101940462020-06-03 16:58:551644 days ago1591203535IN
0x18DD9Ae3...1Dc74d356
0 ETH0.001660125
Get Winning Tick...101940452020-06-03 16:58:441644 days ago1591203524IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0043640525
__callback101937572020-06-03 15:58:431644 days ago1591199923IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0016352723.1
Get Winning Tick...101937542020-06-03 15:58:271644 days ago1591199907IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0040323823.1
__callback101934822020-06-03 14:58:211644 days ago1591196301IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0017694725
Get Winning Tick...101934812020-06-03 14:58:111644 days ago1591196291IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0043640525
__callback101932232020-06-03 13:58:071644 days ago1591192687IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0019213629
Get Winning Tick...101932212020-06-03 13:58:051644 days ago1591192685IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0049404929
__callback101929442020-06-03 12:59:011644 days ago1591189141IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0019210129
Get Winning Tick...101929422020-06-03 12:58:481644 days ago1591189128IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0050622929
__callback101926832020-06-03 11:58:541644 days ago1591185534IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0017229126
Get Winning Tick...101926802020-06-03 11:58:171644 days ago1591185497IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0045386126
__callback101925382020-06-03 11:21:431644 days ago1591183303IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0015869823.9
Get Winning Tick...101925272020-06-03 11:18:411644 days ago1591183121IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0041714523.9
__callback101924452020-06-03 11:00:051644 days ago1591182005IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0016500224.9
Get Winning Tick...101924392020-06-03 10:58:041644 days ago1591181884IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0043465924.9
__callback101922002020-06-03 10:02:431644 days ago1591178563IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0015571322
Get Winning Tick...101921952020-06-03 10:01:591644 days ago1591178519IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0038403622
__callback101920202020-06-03 9:28:001644 days ago1591176480IN
0x18DD9Ae3...1Dc74d356
0 ETH0.0013678620.6
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
101946862020-06-03 19:10:331644 days ago1591211433
0x18DD9Ae3...1Dc74d356
0.0021276 ETH
101946712020-06-03 19:05:541644 days ago1591211154
0x18DD9Ae3...1Dc74d356
0.0020196 ETH
101943522020-06-03 17:58:031644 days ago1591207083
0x18DD9Ae3...1Dc74d356
0.0022476 ETH
101940452020-06-03 16:58:441644 days ago1591203524
0x18DD9Ae3...1Dc74d356
0.0032076 ETH
101937542020-06-03 15:58:271644 days ago1591199907
0x18DD9Ae3...1Dc74d356
0.0029796 ETH
101934812020-06-03 14:58:111644 days ago1591196291
0x18DD9Ae3...1Dc74d356
0.0032076 ETH
101932212020-06-03 13:58:051644 days ago1591192685
0x18DD9Ae3...1Dc74d356
0.0036876 ETH
101929422020-06-03 12:58:481644 days ago1591189128
0x18DD9Ae3...1Dc74d356
0.0036876 ETH
101926802020-06-03 11:58:171644 days ago1591185497
0x18DD9Ae3...1Dc74d356
0.0033276 ETH
101925272020-06-03 11:18:411644 days ago1591183121
0x18DD9Ae3...1Dc74d356
0.0030756 ETH
101924392020-06-03 10:58:041644 days ago1591181884
0x18DD9Ae3...1Dc74d356
0.0031956 ETH
101921952020-06-03 10:01:591644 days ago1591178519
0x18DD9Ae3...1Dc74d356
0.0028476 ETH
101920062020-06-03 9:25:261644 days ago1591176326
0x18DD9Ae3...1Dc74d356
0.0033276 ETH
101919202020-06-03 9:04:011644 days ago1591175041
0x18DD9Ae3...1Dc74d356
0.0026796 ETH
101917362020-06-03 8:22:301644 days ago1591172550
0x18DD9Ae3...1Dc74d356
0.0024876 ETH
101913732020-06-03 6:59:011644 days ago1591167541
0x18DD9Ae3...1Dc74d356
0.0022476 ETH
101911342020-06-03 6:08:071644 days ago1591164487
0x18DD9Ae3...1Dc74d356
0.0022476 ETH
101908192020-06-03 4:58:091644 days ago1591160289
0x18DD9Ae3...1Dc74d356
0.0026076 ETH
101905812020-06-03 3:58:131644 days ago1591156693
0x18DD9Ae3...1Dc74d356
0.0028476 ETH
101903312020-06-03 2:58:421644 days ago1591153122
0x18DD9Ae3...1Dc74d356
0.0026196 ETH
101900632020-06-03 1:59:421644 days ago1591149582
0x18DD9Ae3...1Dc74d356
0.0026076 ETH
101898372020-06-03 1:07:161644 days ago1591146436
0x18DD9Ae3...1Dc74d356
0.0025956 ETH
101895952020-06-03 0:10:171644 days ago1591143017
0x18DD9Ae3...1Dc74d356
0.0025836 ETH
101895432020-06-02 23:58:291644 days ago1591142309
0x18DD9Ae3...1Dc74d356
0.0025836 ETH
101894812020-06-02 23:44:461644 days ago1591141486
0x18DD9Ae3...1Dc74d356
0.0025596 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DrawTicket

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-03-16
*/

pragma solidity ^0.4.25;

// <ORACLIZE_API>
// Release targetted at solc 0.4.25 to silence compiler warning/error messages, compatible down to 0.4.22
/*
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.
*/

// This api is currently targeted at 0.4.22 to 0.4.25 (stable builds), please import oraclizeAPI_pre0.4.sol or oraclizeAPI_0.4 where necessary


contract OraclizeI {
    address public cbAddress;
    function query(uint _timestamp, string _datasource, string _arg) external payable returns (bytes32 _id);
    function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) external payable returns (bytes32 _id);
    function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) public payable returns (bytes32 _id);
    function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) external payable returns (bytes32 _id);
    function queryN(uint _timestamp, string _datasource, bytes _argN) public payable returns (bytes32 _id);
    function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) external payable returns (bytes32 _id);
    function getPrice(string _datasource) public returns (uint _dsprice);
    function getPrice(string _datasource, uint gaslimit) public returns (uint _dsprice);
    function setProofType(byte _proofType) external;
    function setCustomGasPrice(uint _gasPrice) external;
    function randomDS_getSessionPubKeyHash() external constant returns(bytes32);
}

contract OraclizeAddrResolverI {
    function getAddress() public returns (address _addr);
}

/*
Begin solidity-cborutils

https://github.com/smartcontractkit/solidity-cborutils

MIT License

Copyright (c) 2018 SmartContract ChainLink, 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.
 */

library Buffer {
    struct buffer {
        bytes buf;
        uint capacity;
    }

    function init(buffer memory buf, uint _capacity) internal pure {
        uint capacity = _capacity;
        if(capacity % 32 != 0) capacity += 32 - (capacity % 32);
        // Allocate space for the buffer data
        buf.capacity = capacity;
        assembly {
            let ptr := mload(0x40)
            mstore(buf, ptr)
            mstore(ptr, 0)
            mstore(0x40, add(ptr, capacity))
        }
    }

    function resize(buffer memory buf, uint capacity) private pure {
        bytes memory oldbuf = buf.buf;
        init(buf, capacity);
        append(buf, oldbuf);
    }

    function max(uint a, uint b) private pure returns(uint) {
        if(a > b) {
            return a;
        }
        return b;
    }

    /**
     * @dev Appends a byte array to the end of the buffer. Resizes if doing so
     *      would exceed the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @return The original buffer.
     */
    function append(buffer memory buf, bytes data) internal pure returns(buffer memory) {
        if(data.length + buf.buf.length > buf.capacity) {
            resize(buf, max(buf.capacity, data.length) * 2);
        }

        uint dest;
        uint src;
        uint len = data.length;
        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Length of existing buffer data
            let buflen := mload(bufptr)
            // Start address = buffer address + buffer length + sizeof(buffer length)
            dest := add(add(bufptr, buflen), 32)
            // Update buffer length
            mstore(bufptr, add(buflen, mload(data)))
            src := add(data, 32)
        }

        // Copy word-length chunks while possible
        for(; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256 ** (32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }

        return buf;
    }

    /**
     * @dev Appends a byte to the end of the buffer. Resizes if doing so would
     * exceed the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @return The original buffer.
     */
    function append(buffer memory buf, uint8 data) internal pure {
        if(buf.buf.length + 1 > buf.capacity) {
            resize(buf, buf.capacity * 2);
        }

        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Length of existing buffer data
            let buflen := mload(bufptr)
            // Address = buffer address + buffer length + sizeof(buffer length)
            let dest := add(add(bufptr, buflen), 32)
            mstore8(dest, data)
            // Update buffer length
            mstore(bufptr, add(buflen, 1))
        }
    }

    /**
     * @dev Appends a byte to the end of the buffer. Resizes if doing so would
     * exceed the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @return The original buffer.
     */
    function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) {
        if(len + buf.buf.length > buf.capacity) {
            resize(buf, max(buf.capacity, len) * 2);
        }

        uint mask = 256 ** len - 1;
        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Length of existing buffer data
            let buflen := mload(bufptr)
            // Address = buffer address + buffer length + sizeof(buffer length) + len
            let dest := add(add(bufptr, buflen), len)
            mstore(dest, or(and(mload(dest), not(mask)), data))
            // Update buffer length
            mstore(bufptr, add(buflen, len))
        }
        return buf;
    }
}

library CBOR {
    using Buffer for Buffer.buffer;

    uint8 private constant MAJOR_TYPE_INT = 0;
    uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1;
    uint8 private constant MAJOR_TYPE_BYTES = 2;
    uint8 private constant MAJOR_TYPE_STRING = 3;
    uint8 private constant MAJOR_TYPE_ARRAY = 4;
    uint8 private constant MAJOR_TYPE_MAP = 5;
    uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7;

    function encodeType(Buffer.buffer memory buf, uint8 major, uint value) private pure {
        if(value <= 23) {
            buf.append(uint8((major << 5) | value));
        } else if(value <= 0xFF) {
            buf.append(uint8((major << 5) | 24));
            buf.appendInt(value, 1);
        } else if(value <= 0xFFFF) {
            buf.append(uint8((major << 5) | 25));
            buf.appendInt(value, 2);
        } else if(value <= 0xFFFFFFFF) {
            buf.append(uint8((major << 5) | 26));
            buf.appendInt(value, 4);
        } else if(value <= 0xFFFFFFFFFFFFFFFF) {
            buf.append(uint8((major << 5) | 27));
            buf.appendInt(value, 8);
        }
    }

    function encodeIndefiniteLengthType(Buffer.buffer memory buf, uint8 major) private pure {
        buf.append(uint8((major << 5) | 31));
    }

    function encodeUInt(Buffer.buffer memory buf, uint value) internal pure {
        encodeType(buf, MAJOR_TYPE_INT, value);
    }

    function encodeInt(Buffer.buffer memory buf, int value) internal pure {
        if(value >= 0) {
            encodeType(buf, MAJOR_TYPE_INT, uint(value));
        } else {
            encodeType(buf, MAJOR_TYPE_NEGATIVE_INT, uint(-1 - value));
        }
    }

    function encodeBytes(Buffer.buffer memory buf, bytes value) internal pure {
        encodeType(buf, MAJOR_TYPE_BYTES, value.length);
        buf.append(value);
    }

    function encodeString(Buffer.buffer memory buf, string value) internal pure {
        encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length);
        buf.append(bytes(value));
    }

    function startArray(Buffer.buffer memory buf) internal pure {
        encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY);
    }

    function startMap(Buffer.buffer memory buf) internal pure {
        encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP);
    }

    function endSequence(Buffer.buffer memory buf) internal pure {
        encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE);
    }
}

/*
End solidity-cborutils
 */

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_Ledger = 0x30;
    byte constant proofType_Android = 0x40;
    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);

        if(address(oraclize) != OAR.getAddress())
            oraclize = OraclizeI(OAR.getAddress());

        _;
    }
    modifier coupon(string code){
        oraclize = OraclizeI(OAR.getAddress());
        _;
    }

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

    function __callback(bytes32 myid, string result) public {
        __callback(myid, result, new bytes(0));
    }
    function __callback(bytes32 myid, string result, bytes proof) public {
      return;
      // Following should never be reached with a preceding return, however
      // this is just a placeholder function, ideally meant to be defined in
      // child contract when proofs are used
      myid; result; proof; // Silence compiler warnings
      oraclize = OraclizeI(0); // Additional compiler silence about making function pure/view. 
    }

    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_randomDS_getSessionPubKeyHash() oraclizeAPI internal returns (bytes32){
        return oraclize.randomDS_getSessionPubKeyHash();
    }

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

    function parseAddr(string _a) internal pure 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 pure 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 pure 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 pure 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 pure returns (string) {
        return strConcat(_a, _b, _c, _d, "");
    }

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

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

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

    // parseInt(parseFloat*10^_b)
    function parseInt(string _a, uint _b) internal pure 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 pure 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);
    }

    using CBOR for Buffer.buffer;
    function stra2cbor(string[] arr) internal pure returns (bytes) {
        safeMemoryCleaner();
        Buffer.buffer memory buf;
        Buffer.init(buf, 1024);
        buf.startArray();
        for (uint i = 0; i < arr.length; i++) {
            buf.encodeString(arr[i]);
        }
        buf.endSequence();
        return buf.buf;
    }

    function ba2cbor(bytes[] arr) internal pure returns (bytes) {
        safeMemoryCleaner();
        Buffer.buffer memory buf;
        Buffer.init(buf, 1024);
        buf.startArray();
        for (uint i = 0; i < arr.length; i++) {
            buf.encodeBytes(arr[i]);
        }
        buf.endSequence();
        return buf.buf;
    }

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

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

    function oraclize_newRandomDSQuery(uint _delay, uint _nbytes, uint _customGasLimit) internal returns (bytes32){
        require((_nbytes > 0) && (_nbytes <= 32));
        // Convert from seconds to ledger timer ticks
        _delay *= 10;
        bytes memory nbytes = new bytes(1);
        nbytes[0] = byte(_nbytes);
        bytes memory unonce = new bytes(32);
        bytes memory sessionKeyHash = new bytes(32);
        bytes32 sessionKeyHash_bytes32 = oraclize_randomDS_getSessionPubKeyHash();
        assembly {
            mstore(unonce, 0x20)
            // the following variables can be relaxed
            // check relaxed random contract under ethereum-examples repo
            // for an idea on how to override and replace comit hash vars
            mstore(add(unonce, 0x20), xor(blockhash(sub(number, 1)), xor(coinbase, timestamp)))
            mstore(sessionKeyHash, 0x20)
            mstore(add(sessionKeyHash, 0x20), sessionKeyHash_bytes32)
        }
        bytes memory delay = new bytes(32);
        assembly {
            mstore(add(delay, 0x20), _delay)
        }

        bytes memory delay_bytes8 = new bytes(8);
        copyBytes(delay, 24, 8, delay_bytes8, 0);

        bytes[4] memory args = [unonce, nbytes, sessionKeyHash, delay];
        bytes32 queryId = oraclize_query("random", args, _customGasLimit);

        bytes memory delay_bytes8_left = new bytes(8);

        assembly {
            let x := mload(add(delay_bytes8, 0x20))
            mstore8(add(delay_bytes8_left, 0x27), div(x, 0x100000000000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x26), div(x, 0x1000000000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x25), div(x, 0x10000000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x24), div(x, 0x100000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x23), div(x, 0x1000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x22), div(x, 0x10000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x21), div(x, 0x100000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x20), div(x, 0x1000000000000000000000000000000000000000000000000))

        }

        oraclize_randomDS_setCommitment(queryId, keccak256(abi.encodePacked(delay_bytes8_left, 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(keccak256(pubkey)) == signer) return true;
        else {
            (sigok, signer) = safer_ecrecover(tosignh, 28, sigr, sigs);
            return (address(keccak256(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] = byte(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)
        require((_proof[0] == "L") && (_proof[1] == "P") && (_proof[2] == 1));

        bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName());
        require(proofVerified);

        _;
    }

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

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

        return 0;
    }

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

        require(prefix.length == n_random_bytes);

        for (uint256 i=0; i< n_random_bytes; 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){

        // 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);
        if (!(keccak256(keyhash) == keccak256(abi.encodePacked(sha256(abi.encodePacked(context_name, queryId)))))) 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)
        if (!matchBytes32Prefix(sha256(sig1), result, uint(proof[ledgerProofLength+32+8]))) return false;

        // Step 4: commitment match verification, keccak256(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] == keccak256(abi.encodePacked(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);
        if (!verifySig(sha256(tosign1), sig1, sessionPubkey)) 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 pure returns (bytes) {
        uint minLength = length + toOffset;

        // Buffer too small
        require(to.length >= minLength); // Should be a better way?

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

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

        return to;
    }

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

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

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

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

        return (ret, addr);
    }

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

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

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

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

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

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

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

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

    function safeMemoryCleaner() internal pure {
        assembly {
            let fmem := mload(0x40)
            codecopy(fmem, codesize, sub(msize, fmem))
        }
    }

}
// </ORACLIZE_API>


contract DrawTicket is usingOraclize {
    
    address public owner;

    //uint public lastRandomNumber;
    uint private _fromTicket;
    uint private _toTicket;
    string private _potName;
    
    // struct DrawingResult
    // {
    //     uint fromTicket;
    //     uint toTicket;
    //     uint winningTicket;
    // }
    
    // mapping (string => DrawingResult) drawingResults;
    
    event newRandomNumber_bytes(bytes number);
    event newRandomNumber_uint(uint number);
    event LogNewOraclizeQuery(string description);
    event LogResults(string potName, uint fromTicket, uint toTicket, uint winningTicket);

    function DrawTicket() {
        owner = msg.sender;
        oraclize_setProof(proofType_Ledger); // sets the Ledger authenticity proof in the constructor
        //update(); // let's ask for N random bytes immediately when the contract is created!
    }
    
    // the callback function is called by Oraclize when the result is ready
    // the oraclize_randomDS_proofVerify modifier prevents an invalid proof to execute this function code:
    // the proof validity is fully verified on-chain
    function __callback(bytes32 _queryId, string _result, bytes _proof)
    { 
        if (msg.sender != oraclize_cbAddress()) throw;
        
        if (oraclize_randomDS_proofVerify__returnCode(_queryId, _result, _proof) != 0) {
            // the proof verification has failed, do we need to take any action here? (depends on the use case)
        } else {
            // the proof verification has passed
            // now that we know that the random number was safely generated, let's use it..
            
            uint maxRange = (_toTicket - _fromTicket) + 1;
            uint winningTicket = _fromTicket + uint(sha3(_result)) % maxRange;

            LogResults(_potName, _fromTicket, _toTicket, winningTicket);
        }
    }

    
    function getWinningTicket(string potName, uint fromTicket, uint toTicket, uint gasPrice, uint gasLimit) payable {
        require(msg.sender == owner);

        _fromTicket = fromTicket;
        _toTicket = toTicket;
        _potName = potName;

        if (oraclize_getPrice("Random") > this.balance) {
           LogNewOraclizeQuery("Oraclize query was NOT sent, please add some ETH to cover for the query fee");
        } else {
            LogNewOraclizeQuery("Oraclize query was sent, standing by for the answer..");
        }

        uint N = 7;
        uint delay = 0; // number of seconds to wait before the execution takes place
        uint callbackGas = gasLimit; // amount of gas we want Oraclize to set for the callback function
        oraclize_setCustomGasPrice(gasPrice);
        bytes32 queryId = oraclize_newRandomDSQuery(delay, N, callbackGas); // this function internally generates the correct oraclize_query and returns its queryId
    }

    function storeETH() payable public {}

    function withdrawETH() {
        require(msg.sender == owner);
        owner.send(this.balance);
    }
    
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_queryId","type":"bytes32"},{"name":"_result","type":"string"},{"name":"_proof","type":"bytes"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"potName","type":"string"},{"name":"fromTicket","type":"uint256"},{"name":"toTicket","type":"uint256"},{"name":"gasPrice","type":"uint256"},{"name":"gasLimit","type":"uint256"}],"name":"getWinningTicket","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"storeETH","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"number","type":"bytes"}],"name":"newRandomNumber_bytes","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"number","type":"uint256"}],"name":"newRandomNumber_uint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"description","type":"string"}],"name":"LogNewOraclizeQuery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"potName","type":"string"},{"indexed":false,"name":"fromTicket","type":"uint256"},{"indexed":false,"name":"toTicket","type":"uint256"},{"indexed":false,"name":"winningTicket","type":"uint256"}],"name":"LogResults","type":"event"}]

60806040523480156200001157600080fd5b5033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200009060307f01000000000000000000000000000000000000000000000000000000000000000262000096640100000000026401000000009004565b62000a9a565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806200011757506000620001156000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166200044a640100000000026401000000009004565b145b156200013a5762000138600062000455640100000000026401000000009004565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620001c057600080fd5b505af1158015620001d5573d6000803e3d6000fd5b505050506040513d6020811015620001ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151562000358576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620002da57600080fd5b505af1158015620002ef573d6000803e3d6000fd5b505050506040513d60208110156200030657600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663688dcfd7826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001915050600060405180830381600087803b1580156200042e57600080fd5b505af115801562000443573d6000803e3d6000fd5b5050505050565b6000813b9050919050565b60006200047062000477640100000000026401000000009004565b9050919050565b600080620004a8731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6200044a640100000000026401000000009004565b11156200055c57731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620005526040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250620009cf640100000000026401000000009004565b60019050620009cc565b60006200058c73c03a2615d5efaf5f49f60b7bb6583eaec212fdf16200044a640100000000026401000000009004565b1115620006405773c03a2615d5efaf5f49f60b7bb6583eaec212fdf16000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620006366040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250620009cf640100000000026401000000009004565b60019050620009cc565b60006200067073b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6200044a640100000000026401000000009004565b1115620007245773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200071a6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250620009cf640100000000026401000000009004565b60019050620009cc565b60006200075473146500cfd35b22e4a392fe0adc06de1a1368ed486200044a640100000000026401000000009004565b1115620008085773146500cfd35b22e4a392fe0adc06de1a1368ed486000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620007fe6040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250620009cf640100000000026401000000009004565b60019050620009cc565b600062000838736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756200044a640100000000026401000000009004565b11156200089d57736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620009cc565b6000620008cd7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6200044a640100000000026401000000009004565b111562000932577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620009cc565b6000620009627351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6200044a640100000000026401000000009004565b1115620009c7577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050620009cc565b600090505b90565b8060029080519060200190620009e7929190620009eb565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000a2e57805160ff191683800117855562000a5f565b8280016001018555821562000a5f579182015b8281111562000a5e57825182559160200191906001019062000a41565b5b50905062000a6e919062000a72565b5090565b62000a9791905b8082111562000a9357600081600090555060010162000a79565b5090565b90565b6145f28062000aaa6000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327dc297e1461007d57806338bbfa50146100f45780638da5cb5b146101b1578063a3a2a82e14610208578063e086e5ec1461028c578063f1ad3334146102a3575b600080fd5b34801561008957600080fd5b506100f26004803603810190808035600019169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506102ad565b005b34801561010057600080fd5b506101af6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506102f0565b005b3480156101bd57600080fd5b506101c66104b2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61028a600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001909291908035906020019092919080359060200190929190803590602001909291905050506104d8565b005b34801561029857600080fd5b506102a161072f565b005b6102ab6107fc565b005b6102ec828260006040519080825280601f01601f1916602001820160405280156102e65781602001602082028038833980820191505090505b506102f0565b5050565b6000806102fb6107fe565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561033457600080fd5b6000610341868686610b5c565b60ff16141515610350576104ab565b60016006546007540301915081846040518082805190602001908083835b602083101515610393578051825260208201915060208101905060208303925061036e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600190048115156103cd57fe5b066006540190507f952fe758c2382a0953db32906aa0e3427ca014eda02cbb56b326c333101d557b60086006546007548460405180806020018581526020018481526020018381526020018281038252868181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104995780601f1061046e57610100808354040283529160200191610499565b820191906000526020600020905b81548152906001019060200180831161047c57829003601f168201915b50509550505050505060405180910390a15b5050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561053a57600080fd5b8760068190555086600781905550886008908051906020019061055e9291906144df565b503073ffffffffffffffffffffffffffffffffffffffff16316105b56040805190810160405280600681526020017f52616e646f6d0000000000000000000000000000000000000000000000000000815250610d93565b1115610674577f621c2856e3b87f81235f8ac8a22bbb40a0142961960710d00b2b6c380902b57e60405180806020018281038252604b8152602001807f4f7261636c697a6520717565727920776173204e4f542073656e742c20706c6581526020017f6173652061646420736f6d652045544820746f20636f76657220666f7220746881526020017f652071756572792066656500000000000000000000000000000000000000000081525060600191505060405180910390a1610703565b7f621c2856e3b87f81235f8ac8a22bbb40a0142961960710d00b2b6c380902b57e6040518080602001828103825260358152602001807f4f7261636c697a65207175657279207761732073656e742c207374616e64696e81526020017f6720627920666f722074686520616e737765722e2e000000000000000000000081525060400191505060405180910390a15b600793506000925084915061071786611163565b6107228385846114a6565b9050505050505050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561078b57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505050565b565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061086e5750600061086c6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b1561087f5761087d6000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561090457600080fd5b505af1158015610918573d6000803e3d6000fd5b505050506040513d602081101561092e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610a96576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a1a57600080fd5b505af1158015610a2e573d6000803e3d6000fd5b505050506040513d6020811015610a4457600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610b1c57600080fd5b505af1158015610b30573d6000803e3d6000fd5b505050506040513d6020811015610b4657600080fd5b8101908080519060200190929190505050905090565b6000807f4c00000000000000000000000000000000000000000000000000000000000000836000815181101515610b8f57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141580610ca457507f5000000000000000000000000000000000000000000000000000000000000000836001815181101515610c3457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614155b80610d4d575060017f010000000000000000000000000000000000000000000000000000000000000002836002815181101515610cdd57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614155b15610d5b5760019150610d8b565b610d6e838686610d69611af4565b611b96565b9050600015158115151415610d865760029150610d8b565b600091505b509392505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610e0357506000610e016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b15610e1457610e126000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610e9957600080fd5b505af1158015610ead573d6000803e3d6000fd5b505050506040513d6020811015610ec357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561102b576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610faf57600080fd5b505af1158015610fc3573d6000803e3d6000fd5b505050506040513d6020811015610fd957600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663524f3889836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156110d55780820151818401526020810190506110ba565b50505050905090810190601f1680156111025780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561112157600080fd5b505af1158015611135573d6000803e3d6000fd5b505050506040513d602081101561114b57600080fd5b81019080805190602001909291905050509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806111d2575060006111d06000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b156111e3576111e16000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561126857600080fd5b505af115801561127c573d6000803e3d6000fd5b505050506040513d602081101561129257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156113fa576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561137e57600080fd5b505af1158015611392573d6000803e3d6000fd5b505050506040513d60208110156113a857600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca6ad1e4826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561148b57600080fd5b505af115801561149f573d6000803e3d6000fd5b5050505050565b6000606080606060006060806114ba61455f565b6000606060008c1180156114cf575060208c11155b15156114da57600080fd5b600a8d029c5060016040519080825280601f01601f1916602001820160405280156115145781602001602082028038833980820191505090505b5098508b7f01000000000000000000000000000000000000000000000000000000000000000289600081518110151561154957fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060206040519080825280601f01601f1916602001820160405280156115ad5781602001602082028038833980820191505090505b50975060206040519080825280601f01601f1916602001820160405280156115e45781602001602082028038833980820191505090505b5096506115ef6124ca565b95506020885242411860014303401860208901526020875285602088015260206040519080825280601f01601f1916602001820160405280156116415781602001602082028038833980820191505090505b5094508c602086015260086040519080825280601f01601f19166020018201604052801561167e5781602001602082028038833980820191505090505b5093506116918560186008876000612828565b506080604051908101604052808981526020018a81526020018881526020018681525092506116f66040805190810160405280600681526020017f72616e646f6d0000000000000000000000000000000000000000000000000000815250848d612888565b915060086040519080825280601f01601f19166020018201604052801561172c5781602001602082028038833980820191505090505b50905060208401517f0100000000000000000000000000000000000000000000000000000000000000810460278301537e01000000000000000000000000000000000000000000000000000000000000810460268301537d010000000000000000000000000000000000000000000000000000000000810460258301537c0100000000000000000000000000000000000000000000000000000000810460248301537b01000000000000000000000000000000000000000000000000000000810460238301537a010000000000000000000000000000000000000000000000000000810460228301537901000000000000000000000000000000000000000000000000008104602183015378010000000000000000000000000000000000000000000000008104602083015350611ac5828285600160048110151561186d57fe5b6020020151600287600060048110151561188357fe5b60200201516040518082805190602001908083835b6020831015156118bd5780518252602082019150602081019050602083039250611898565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015611901573d6000803e3d6000fd5b5050506040513d602081101561191657600080fd5b810190808051906020019092919050505087600260048110151561193657fe5b60200201516040516020018085805190602001908083835b602083101515611973578051825260208201915060208101905060208303925061194e565b6001836020036101000a03801982511681845116808217855250505050505090500184805190602001908083835b6020831015156119c657805182526020820191506020810190506020830392506119a1565b6001836020036101000a038019825116818451168082178552505050505050905001836000191660001916815260200182805190602001908083835b602083101515611a275780518252602082019150602081019050602083039250611a02565b6001836020036101000a0380198251168184511680821785525050505050509050019450505050506040516020818303038152906040526040518082805190602001908083835b602083101515611a935780518252602082019150602081019050602083039250611a6e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020612c30565b8199505050505050505050509392505050565b6000813b9050919050565b6000611aed612c58565b9050919050565b606060028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b8c5780601f10611b6157610100808354040283529160200191611b8c565b820191906000526020600020905b815481529060010190602001808311611b6f57829003601f168201915b5050505050905090565b6000806060806060806000806060602060028e6045815181101515611bb757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040160440101975060206040519080825280601f01601f191660200182016040528015611c605781602001602082028038833980820191505090505b509650611c728d8960208a6000612828565b5060028a8d6040516020018083805190602001908083835b602083101515611caf5780518252602082019150602081019050602083039250611c8a565b6001836020036101000a0380198251168184511680821785525050505050509050018260001916600019168152602001925050506040516020818303038152906040526040518082805190602001908083835b602083101515611d275780518252602082019150602081019050602083039250611d02565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015611d6b573d6000803e3d6000fd5b5050506040513d6020811015611d8057600080fd5b81019080805190602001909291905050506040516020018082600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b602083101515611ded5780518252602082019150602081019050602083039250611dc8565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916876040518082805190602001908083835b602083101515611e545780518252602082019150602081019050602083039250611e2f565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916141515611e9557600098506124ba565b60028d600160498b0101815181101515611eab57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004016040519080825280601f01601f191660200182016040528015611f4c5781602001602082028038833980820191505090505b509550611f618d60498a018851896000612828565b5061208f6002876040518082805190602001908083835b602083101515611f9d5780518252602082019150602081019050602083039250611f78565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015611fe1573d6000803e3d6000fd5b5050506040513d6020811015611ff657600080fd5b81019080805190602001909291905050508c8f600860208d010181518110151561201c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090046130e7565b151561209e57600098506124ba565b60296040519080825280601f01601f1916602001820160405280156120d25781602001602082028038833980820191505090505b5094506120e78d60208a016029886000612828565b50604080519080825280601f01601f19166020018201604052801561211b5781602001602082028038833980820191505090505b50935060418651602960208b01010101925061213f8d604085036040876000612828565b506002846040518082805190602001908083835b6020831015156121785780518252602082019150602081019050602083039250612153565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156121bc573d6000803e3d6000fd5b5050506040513d60208110156121d157600080fd5b8101908080519060200190929190505050915084826040516020018083805190602001908083835b60208310151561221e57805182526020820191506020810190506020830392506121f9565b6001836020036101000a0380198251168184511680821785525050505050509050018260001916600019168152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831015156122965780518252602082019150602081019050602083039250612271565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916600360008e600019166000191681526020019081526020016000205460001916141561231157600360008d600019166000191681526020019081526020016000206000905561231a565b600098506124ba565b60496040519080825280601f01601f19166020018201604052801561234e5781602001602082028038833980820191505090505b5090506123608d896049846000612828565b5061240d6002826040518082805190602001908083835b60208310151561239c5780518252602082019150602081019050602083039250612377565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156123e0573d6000803e3d6000fd5b5050506040513d60208110156123f557600080fd5b810190808051906020019092919050505087866131ff565b151561241c57600098506124ba565b6000151560046000846000191660001916815260200190815260200160002060009054906101000a900460ff161515141561248e5761245b8d8461352c565b60046000846000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505b60046000836000191660001916815260200190815260200160002060009054906101000a900460ff1698505b5050505050505050949350505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061253a575060006125386000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b1561254b576125496000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156125d057600080fd5b505af11580156125e4573d6000803e3d6000fd5b505050506040513d60208110156125fa57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612762576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156126e657600080fd5b505af11580156126fa573d6000803e3d6000fd5b505050506040513d602081101561271057600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663abaa5f3e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127e857600080fd5b505af11580156127fc573d6000803e3d6000fd5b505050506040513d602081101561281257600080fd5b8101908080519060200190929190505050905090565b6060600080600084870192508286511015151561284457600080fd5b8760200191508460200190505b8688602001018210156128795781890151808288015250602082019150602081019050612851565b85935050505095945050505050565b6000606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806128fb575060006128f96000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b1561290c5761290a6000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561299157600080fd5b505af11580156129a5573d6000803e3d6000fd5b505050506040513d60208110156129bb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612b23576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612aa757600080fd5b505af1158015612abb573d6000803e3d6000fd5b505050506040513d6020811015612ad157600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6004604051908082528060200260200182016040528015612b5857816020015b6060815260200190600190039081612b435790505b509050836000600481101515612b6a57fe5b6020020151816000815181101515612b7e57fe5b90602001906020020181905250836001600481101515612b9a57fe5b6020020151816001815181101515612bae57fe5b90602001906020020181905250836002600481101515612bca57fe5b6020020151816002815181101515612bde57fe5b90602001906020020181905250836003600481101515612bfa57fe5b6020020151816003815181101515612c0e57fe5b90602001906020020181905250612c26858285613a92565b9150509392505050565b8060036000846000191660001916815260200190815260200160002081600019169055505050565b600080612c78731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611ad8565b1115612d1957731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612d106040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250614050565b600190506130e4565b6000612d3873c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611ad8565b1115612dd95773c03a2615d5efaf5f49f60b7bb6583eaec212fdf16000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612dd06040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250614050565b600190506130e4565b6000612df873b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611ad8565b1115612e995773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612e906040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250614050565b600190506130e4565b6000612eb873146500cfd35b22e4a392fe0adc06de1a1368ed48611ad8565b1115612f595773146500cfd35b22e4a392fe0adc06de1a1368ed486000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612f506040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250614050565b600190506130e4565b6000612f78736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611ad8565b1115612fdb57736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506130e4565b6000612ffa7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611ad8565b111561305d577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506130e4565b600061307c7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611ad8565b11156130df577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506130e4565b600090505b90565b6000806000600191508385511415156130ff57600080fd5b600090505b838110156131f357848181518110151561311a57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916868260208110151561319557fe5b1a7f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415156131e657600091505b8080600101915050613104565b81925050509392505050565b600080600080600060606000606060206040519080825280601f01601f1916602001820160405280156132415781602001602082028038833980820191505090505b50925060208a600381518110151561325557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040360040191506132d88a836020866000612828565b925060206040519080825280601f01601f19166020018201604052801561330e5781602001602082028038833980820191505090505b5090506022820191506133a98a60208c6001860381518110151561332e57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040384016020846000612828565b905060208301519450602081015193506133c68b601b878761406a565b80975081985050508573ffffffffffffffffffffffffffffffffffffffff16896040518082805190602001908083835b60208310151561341b57805182526020820191506020810190506020830392506133f6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900473ffffffffffffffffffffffffffffffffffffffff161415613471576001975061351e565b61347e8b601c878761406a565b80975081985050508573ffffffffffffffffffffffffffffffffffffffff16896040518082805190602001908083835b6020831015156134d357805182526020820191506020810190506020830392506134ae565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900473ffffffffffffffffffffffffffffffffffffffff161497505b505050505050509392505050565b600080606080606080606080606060028b60018c0181518110151561354d57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004016040519080825280601f01601f1916602001820160405280156135ee5781602001602082028038833980820191505090505b5096506136008b8b89518a6000612828565b50604080519080825280601f01601f1916602001820160405280156136345781602001602082028038833980820191505090505b5095506136478b60046040896000612828565b5060626040519080825280601f01601f19166020018201604052801561367c5781602001602082028038833980820191505090505b50945060017f0100000000000000000000000000000000000000000000000000000000000000028560008151811015156136b257fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506136f48b60418c036041886001612828565b506040805190810160405280602081526020017ffd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c815250935061373d8460006020886042612828565b506137ea6002866040518082805190602001908083835b6020831015156137795780518252602082019150602081019050602083039250613754565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156137bd573d6000803e3d6000fd5b5050506040513d60208110156137d257600080fd5b810190808051906020019092919050505088886131ff565b97506000151588151514156138025760009850613a84565b606060405190810160405280604081526020017f7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e881526020017f537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e4815250925060426040519080825280601f01601f1916602001820160405280156138955781602001602082028038833980820191505090505b50915060fe7f0100000000000000000000000000000000000000000000000000000000000000028260008151811015156138cb57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061390b8b60036041856001612828565b5060028b604581518110151561391d57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004016040519080825280601f01601f1916602001820160405280156139be5781602001602082028038833980820191505090505b5090506139d18b60448351846000612828565b50613a7e6002836040518082805190602001908083835b602083101515613a0d57805182526020820191506020810190506020830392506139e8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015613a51573d6000803e3d6000fd5b5050506040513d6020811015613a6657600080fd5b810190808051906020019092919050505082856131ff565b97508798505b505050505050505092915050565b600080606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480613b0657506000613b046000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b15613b1757613b156000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015613b9c57600080fd5b505af1158015613bb0573d6000803e3d6000fd5b505050506040513d6020811015613bc657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515613d2e576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015613cb257600080fd5b505af1158015613cc6573d6000803e3d6000fd5b505050506040513d6020811015613cdc57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc87866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015613ddf578082015181840152602081019050613dc4565b50505050905090810190601f168015613e0c5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015613e2c57600080fd5b505af1158015613e40573d6000803e3d6000fd5b505050506040513d6020811015613e5657600080fd5b81019080805190602001909291905050509150833a02670de0b6b3a764000001821115613e895760006001029250614047565b613e92856140ae565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c55c1cb68360008985896040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015613f53578082015181840152602081019050613f38565b50505050905090810190601f168015613f805780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015613fb9578082015181840152602081019050613f9e565b50505050905090810190601f168015613fe65780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801561400857600080fd5b505af115801561401c573d6000803e3d6000fd5b50505050506040513d602081101561403357600080fd5b810190808051906020019092919050505092505b50509392505050565b80600290805190602001906140669291906144df565b5050565b60008060008060405188815287602082015286604082015285606082015260208160808360006001610bb8f192508051915050818193509350505094509492505050565b60606140b8614587565b60006140c2614133565b6140ce8261040061413f565b6140d78261418f565b600090505b835181101561411c5761410f84828151811015156140f657fe5b906020019060200201518361419d90919063ffffffff16565b80806001019150506140dc565b614125826141c2565b816000015192505050919050565b60405180590338823950565b6000819050600060208281151561415257fe5b0614151561416f5760208181151561416657fe5b06602003810190505b808360200181815250506040518084526000815281810160405250505050565b61419a8160046141d0565b50565b6141aa82600283516141f4565b6141bd818361434d90919063ffffffff16565b505050565b6141cd8160076141d0565b50565b6141f0601f60058360ff169060020a0217836143f990919063ffffffff16565b5050565b601781111515614225576142208160058460ff169060020a0260ff1617846143f990919063ffffffff16565b614348565b60ff8111151561426b5761424f601860058460ff169060020a0217846143f990919063ffffffff16565b614265816001856144399092919063ffffffff16565b50614347565b61ffff811115156142b257614296601960058460ff169060020a0217846143f990919063ffffffff16565b6142ac816002856144399092919063ffffffff16565b50614346565b63ffffffff811115156142fb576142df601a60058460ff169060020a0217846143f990919063ffffffff16565b6142f5816004856144399092919063ffffffff16565b50614345565b67ffffffffffffffff811115156143445761432c601b60058460ff169060020a0217846143f990919063ffffffff16565b614342816008856144399092919063ffffffff16565b505b5b5b5b5b505050565b614355614587565b6000806000808660200151876000015151875101111561438b5761438a8760026143848a602001518a516144a0565b026144bc565b5b8551915086518051602081830101955087518101825260208801945050505b6020821015156143cf57825184526020840193506020830192506020820391506143aa565b6001826020036101000a039050801983511681855116818117865250508694505050505092915050565b8160200151600183600001515101111561441f5761441e8260028460200151026144bc565b5b815180516020818301018381536001820183525050505050565b614441614587565b60008460200151856000015151840111156144715761447085600261446a8860200151876144a0565b026144bc565b5b6001836101000a0390508451805184818301018684198251161781528582018352505050849150509392505050565b6000818311156144b2578290506144b6565b8190505b92915050565b6060826000015190506144cf838361413f565b6144d9838261434d565b50505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061452057805160ff191683800117855561454e565b8280016001018555821561454e579182015b8281111561454d578251825591602001919060010190614532565b5b50905061455b91906145a1565b5090565b6080604051908101604052806004905b606081526020019060019003908161456f5790505090565b604080519081016040528060608152602001600081525090565b6145c391905b808211156145bf5760008160009055506001016145a7565b5090565b905600a165627a7a72305820c685e971c641a221a71d763f6d2034cdd7082068711c3b09fcdbf1f09a01ea120029

Deployed Bytecode

0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327dc297e1461007d57806338bbfa50146100f45780638da5cb5b146101b1578063a3a2a82e14610208578063e086e5ec1461028c578063f1ad3334146102a3575b600080fd5b34801561008957600080fd5b506100f26004803603810190808035600019169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506102ad565b005b34801561010057600080fd5b506101af6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506102f0565b005b3480156101bd57600080fd5b506101c66104b2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61028a600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001909291908035906020019092919080359060200190929190803590602001909291905050506104d8565b005b34801561029857600080fd5b506102a161072f565b005b6102ab6107fc565b005b6102ec828260006040519080825280601f01601f1916602001820160405280156102e65781602001602082028038833980820191505090505b506102f0565b5050565b6000806102fb6107fe565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561033457600080fd5b6000610341868686610b5c565b60ff16141515610350576104ab565b60016006546007540301915081846040518082805190602001908083835b602083101515610393578051825260208201915060208101905060208303925061036e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600190048115156103cd57fe5b066006540190507f952fe758c2382a0953db32906aa0e3427ca014eda02cbb56b326c333101d557b60086006546007548460405180806020018581526020018481526020018381526020018281038252868181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104995780601f1061046e57610100808354040283529160200191610499565b820191906000526020600020905b81548152906001019060200180831161047c57829003601f168201915b50509550505050505060405180910390a15b5050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561053a57600080fd5b8760068190555086600781905550886008908051906020019061055e9291906144df565b503073ffffffffffffffffffffffffffffffffffffffff16316105b56040805190810160405280600681526020017f52616e646f6d0000000000000000000000000000000000000000000000000000815250610d93565b1115610674577f621c2856e3b87f81235f8ac8a22bbb40a0142961960710d00b2b6c380902b57e60405180806020018281038252604b8152602001807f4f7261636c697a6520717565727920776173204e4f542073656e742c20706c6581526020017f6173652061646420736f6d652045544820746f20636f76657220666f7220746881526020017f652071756572792066656500000000000000000000000000000000000000000081525060600191505060405180910390a1610703565b7f621c2856e3b87f81235f8ac8a22bbb40a0142961960710d00b2b6c380902b57e6040518080602001828103825260358152602001807f4f7261636c697a65207175657279207761732073656e742c207374616e64696e81526020017f6720627920666f722074686520616e737765722e2e000000000000000000000081525060400191505060405180910390a15b600793506000925084915061071786611163565b6107228385846114a6565b9050505050505050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561078b57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505050565b565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061086e5750600061086c6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b1561087f5761087d6000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561090457600080fd5b505af1158015610918573d6000803e3d6000fd5b505050506040513d602081101561092e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610a96576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610a1a57600080fd5b505af1158015610a2e573d6000803e3d6000fd5b505050506040513d6020811015610a4457600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610b1c57600080fd5b505af1158015610b30573d6000803e3d6000fd5b505050506040513d6020811015610b4657600080fd5b8101908080519060200190929190505050905090565b6000807f4c00000000000000000000000000000000000000000000000000000000000000836000815181101515610b8f57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141580610ca457507f5000000000000000000000000000000000000000000000000000000000000000836001815181101515610c3457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614155b80610d4d575060017f010000000000000000000000000000000000000000000000000000000000000002836002815181101515610cdd57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614155b15610d5b5760019150610d8b565b610d6e838686610d69611af4565b611b96565b9050600015158115151415610d865760029150610d8b565b600091505b509392505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610e0357506000610e016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b15610e1457610e126000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610e9957600080fd5b505af1158015610ead573d6000803e3d6000fd5b505050506040513d6020811015610ec357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561102b576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610faf57600080fd5b505af1158015610fc3573d6000803e3d6000fd5b505050506040513d6020811015610fd957600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663524f3889836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156110d55780820151818401526020810190506110ba565b50505050905090810190601f1680156111025780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561112157600080fd5b505af1158015611135573d6000803e3d6000fd5b505050506040513d602081101561114b57600080fd5b81019080805190602001909291905050509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806111d2575060006111d06000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b156111e3576111e16000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561126857600080fd5b505af115801561127c573d6000803e3d6000fd5b505050506040513d602081101561129257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156113fa576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561137e57600080fd5b505af1158015611392573d6000803e3d6000fd5b505050506040513d60208110156113a857600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca6ad1e4826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561148b57600080fd5b505af115801561149f573d6000803e3d6000fd5b5050505050565b6000606080606060006060806114ba61455f565b6000606060008c1180156114cf575060208c11155b15156114da57600080fd5b600a8d029c5060016040519080825280601f01601f1916602001820160405280156115145781602001602082028038833980820191505090505b5098508b7f01000000000000000000000000000000000000000000000000000000000000000289600081518110151561154957fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060206040519080825280601f01601f1916602001820160405280156115ad5781602001602082028038833980820191505090505b50975060206040519080825280601f01601f1916602001820160405280156115e45781602001602082028038833980820191505090505b5096506115ef6124ca565b95506020885242411860014303401860208901526020875285602088015260206040519080825280601f01601f1916602001820160405280156116415781602001602082028038833980820191505090505b5094508c602086015260086040519080825280601f01601f19166020018201604052801561167e5781602001602082028038833980820191505090505b5093506116918560186008876000612828565b506080604051908101604052808981526020018a81526020018881526020018681525092506116f66040805190810160405280600681526020017f72616e646f6d0000000000000000000000000000000000000000000000000000815250848d612888565b915060086040519080825280601f01601f19166020018201604052801561172c5781602001602082028038833980820191505090505b50905060208401517f0100000000000000000000000000000000000000000000000000000000000000810460278301537e01000000000000000000000000000000000000000000000000000000000000810460268301537d010000000000000000000000000000000000000000000000000000000000810460258301537c0100000000000000000000000000000000000000000000000000000000810460248301537b01000000000000000000000000000000000000000000000000000000810460238301537a010000000000000000000000000000000000000000000000000000810460228301537901000000000000000000000000000000000000000000000000008104602183015378010000000000000000000000000000000000000000000000008104602083015350611ac5828285600160048110151561186d57fe5b6020020151600287600060048110151561188357fe5b60200201516040518082805190602001908083835b6020831015156118bd5780518252602082019150602081019050602083039250611898565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015611901573d6000803e3d6000fd5b5050506040513d602081101561191657600080fd5b810190808051906020019092919050505087600260048110151561193657fe5b60200201516040516020018085805190602001908083835b602083101515611973578051825260208201915060208101905060208303925061194e565b6001836020036101000a03801982511681845116808217855250505050505090500184805190602001908083835b6020831015156119c657805182526020820191506020810190506020830392506119a1565b6001836020036101000a038019825116818451168082178552505050505050905001836000191660001916815260200182805190602001908083835b602083101515611a275780518252602082019150602081019050602083039250611a02565b6001836020036101000a0380198251168184511680821785525050505050509050019450505050506040516020818303038152906040526040518082805190602001908083835b602083101515611a935780518252602082019150602081019050602083039250611a6e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020612c30565b8199505050505050505050509392505050565b6000813b9050919050565b6000611aed612c58565b9050919050565b606060028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b8c5780601f10611b6157610100808354040283529160200191611b8c565b820191906000526020600020905b815481529060010190602001808311611b6f57829003601f168201915b5050505050905090565b6000806060806060806000806060602060028e6045815181101515611bb757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040160440101975060206040519080825280601f01601f191660200182016040528015611c605781602001602082028038833980820191505090505b509650611c728d8960208a6000612828565b5060028a8d6040516020018083805190602001908083835b602083101515611caf5780518252602082019150602081019050602083039250611c8a565b6001836020036101000a0380198251168184511680821785525050505050509050018260001916600019168152602001925050506040516020818303038152906040526040518082805190602001908083835b602083101515611d275780518252602082019150602081019050602083039250611d02565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015611d6b573d6000803e3d6000fd5b5050506040513d6020811015611d8057600080fd5b81019080805190602001909291905050506040516020018082600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b602083101515611ded5780518252602082019150602081019050602083039250611dc8565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916876040518082805190602001908083835b602083101515611e545780518252602082019150602081019050602083039250611e2f565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916141515611e9557600098506124ba565b60028d600160498b0101815181101515611eab57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004016040519080825280601f01601f191660200182016040528015611f4c5781602001602082028038833980820191505090505b509550611f618d60498a018851896000612828565b5061208f6002876040518082805190602001908083835b602083101515611f9d5780518252602082019150602081019050602083039250611f78565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015611fe1573d6000803e3d6000fd5b5050506040513d6020811015611ff657600080fd5b81019080805190602001909291905050508c8f600860208d010181518110151561201c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090046130e7565b151561209e57600098506124ba565b60296040519080825280601f01601f1916602001820160405280156120d25781602001602082028038833980820191505090505b5094506120e78d60208a016029886000612828565b50604080519080825280601f01601f19166020018201604052801561211b5781602001602082028038833980820191505090505b50935060418651602960208b01010101925061213f8d604085036040876000612828565b506002846040518082805190602001908083835b6020831015156121785780518252602082019150602081019050602083039250612153565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156121bc573d6000803e3d6000fd5b5050506040513d60208110156121d157600080fd5b8101908080519060200190929190505050915084826040516020018083805190602001908083835b60208310151561221e57805182526020820191506020810190506020830392506121f9565b6001836020036101000a0380198251168184511680821785525050505050509050018260001916600019168152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831015156122965780518252602082019150602081019050602083039250612271565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916600360008e600019166000191681526020019081526020016000205460001916141561231157600360008d600019166000191681526020019081526020016000206000905561231a565b600098506124ba565b60496040519080825280601f01601f19166020018201604052801561234e5781602001602082028038833980820191505090505b5090506123608d896049846000612828565b5061240d6002826040518082805190602001908083835b60208310151561239c5780518252602082019150602081019050602083039250612377565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156123e0573d6000803e3d6000fd5b5050506040513d60208110156123f557600080fd5b810190808051906020019092919050505087866131ff565b151561241c57600098506124ba565b6000151560046000846000191660001916815260200190815260200160002060009054906101000a900460ff161515141561248e5761245b8d8461352c565b60046000846000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055505b60046000836000191660001916815260200190815260200160002060009054906101000a900460ff1698505b5050505050505050949350505050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061253a575060006125386000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b1561254b576125496000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156125d057600080fd5b505af11580156125e4573d6000803e3d6000fd5b505050506040513d60208110156125fa57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612762576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156126e657600080fd5b505af11580156126fa573d6000803e3d6000fd5b505050506040513d602081101561271057600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663abaa5f3e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127e857600080fd5b505af11580156127fc573d6000803e3d6000fd5b505050506040513d602081101561281257600080fd5b8101908080519060200190929190505050905090565b6060600080600084870192508286511015151561284457600080fd5b8760200191508460200190505b8688602001018210156128795781890151808288015250602082019150602081019050612851565b85935050505095945050505050565b6000606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806128fb575060006128f96000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b1561290c5761290a6000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561299157600080fd5b505af11580156129a5573d6000803e3d6000fd5b505050506040513d60208110156129bb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612b23576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612aa757600080fd5b505af1158015612abb573d6000803e3d6000fd5b505050506040513d6020811015612ad157600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6004604051908082528060200260200182016040528015612b5857816020015b6060815260200190600190039081612b435790505b509050836000600481101515612b6a57fe5b6020020151816000815181101515612b7e57fe5b90602001906020020181905250836001600481101515612b9a57fe5b6020020151816001815181101515612bae57fe5b90602001906020020181905250836002600481101515612bca57fe5b6020020151816002815181101515612bde57fe5b90602001906020020181905250836003600481101515612bfa57fe5b6020020151816003815181101515612c0e57fe5b90602001906020020181905250612c26858285613a92565b9150509392505050565b8060036000846000191660001916815260200190815260200160002081600019169055505050565b600080612c78731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611ad8565b1115612d1957731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612d106040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250614050565b600190506130e4565b6000612d3873c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611ad8565b1115612dd95773c03a2615d5efaf5f49f60b7bb6583eaec212fdf16000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612dd06040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250614050565b600190506130e4565b6000612df873b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611ad8565b1115612e995773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612e906040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250614050565b600190506130e4565b6000612eb873146500cfd35b22e4a392fe0adc06de1a1368ed48611ad8565b1115612f595773146500cfd35b22e4a392fe0adc06de1a1368ed486000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612f506040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250614050565b600190506130e4565b6000612f78736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611ad8565b1115612fdb57736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506130e4565b6000612ffa7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611ad8565b111561305d577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506130e4565b600061307c7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611ad8565b11156130df577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506130e4565b600090505b90565b6000806000600191508385511415156130ff57600080fd5b600090505b838110156131f357848181518110151561311a57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916868260208110151561319557fe5b1a7f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415156131e657600091505b8080600101915050613104565b81925050509392505050565b600080600080600060606000606060206040519080825280601f01601f1916602001820160405280156132415781602001602082028038833980820191505090505b50925060208a600381518110151561325557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040360040191506132d88a836020866000612828565b925060206040519080825280601f01601f19166020018201604052801561330e5781602001602082028038833980820191505090505b5090506022820191506133a98a60208c6001860381518110151561332e57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090040384016020846000612828565b905060208301519450602081015193506133c68b601b878761406a565b80975081985050508573ffffffffffffffffffffffffffffffffffffffff16896040518082805190602001908083835b60208310151561341b57805182526020820191506020810190506020830392506133f6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900473ffffffffffffffffffffffffffffffffffffffff161415613471576001975061351e565b61347e8b601c878761406a565b80975081985050508573ffffffffffffffffffffffffffffffffffffffff16896040518082805190602001908083835b6020831015156134d357805182526020820191506020810190506020830392506134ae565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900473ffffffffffffffffffffffffffffffffffffffff161497505b505050505050509392505050565b600080606080606080606080606060028b60018c0181518110151561354d57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004016040519080825280601f01601f1916602001820160405280156135ee5781602001602082028038833980820191505090505b5096506136008b8b89518a6000612828565b50604080519080825280601f01601f1916602001820160405280156136345781602001602082028038833980820191505090505b5095506136478b60046040896000612828565b5060626040519080825280601f01601f19166020018201604052801561367c5781602001602082028038833980820191505090505b50945060017f0100000000000000000000000000000000000000000000000000000000000000028560008151811015156136b257fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506136f48b60418c036041886001612828565b506040805190810160405280602081526020017ffd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c815250935061373d8460006020886042612828565b506137ea6002866040518082805190602001908083835b6020831015156137795780518252602082019150602081019050602083039250613754565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156137bd573d6000803e3d6000fd5b5050506040513d60208110156137d257600080fd5b810190808051906020019092919050505088886131ff565b97506000151588151514156138025760009850613a84565b606060405190810160405280604081526020017f7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e881526020017f537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e4815250925060426040519080825280601f01601f1916602001820160405280156138955781602001602082028038833980820191505090505b50915060fe7f0100000000000000000000000000000000000000000000000000000000000000028260008151811015156138cb57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061390b8b60036041856001612828565b5060028b604581518110151561391d57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004016040519080825280601f01601f1916602001820160405280156139be5781602001602082028038833980820191505090505b5090506139d18b60448351846000612828565b50613a7e6002836040518082805190602001908083835b602083101515613a0d57805182526020820191506020810190506020830392506139e8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015613a51573d6000803e3d6000fd5b5050506040513d6020811015613a6657600080fd5b810190808051906020019092919050505082856131ff565b97508798505b505050505050505092915050565b600080606060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480613b0657506000613b046000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ad8565b145b15613b1757613b156000611ae3565b505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015613b9c57600080fd5b505af1158015613bb0573d6000803e3d6000fd5b505050506040513d6020811015613bc657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515613d2e576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015613cb257600080fd5b505af1158015613cc6573d6000803e3d6000fd5b505050506040513d6020811015613cdc57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc87866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015613ddf578082015181840152602081019050613dc4565b50505050905090810190601f168015613e0c5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015613e2c57600080fd5b505af1158015613e40573d6000803e3d6000fd5b505050506040513d6020811015613e5657600080fd5b81019080805190602001909291905050509150833a02670de0b6b3a764000001821115613e895760006001029250614047565b613e92856140ae565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c55c1cb68360008985896040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015613f53578082015181840152602081019050613f38565b50505050905090810190601f168015613f805780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015613fb9578082015181840152602081019050613f9e565b50505050905090810190601f168015613fe65780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801561400857600080fd5b505af115801561401c573d6000803e3d6000fd5b50505050506040513d602081101561403357600080fd5b810190808051906020019092919050505092505b50509392505050565b80600290805190602001906140669291906144df565b5050565b60008060008060405188815287602082015286604082015285606082015260208160808360006001610bb8f192508051915050818193509350505094509492505050565b60606140b8614587565b60006140c2614133565b6140ce8261040061413f565b6140d78261418f565b600090505b835181101561411c5761410f84828151811015156140f657fe5b906020019060200201518361419d90919063ffffffff16565b80806001019150506140dc565b614125826141c2565b816000015192505050919050565b60405180590338823950565b6000819050600060208281151561415257fe5b0614151561416f5760208181151561416657fe5b06602003810190505b808360200181815250506040518084526000815281810160405250505050565b61419a8160046141d0565b50565b6141aa82600283516141f4565b6141bd818361434d90919063ffffffff16565b505050565b6141cd8160076141d0565b50565b6141f0601f60058360ff169060020a0217836143f990919063ffffffff16565b5050565b601781111515614225576142208160058460ff169060020a0260ff1617846143f990919063ffffffff16565b614348565b60ff8111151561426b5761424f601860058460ff169060020a0217846143f990919063ffffffff16565b614265816001856144399092919063ffffffff16565b50614347565b61ffff811115156142b257614296601960058460ff169060020a0217846143f990919063ffffffff16565b6142ac816002856144399092919063ffffffff16565b50614346565b63ffffffff811115156142fb576142df601a60058460ff169060020a0217846143f990919063ffffffff16565b6142f5816004856144399092919063ffffffff16565b50614345565b67ffffffffffffffff811115156143445761432c601b60058460ff169060020a0217846143f990919063ffffffff16565b614342816008856144399092919063ffffffff16565b505b5b5b5b5b505050565b614355614587565b6000806000808660200151876000015151875101111561438b5761438a8760026143848a602001518a516144a0565b026144bc565b5b8551915086518051602081830101955087518101825260208801945050505b6020821015156143cf57825184526020840193506020830192506020820391506143aa565b6001826020036101000a039050801983511681855116818117865250508694505050505092915050565b8160200151600183600001515101111561441f5761441e8260028460200151026144bc565b5b815180516020818301018381536001820183525050505050565b614441614587565b60008460200151856000015151840111156144715761447085600261446a8860200151876144a0565b026144bc565b5b6001836101000a0390508451805184818301018684198251161781528582018352505050849150509392505050565b6000818311156144b2578290506144b6565b8190505b92915050565b6060826000015190506144cf838361413f565b6144d9838261434d565b50505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061452057805160ff191683800117855561454e565b8280016001018555821561454e579182015b8281111561454d578251825591602001919060010190614532565b5b50905061455b91906145a1565b5090565b6080604051908101604052806004905b606081526020019060019003908161456f5790505090565b604080519081016040528060608152602001600081525090565b6145c391905b808211156145bf5760008160009055506001016145a7565b5090565b905600a165627a7a72305820c685e971c641a221a71d763f6d2034cdd7082068711c3b09fcdbf1f09a01ea120029

Swarm Source

bzzr://c685e971c641a221a71d763f6d2034cdd7082068711c3b09fcdbf1f09a01ea12

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.