Contract 0x7E227919a7Da551aF542e4574328eF4eeeE9398c

 

TxHash Block Age From To Value [TxFee]
0x91456e2d7743d9165ae83256eb5e65dd8e4f9ad71258368ff9e4ea206e0f0c856422062174 days 4 hrs ago0x9ab4a6a78d7f49dbcac0589fec20bbe8c123a822 IN  0x7e227919a7da551af542e4574328ef4eeee9398c0 Ether0.000493614
0x22674e41f52cdfa74e31ea2a3a37c1cf2f8961f5484f229789abcbcabed97d996422056174 days 4 hrs ago0x9ab4a6a78d7f49dbcac0589fec20bbe8c123a822 IN  0x7e227919a7da551af542e4574328ef4eeee9398c0 Ether0.00264964
0x6775b3e0a9909cbd636c8798d39900e8093fa6c67c31ae91f33908946ba446276422052174 days 4 hrs ago0x9ab4a6a78d7f49dbcac0589fec20bbe8c123a822 IN  0x7e227919a7da551af542e4574328ef4eeee9398c0 Ether0.000537326
0xc17cecbf4ddfbbd0c71d50974393570b189eae1df6f1d4f2823aee616d0f998a6422044174 days 4 hrs ago0x9ab4a6a78d7f49dbcac0589fec20bbe8c123a822 IN  0x7e227919a7da551af542e4574328ef4eeee9398c0 Ether0.00127479
0xc4a95f757d0196299ad89ba25486768790710b3a723358dab1f4246a60060eb86422041174 days 4 hrs ago0x00004242f4449d49ec9c64ad6f9385a56b2a6297 IN  0x7e227919a7da551af542e4574328ef4eeee9398c0 Ether0.002
0x3682ecf577b2e535e4e29939b466f55694d923f03260a0abd2cb920b5c93f9d56422038174 days 4 hrs ago0x9ab4a6a78d7f49dbcac0589fec20bbe8c123a822 IN  0x7e227919a7da551af542e4574328ef4eeee9398c0 Ether0.001548694
0x60dff7ad0e919fa67e80f397f2ea457ed2106b50b9bc284e1fc8c88888db8f5d6422034174 days 5 hrs ago0x9ab4a6a78d7f49dbcac0589fec20bbe8c123a822 IN  Contract Creation0 Ether0.068127225
[ Download CSV Export 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Verified Source Code for Contract 0x656db34fd512fb22ce16bbc621c58394ebb823c4

Contract Name:
Game

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes

Runs (Optimizer):
200

Contract Source Code

//etherate v.2.0
//EtheRate – is the first in the world, an honest pool of crypto-rates, based on absolute randomness!
//Official WEB-client: etherate.org
//Talk to us on Discord.gg/nEnApvF
/*
╔═══╗╔════╗╔╗─╔╗╔═══╗╔═══╗╔═══╗╔════╗╔═══╗
║╔══╝║╔╗╔╗║║║─║║║╔══╝║╔═╗║║╔═╗║║╔╗╔╗║║╔══╝
║╚══╗╚╝║║╚╝║╚═╝║║╚══╗║╚═╝║║║─║║╚╝║║╚╝║╚══╗
║╔══╝──║║──║╔═╗║║╔══╝║╔╗╔╝║╚═╝║──║║──║╔══╝
║╚══╗──║║──║║─║║║╚══╗║║║╚╗║╔═╗║──║║──║╚══╗
╚═══╝──╚╝──╚╝─╚╝╚═══╝╚╝╚═╝╚╝─╚╝──╚╝──╚═══╝
*/
//69 84 72 69 82 65 84 69

pragma solidity ^0.4.25;

// <ORACLIZE_API>
/*
Copyright (c) 2015-2016 Oraclize SRL
Copyright (c) 2016 Oraclize LTD
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

// This api is currently targeted at 0.4.18, please import oraclizeAPI_pre0.4.sol or oraclizeAPI_0.4 where necessary

pragma solidity >=0.4.18;// Incompatible compiler version... please select one stated within pragma solidity or use different oraclizeAPI version

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;
      myid; result; proof; // Silence compiler warnings
    }

    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) constant 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(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(sha256(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(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 Permissions
{
    //LOGS
    event LOG_ChangePermissions(address indexed _called, address indexed _agent, uint8 _value);
    event LOG_ChangeRegulator(address indexed _called, bool _value);
    //LOGS*
    //PARAMETRS
        //ARRAYS
    mapping(address => uint8) public agents;
        //ARRAYS
    bool public communityRegulator;
    //PARAMETRS*
    //MODIFIERS
    modifier onlyADM()
    {
        require(agents[msg.sender] == 1);
        _;
    }
    //MODIFIERS*
    //FUNCTIONS
        //CHANGE FUNCTIONS
    function changePermissions(address _agent, uint8 _value) public onlyADM()
    {
        require(msg.sender != _agent);
        require(_value <= 1);
        agents[_agent] = _value;
        LOG_ChangePermissions(msg.sender, _agent, _value);
    }
    function changeRegulator(bool _value) public onlyADM()
    {
        communityRegulator = _value;
        LOG_ChangeRegulator(msg.sender, _value);
    }
        //CHANGE FUNCTIONS*
    //FUNCTIONS*
    //CONSTRUSTOR
    function Permissions()
    {
        agents[msg.sender] = 1;
    }
    //CONSTRUCTOR*
}

contract Accounting is Permissions
{
    //LOGS
    event LOG_AcceptWei(address indexed _from, uint256 _wei, uint8 indexed _type);
    event LOG_WithdrawWei(address indexed _called, address indexed _to, uint256 _wei, uint8 indexed _type);
    event LOG_ChangeOraclizeAccountingSettings(address indexed _called, uint256 _OAS_idOraclizeAccountingSettings,
    uint256 _OAS_oraclizeRandomGas, uint256 _OAS_oraclizeRandomGwei);
    //LOGS*
    //PARAMETRS
        //ACCOUNTING CONSTANTS (ACns)
        uint256 constant public ACns_WeiInFinney = 1000000000000000;
        uint256 constant public ACns_WeiInGwei = 1000000000;
        //ACCOUNTING CONSTANTS (ACns)*
        //ACCOUNTING PARAMETRS (AP)
    uint256 public AP_totalBalanceCommissionWei;
    uint256 public AP_totalBalanceDonateWei;
    uint256 public AP_nowRoundBankBalanceWei;
        //ACCOUNTING PARAMETRS (AP)*
        //ORACLIZE ACCOUNTING SETTINGS (OAS)
    uint256 public OAS_idOraclizeAccountingSettings;
    uint256 public OAS_oraclizeRandomGas;
    uint256 public OAS_oraclizeRandomGwei;
        //ORACLIZE ACCOUNTING SETTINGS (OAS)*
    //PARAMETRS*
    //MODIFIERS
    //MODIFIERS*
    //FUNCTIONS
		//PAYABLE FUNCTIONS
    function () payable //Thank you very much ;-)
    {
        AP_totalBalanceDonateWei = AP_totalBalanceDonateWei + msg.value;
        LOG_AcceptWei(msg.sender, msg.value, 1);
    }
		//PAYABLE FUNCTIONS*
        //ACTION FUNCTIONS
    function withdrawTotalBalanceDonateWei(address _to) public onlyADM()
    {
        _to.transfer(AP_totalBalanceDonateWei);
        LOG_WithdrawWei(msg.sender, _to, AP_totalBalanceDonateWei, 1);
        AP_totalBalanceDonateWei = 0;
    }
    function withdrawTotalBalanceCommissionWei(address _to) public onlyADM()
    {
        _to.transfer(AP_totalBalanceCommissionWei);
        LOG_WithdrawWei(msg.sender, _to, AP_totalBalanceCommissionWei, 2);
        AP_totalBalanceCommissionWei = 0;
    }
        //ACTION FUNCTIONS*
        //CHANGE FUNCTIONS
    function changeOraclizeAccountingSettings(uint256 _OAS_oraclizeRandomGas) public onlyADM()
    {
        OAS_idOraclizeAccountingSettings++;
        OAS_oraclizeRandomGas = _OAS_oraclizeRandomGas;
        OAS_oraclizeRandomGwei = _OAS_oraclizeRandomGas * 20;
        LOG_ChangeOraclizeAccountingSettings(msg.sender, OAS_idOraclizeAccountingSettings, OAS_oraclizeRandomGas, OAS_oraclizeRandomGwei);
    }
         //CHANGE FUNCTIONS*
    //FUNCTIONS*
    //CONSTRUSTOR
    //CONSTRUCTOR*
}

contract GameBase is Accounting, usingOraclize
{
    //LOGS
    event LOG_ChangeGameSettings
    (address indexed _called, uint256 _GP_roundNum, uint256 _GS_idGameSettings,
    uint256 _GS_betSizeFinney, uint256 _GS_maxAmountBets, uint256 _GS_minStartAgentAmountBets, uint256 _GS_maxAgentAmountBets, uint256 _GS_maxAmountBetsInOneTransaction,
    uint8 _GS_commissionPct, bool _GS_commissionType, uint256 _GS_betTimeoutSec);
    
    event LOG_ChangeStatusGame(address indexed _called,  uint256 _GP_roundNum, uint8 _status);
    //LOGS*
    //PARAMETRS
        //GAME SETTINGS (GS)
    uint256 public GS_idGameSettings;
    uint256 public GS_betSizeFinney;
    uint256 public GS_maxAmountBets;
    uint256 public GS_minStartAgentAmountBets;
    uint256 public GS_maxAgentAmountBets;
    uint256 public GS_maxAmountBetsInOneTransaction;
    uint8 public GS_commissionPct;
    bool public GS_commissionType;
    uint256 public GS_betTimeoutSec;
        //GAME SETTINGS (GS)*
        //GAME PARAMETRS (GP)
    uint256 public GP_roundNum;
    uint256 public GP_amountBets;
    uint256 public GP_lastBetTimeSec;
    uint8 public GP_statusGame;
            //GAME PARAMETRS ARRAYS (GPA)
    mapping(address => uint256) internal GPA_agentAddressId;
    address[] internal GPA_agentIdAddress;
    uint256[] internal GPA_agentIdBetsSum;
    uint256[] internal GPA_betNumAgentId;
            //GAME PARAMETRS ARRAYS (GPA)*
        //GAME PARAMETRS (GP)*
    //PARAMETRS*
    //MODIFIERS
    modifier onlyNoBets()
    {
        require(GP_amountBets == 0);
        _;
    }
    modifier stop()
    {
        require(GP_statusGame == 0);
        _;
    }
    //MODIFIERS*
    //FUNCTIONS
        //ACTION FUNCTIONS
    function withdrawAllWei(address _to) public onlyADM() onlyNoBets()
    {
        LOG_WithdrawWei(msg.sender, _to, this.balance, 3);
        _to.transfer(this.balance);
        AP_totalBalanceDonateWei = 0;
        AP_totalBalanceCommissionWei = 0;
    }
        //ACTION FUNCTIONS*
        //CHANGE FUNCTIONS
    function changeGameSettings
    (uint256 _GS_betSizeFinney, uint256 _GS_maxAmountBets, uint256 _GS_minStartAgentAmountBets, uint256 _GS_maxAgentAmountBets, uint256 _GS_maxAmountBetsInOneTransaction,
    uint8 _GS_commissionPct, bool _GS_commissionType, uint256 _GS_betTimeoutSec) public onlyADM()  onlyNoBets()
    {
        require(OAS_oraclizeRandomGwei > 0);
        require(_GS_betSizeFinney <= 10000);
        require(_GS_maxAmountBets <= 1000000 && _GS_maxAmountBets >= 3);
        require(_GS_maxAmountBetsInOneTransaction <= 150);
        require(_GS_minStartAgentAmountBets <= _GS_maxAmountBetsInOneTransaction);
        require(_GS_minStartAgentAmountBets <= _GS_maxAgentAmountBets);
        require(_GS_maxAgentAmountBets < _GS_maxAmountBets);
        require(_GS_commissionPct <= 99);
        
        GS_idGameSettings++;
        GS_betSizeFinney = _GS_betSizeFinney;
        GS_maxAmountBets = _GS_maxAmountBets;
        GS_minStartAgentAmountBets = _GS_minStartAgentAmountBets;
        GS_maxAgentAmountBets = _GS_maxAgentAmountBets;
        GS_maxAmountBetsInOneTransaction = _GS_maxAmountBetsInOneTransaction;
        GS_commissionPct = _GS_commissionPct;
        GS_commissionType = _GS_commissionType;
        GS_betTimeoutSec = _GS_betTimeoutSec;
        
        LOG_ChangeGameSettings
        (msg.sender, GP_roundNum, GS_idGameSettings,
        _GS_betSizeFinney, _GS_maxAmountBets, _GS_minStartAgentAmountBets, _GS_maxAgentAmountBets, _GS_maxAmountBetsInOneTransaction,
        _GS_commissionPct, _GS_commissionType, _GS_betTimeoutSec);
    }
    function changeStatusGame(uint8 _value) public onlyADM() onlyNoBets()
    {
        require(_value <= 1);
        GP_statusGame = _value;
        LOG_ChangeStatusGame(msg.sender, GP_roundNum, _value);
    }
        //CHANGE FUNCTIONS*
        //GET FUNCTIONS
    function getAgentIdByAddress(address _agentAddress) public constant returns(uint256)
    {
        uint256 value;
        uint256 id = GPA_agentAddressId[_agentAddress];
        if (id != 0 && id <= GPA_agentIdAddress.length)
        {
            if (GPA_agentIdAddress[id - 1] == _agentAddress)
            {
                value = GPA_agentAddressId[_agentAddress];
            }
        }
        return value;
    }
    function getAgentAdressById(uint256 _agentId) public constant returns(address)
    {
        address value;
        if (_agentId > 0 && _agentId <= GPA_agentIdAddress.length)
        {
            value = GPA_agentIdAddress[_agentId - 1];
        }
        return value;
    }
    function getBetsSumByAgentId(uint256 _agentId) public constant returns(uint256)
    {
        uint256 value;
        if (_agentId > 0 && _agentId <= GPA_agentIdBetsSum.length)
        {
            value = GPA_agentIdBetsSum[_agentId - 1];
        }
        return value;
    }
    function getAgentIdByPositionBet(uint256 _positionBet) public constant returns(uint256)
    {
        uint256 value;
        if (_positionBet > 0 && _positionBet <= GPA_betNumAgentId.length)
        {
            value = GPA_betNumAgentId[_positionBet - 1];
        }
        return value;
    }
    function getAgentsAmount() public constant returns(uint256)
    {
        return GPA_agentIdAddress.length;
    }
        //GET FUNCTIONS*
    //FUNCTIONS*
    //CONSTRUSTOR
    function GameBase()
    {
        GP_roundNum = 1;
    }
    //CONSTRUCTOR*
}

contract Game is GameBase
{
    //LOGS
    event LOG_Request_CallbackOraclize(address indexed _called, uint256 _GP_roundNum, uint256 _OAS_idOraclizeAccountingSettings, bytes32 _queryId, uint8 _type);
    
    event LOG_ForciblyRequest_CallbackOraclize(address _called, uint256 _GP_roundNum, uint8 _confirmType);
    
    event LOG_CallbackOraclize(uint256 _GP_roundNum, bytes32 _queryId, bytes _proof);
    
    event LOG_Bet(address indexed _agent, uint256 _agentId, uint256 _GP_roundNum, uint256 _GS_idGameSettings,
    uint256 _amountBets, uint256 _spentFinney);
    
    event LOG_Win(address indexed _agent, uint256 _agentId, uint256 _GP_roundNum, uint256 _GS_idGameSettings,
    uint256 _GP_amountBets, uint256 _betsSum, uint256 _spentFinney,
    uint256 _winWei, uint256 _luckyNumber);
    
    event LOG_Commision(uint256 _GP_roundNum, uint256 _GS_idGameSettings, uint256 _AP_nowRoundBankBalanceWei, uint256 _GS_commissionPct, uint256 _commisionWei);
    //LOGS*
    //PARAMETRS
    //PARAMETRS*
    //FUNCTIONS
        //ACTION FUNCTIONS
    function bet() payable public
    {
        require(GP_statusGame == 1);
        
        uint256 amountBets;
        amountBets = (msg.value / ACns_WeiInFinney) / GS_betSizeFinney;
        require(amountBets > 0);
        
        uint256 agentId;
        agentId = getAgentIdByAddress(msg.sender);
        require(amountBets >= GS_minStartAgentAmountBets || agentId != 0);
        
        if ((amountBets + GP_amountBets) > GS_maxAmountBets)
        {
            amountBets = GS_maxAmountBets - GP_amountBets;    
        }
        if ((amountBets + getBetsSumByAgentId(agentId)) > GS_maxAgentAmountBets)
        {
            amountBets = GS_maxAgentAmountBets - getBetsSumByAgentId(agentId);   
        }
        if (amountBets > GS_maxAmountBetsInOneTransaction)
        {
            amountBets = GS_maxAmountBetsInOneTransaction;
        }
    
        require(amountBets > 0);
        
        if (agentId == 0)
        {
            GPA_agentIdAddress.push(msg.sender);
            agentId = GPA_agentIdAddress.length;
            GPA_agentAddressId[msg.sender] = agentId;
            GPA_agentIdBetsSum.push(0);
        }
        
        GPA_agentIdBetsSum[agentId - 1] = getBetsSumByAgentId(agentId) + amountBets;
        
        while (GPA_betNumAgentId.length < GP_amountBets + amountBets)
        {
            GPA_betNumAgentId.push(agentId);
        }
        
        uint256 amountBetsSizeWei = amountBets * GS_betSizeFinney * ACns_WeiInFinney;
       
        LOG_AcceptWei(msg.sender, msg.value, 2);
        LOG_WithdrawWei(msg.sender, msg.sender, msg.value - amountBetsSizeWei, 4);
        msg.sender.transfer(msg.value - amountBetsSizeWei);
        
        LOG_Bet(msg.sender, agentId, GP_roundNum, GS_idGameSettings, amountBets, amountBets * GS_betSizeFinney);
        
        AP_nowRoundBankBalanceWei = AP_nowRoundBankBalanceWei + amountBetsSizeWei;
        
        GP_amountBets = GP_amountBets + amountBets;
        
        GP_lastBetTimeSec = block.timestamp;
        
        if (GP_amountBets > GS_maxAmountBets - GS_minStartAgentAmountBets)
        {
            uint256 oraclizeRandomWei = OAS_oraclizeRandomGwei * ACns_WeiInGwei;
            
            if (AP_nowRoundBankBalanceWei > oraclizeRandomWei)
            {
                GP_statusGame = 2;
                LOG_ChangeStatusGame(msg.sender, GP_roundNum, GP_statusGame);
                
                AP_nowRoundBankBalanceWei = AP_nowRoundBankBalanceWei - oraclizeRandomWei;
            
                request_callback(1);
            }
            else
            {
                GP_statusGame = 3;
                LOG_ChangeStatusGame(msg.sender, GP_roundNum, GP_statusGame);
            }
        }
    }
    function play(uint256 _luckyNumber) private
    {
        uint256 winnerId = getAgentIdByPositionBet(_luckyNumber);
        address winnerAddress = getAgentAdressById(winnerId);
        uint256 commissionSizeWei;
        
        if (GS_commissionType)
        {
            commissionSizeWei = AP_nowRoundBankBalanceWei / 100 * GS_commissionPct;
        }
        else
        {
            commissionSizeWei = (GP_amountBets - getBetsSumByAgentId(winnerId)) * (GS_betSizeFinney * ACns_WeiInFinney) / 100 * GS_commissionPct;
        }
        
        AP_totalBalanceCommissionWei = AP_totalBalanceCommissionWei + commissionSizeWei;
        AP_nowRoundBankBalanceWei = AP_nowRoundBankBalanceWei - commissionSizeWei;
        
        LOG_Commision(GP_roundNum, GS_idGameSettings, AP_nowRoundBankBalanceWei, GS_commissionPct, commissionSizeWei);
        
        winnerAddress.transfer(AP_nowRoundBankBalanceWei);
        
        LOG_WithdrawWei(msg.sender, winnerAddress, AP_nowRoundBankBalanceWei, 5);
        
        LOG_Win(winnerAddress, winnerId, GP_roundNum, GS_idGameSettings,
        GP_amountBets, getBetsSumByAgentId(winnerId), getBetsSumByAgentId(winnerId) * GS_betSizeFinney, AP_nowRoundBankBalanceWei, _luckyNumber);
        
        GP_statusGame = 1;
        GP_amountBets = 0;
        GP_roundNum++;
        AP_nowRoundBankBalanceWei = 0;
        delete GPA_agentIdAddress;
        delete GPA_agentIdBetsSum;
        delete GPA_betNumAgentId;
    }
    function thisIsTheEnd(address _to) public onlyADM() onlyNoBets()
    {
        selfdestruct(_to);
    }
        //ACTION FUNCTIONS*
        //ORACLIZE QUERIES
    function request_callback(uint8 _type) private
    {
        bytes32 queryId = oraclize_newRandomDSQuery(0, 7, OAS_oraclizeRandomGas);
        LOG_Request_CallbackOraclize(msg.sender, GP_roundNum, OAS_idOraclizeAccountingSettings, queryId, _type);
    }
    function forciblyRequest_callback() payable public
    {
        uint8 confirm;
        if (GP_statusGame == 3 && (agents[msg.sender] == 1 || communityRegulator))
        {
            confirm = 1;
        }
        if (GP_statusGame == 2 && (agents[msg.sender] == 1 || communityRegulator))
        {
            confirm = 2;
        }
        if (GP_statusGame == 1 && (block.timestamp > GP_lastBetTimeSec + GS_betTimeoutSec) && (agents[msg.sender] == 1 || communityRegulator))
        {
            confirm = 3;
        }
        
        if (confirm > 0)
        {
            uint256 oraclizeRandomWei = OAS_oraclizeRandomGwei * ACns_WeiInGwei;
            require(msg.value >= oraclizeRandomWei);
            msg.sender.transfer(msg.value - oraclizeRandomWei);
            if (confirm != 2)
            {
                GP_statusGame = 2;
                LOG_ChangeStatusGame(msg.sender, GP_roundNum, GP_statusGame); 
            }
            LOG_ForciblyRequest_CallbackOraclize(msg.sender, GP_roundNum, confirm);
            request_callback(2);
        }
    }
    function __callback(bytes32 _queryId, string _result, bytes _proof) public
    {
        require(msg.sender == oraclize_cbAddress());
        require (oraclize_randomDS_proofVerify__returnCode(_queryId, _result, _proof) == 0);
        require(GP_statusGame == 2);
        LOG_CallbackOraclize(GP_roundNum, _queryId, _proof);
        play(uint(sha3(_result)) % GP_amountBets + 1);
    }
    function startRequest_callback() payable public onlyADM() onlyNoBets() stop()
    {
        bytes32 queryId = oraclize_newRandomDSQuery(0, 7, 100000);
        LOG_Request_CallbackOraclize(msg.sender, 0, 100000, queryId, 0);
    }
        //ORACLIZE QUERIES*
    //CONSTRUSTOR
    function Game()
    {
        oraclize_setProof(proofType_Ledger);
    }
    //CONSTRUSTOR*
}

//Official Blog: medium.com/etherate
//© EtheRate Core Team

Contract ABI

[{"constant":true,"inputs":[{"name":"_agentId","type":"uint256"}],"name":"getBetsSumByAgentId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GS_commissionType","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GP_statusGame","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"bet","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"AP_totalBalanceDonateWei","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OAS_idOraclizeAccountingSettings","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"ACns_WeiInGwei","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OAS_oraclizeRandomGwei","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"withdrawTotalBalanceCommissionWei","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"GS_minStartAgentAmountBets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"AP_nowRoundBankBalanceWei","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_agentId","type":"uint256"}],"name":"getAgentAdressById","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_GS_betSizeFinney","type":"uint256"},{"name":"_GS_maxAmountBets","type":"uint256"},{"name":"_GS_minStartAgentAmountBets","type":"uint256"},{"name":"_GS_maxAgentAmountBets","type":"uint256"},{"name":"_GS_maxAmountBetsInOneTransaction","type":"uint256"},{"name":"_GS_commissionPct","type":"uint8"},{"name":"_GS_commissionType","type":"bool"},{"name":"_GS_betTimeoutSec","type":"uint256"}],"name":"changeGameSettings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"communityRegulator","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GS_maxAgentAmountBets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_positionBet","type":"uint256"}],"name":"getAgentIdByPositionBet","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_agentAddress","type":"address"}],"name":"getAgentIdByAddress","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GP_roundNum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GS_idGameSettings","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint8"}],"name":"changeStatusGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"thisIsTheEnd","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"forciblyRequest_callback","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"AP_totalBalanceCommissionWei","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GS_commissionPct","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"startRequest_callback","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"withdrawTotalBalanceDonateWei","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"GS_maxAmountBets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_OAS_oraclizeRandomGas","type":"uint256"}],"name":"changeOraclizeAccountingSettings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"withdrawAllWei","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getAgentsAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ACns_WeiInFinney","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GP_amountBets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OAS_oraclizeRandomGas","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GS_betSizeFinney","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GS_betTimeoutSec","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"bool"}],"name":"changeRegulator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_agent","type":"address"},{"name":"_value","type":"uint8"}],"name":"changePermissions","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"GP_lastBetTimeSec","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GS_maxAmountBetsInOneTransaction","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"agents","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_called","type":"address"},{"indexed":false,"name":"_GP_roundNum","type":"uint256"},{"indexed":false,"name":"_OAS_idOraclizeAccountingSettings","type":"uint256"},{"indexed":false,"name":"_queryId","type":"bytes32"},{"indexed":false,"name":"_type","type":"uint8"}],"name":"LOG_Request_CallbackOraclize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_called","type":"address"},{"indexed":false,"name":"_GP_roundNum","type":"uint256"},{"indexed":false,"name":"_confirmType","type":"uint8"}],"name":"LOG_ForciblyRequest_CallbackOraclize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_GP_roundNum","type":"uint256"},{"indexed":false,"name":"_queryId","type":"bytes32"},{"indexed":false,"name":"_proof","type":"bytes"}],"name":"LOG_CallbackOraclize","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_agent","type":"address"},{"indexed":false,"name":"_agentId","type":"uint256"},{"indexed":false,"name":"_GP_roundNum","type":"uint256"},{"indexed":false,"name":"_GS_idGameSettings","type":"uint256"},{"indexed":false,"name":"_amountBets","type":"uint256"},{"indexed":false,"name":"_spentFinney","type":"uint256"}],"name":"LOG_Bet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_agent","type":"address"},{"indexed":false,"name":"_agentId","type":"uint256"},{"indexed":false,"name":"_GP_roundNum","type":"uint256"},{"indexed":false,"name":"_GS_idGameSettings","type":"uint256"},{"indexed":false,"name":"_GP_amountBets","type":"uint256"},{"indexed":false,"name":"_betsSum","type":"uint256"},{"indexed":false,"name":"_spentFinney","type":"uint256"},{"indexed":false,"name":"_winWei","type":"uint256"},{"indexed":false,"name":"_luckyNumber","type":"uint256"}],"name":"LOG_Win","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_GP_roundNum","type":"uint256"},{"indexed":false,"name":"_GS_idGameSettings","type":"uint256"},{"indexed":false,"name":"_AP_nowRoundBankBalanceWei","type":"uint256"},{"indexed":false,"name":"_GS_commissionPct","type":"uint256"},{"indexed":false,"name":"_commisionWei","type":"uint256"}],"name":"LOG_Commision","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_called","type":"address"},{"indexed":false,"name":"_GP_roundNum","type":"uint256"},{"indexed":false,"name":"_GS_idGameSettings","type":"uint256"},{"indexed":false,"name":"_GS_betSizeFinney","type":"uint256"},{"indexed":false,"name":"_GS_maxAmountBets","type":"uint256"},{"indexed":false,"name":"_GS_minStartAgentAmountBets","type":"uint256"},{"indexed":false,"name":"_GS_maxAgentAmountBets","type":"uint256"},{"indexed":false,"name":"_GS_maxAmountBetsInOneTransaction","type":"uint256"},{"indexed":false,"name":"_GS_commissionPct","type":"uint8"},{"indexed":false,"name":"_GS_commissionType","type":"bool"},{"indexed":false,"name":"_GS_betTimeoutSec","type":"uint256"}],"name":"LOG_ChangeGameSettings","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_called","type":"address"},{"indexed":false,"name":"_GP_roundNum","type":"uint256"},{"indexed":false,"name":"_status","type":"uint8"}],"name":"LOG_ChangeStatusGame","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_wei","type":"uint256"},{"indexed":true,"name":"_type","type":"uint8"}],"name":"LOG_AcceptWei","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_called","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_wei","type":"uint256"},{"indexed":true,"name":"_type","type":"uint8"}],"name":"LOG_WithdrawWei","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_called","type":"address"},{"indexed":false,"name":"_OAS_idOraclizeAccountingSettings","type":"uint256"},{"indexed":false,"name":"_OAS_oraclizeRandomGas","type":"uint256"},{"indexed":false,"name":"_OAS_oraclizeRandomGwei","type":"uint256"}],"name":"LOG_ChangeOraclizeAccountingSettings","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_called","type":"address"},{"indexed":true,"name":"_agent","type":"address"},{"indexed":false,"name":"_value","type":"uint8"}],"name":"LOG_ChangePermissions","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_called","type":"address"},{"indexed":false,"name":"_value","type":"bool"}],"name":"LOG_ChangeRegulator","type":"event"}]

Contract Creation Code

60806040523480156200001157600080fd5b50336000908152602081905260409020805460ff19166001908117909155601555620000667f30000000000000000000000000000000000000000000000000000000000000006401000000006200006c810204565b62000756565b600854600160a060020a03161580620000a25750600854620000a090600160a060020a0316640100000000620002cf810204565b155b15620000bf57620000bd6000640100000000620002d3810204565b505b600860009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200012c57600080fd5b505af115801562000141573d6000803e3d6000fd5b505050506040513d60208110156200015857600080fd5b5051600954600160a060020a039081169116146200022b57600860009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620001dd57600080fd5b505af1158015620001f2573d6000803e3d6000fd5b505050506040513d60208110156200020957600080fd5b505160098054600160a060020a031916600160a060020a039092169190911790555b600954604080517f688dcfd70000000000000000000000000000000000000000000000000000000081527fff00000000000000000000000000000000000000000000000000000000000000841660048201529051600160a060020a039092169163688dcfd79160248082019260009290919082900301818387803b158015620002b357600080fd5b505af1158015620002c8573d6000803e3d6000fd5b5050505050565b3b90565b6000620002e8640100000000620002ee810204565b92915050565b60008062000319731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed640100000000620002cf810204565b1115620003975760088054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17905560408051808201909152600b81527f6574685f6d61696e6e657400000000000000000000000000000000000000000060208201526200038e906401000000006200069b810204565b50600162000698565b6000620003c173c03a2615d5efaf5f49f60b7bb6583eaec212fdf1640100000000620002cf810204565b1115620004365760088054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf117905560408051808201909152600c81527f6574685f726f707374656e33000000000000000000000000000000000000000060208201526200038e906401000000006200069b810204565b60006200046073b7a07bcf2ba2f2703b24c0691b5278999c59ac7e640100000000620002cf810204565b1115620004d55760088054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e17905560408051808201909152600981527f6574685f6b6f76616e000000000000000000000000000000000000000000000060208201526200038e906401000000006200069b810204565b6000620004ff73146500cfd35b22e4a392fe0adc06de1a1368ed48640100000000620002cf810204565b1115620005745760088054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed4817905560408051808201909152600b81527f6574685f72696e6b65627900000000000000000000000000000000000000000060208201526200038e906401000000006200069b810204565b60006200059e736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475640100000000620002cf810204565b1115620005d4575060088054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475179055600162000698565b6000620005fe7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf640100000000620002cf810204565b111562000634575060088054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf179055600162000698565b60006200065e7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa640100000000620002cf810204565b111562000694575060088054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa179055600162000698565b5060005b90565b8051620006b090600a906020840190620006b4565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620006f757805160ff191683800117855562000727565b8280016001018555821562000727579182015b82811115620007275782518255916020019190600101906200070a565b506200073592915062000739565b5090565b6200069891905b8082111562000735576000815560010162000740565b613eb480620007666000396000f3006080604052600436106101ea5763ffffffff60e060020a6000350416630834d1e781146102365780630a37a357146102605780630d13ab651461028957806311610c25146102b457806327dc297e146102be5780632dd291a514610319578063378400ac1461032e57806338bbfa50146103435780633a9d8aad146103de5780633b08502b146103f35780633b9bbb2f146104085780633bd0d9b6146104295780634410c8bb1461043e57806346256be71461045357806346a79a4e146104875780634babf979146104b95780634cf3a08a146104ce57806354557250146104e3578063568d3900146104fb5780635b1b60de1461051c5780635cf990421461053157806365c098301461054657806367ab263a146105615780636bdaa52014610582578063704f8b091461058a5780637bc292bf1461059f57806381b72d88146105b457806382f5a3e1146105bc578063938a63ec146105dd57806396a16793146105f2578063b554f8eb1461060a578063b8af6bc71461062b578063ba0e053f14610640578063bee30b0b14610655578063c793ae911461066a578063d32d665b1461067f578063df2186d814610694578063e69ffce8146106a9578063e9298b97146106c3578063ee5f14a7146106ea578063ef668edd146106ff578063fd66091e14610714575b3460035401600381905550600133600160a060020a03167fac630406096ae702a37a73d0c4c63c8214fdf92b0a3d6db3b193c6aca0ce87973460405190815260200160405180910390a3005b34801561024257600080fd5b5061024e600435610735565b60405190815260200160405180910390f35b34801561026c57600080fd5b50610275610775565b604051901515815260200160405180910390f35b34801561029557600080fd5b5061029e610783565b60405160ff909116815260200160405180910390f35b6102bc61078c565b005b3480156102ca57600080fd5b506102bc6004803590369060446024803590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949750610b029650505050505050565b34801561032557600080fd5b5061024e610b40565b34801561033a57600080fd5b5061024e610b46565b34801561034f57600080fd5b506102bc6004803590369060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509497969560208082019650903587018082019550359350839250601f830181900481020190506040519081016040528181529291906020840183838082843750949750610b4c9650505050505050565b3480156103ea57600080fd5b5061024e610cb6565b3480156103ff57600080fd5b5061024e610cbe565b34801561041457600080fd5b506102bc600160a060020a0360043516610cc4565b34801561043557600080fd5b5061024e610d60565b34801561044a57600080fd5b5061024e610d66565b34801561045f57600080fd5b5061046b600435610d6c565b604051600160a060020a03909116815260200160405180910390f35b34801561049357600080fd5b506102bc60043560243560443560643560843560ff60a4351660c435151560e435610db3565b3480156104c557600080fd5b50610275610f3a565b3480156104da57600080fd5b5061024e610f43565b3480156104ef57600080fd5b5061024e600435610f49565b34801561050757600080fd5b5061024e600160a060020a0360043516610f75565b34801561052857600080fd5b5061024e611001565b34801561053d57600080fd5b5061024e611007565b34801561055257600080fd5b506102bc60ff6004351661100d565b34801561056d57600080fd5b506102bc600160a060020a036004351661108c565b6102bc6110c4565b34801561059657600080fd5b5061024e611295565b3480156105ab57600080fd5b5061029e61129b565b6102bc6112a4565b3480156105c857600080fd5b506102bc600160a060020a036004351661134c565b3480156105e957600080fd5b5061024e6113e8565b3480156105fe57600080fd5b506102bc6004356113ee565b34801561061657600080fd5b506102bc600160a060020a0360043516611472565b34801561063757600080fd5b5061024e611514565b34801561064c57600080fd5b5061024e61151b565b34801561066157600080fd5b5061024e611526565b34801561067657600080fd5b5061024e61152c565b34801561068b57600080fd5b5061024e611532565b3480156106a057600080fd5b5061024e611538565b3480156106b557600080fd5b506102bc600435151561153e565b3480156106cf57600080fd5b506102bc600160a060020a036004351660ff602435166115a4565b3480156106f657600080fd5b5061024e61165c565b34801561070b57600080fd5b5061024e611662565b34801561072057600080fd5b5061029e600160a060020a0360043516611668565b60008060008311801561074a5750601b548311155b1561076f57601b8054600019850190811061076157fe5b906000526020600020015490505b92915050565b601354610100900460ff1681565b60185460ff1681565b60185460009081908190819060ff166001146107a757600080fd5b600e5466038d7ea4c6800034048115156107bd57fe5b049350600084116107cd57600080fd5b6107d633610f75565b9250601054841015806107e857508215155b15156107f357600080fd5b600f546016548501111561080b57601654600f540393505b60115461081784610735565b8501111561082f5761082883610735565b6011540393505b60125484111561083f5760125493505b6000841161084c57600080fd5b8215156108c157601a8054600181018083556000928352339290919060209020018054600160a060020a031916600160a060020a03939093169290921790915550601a54336000908152601960205290935083906040902055601b805460018101808355600092835290602083200191909155505b836108cb84610735565b01601b600185038154811015156108de57fe5b90600052602060002001555b601654601c54908501111561091d57601c80546001810180835560009283528592909190602090200191909155506108ea565b600e54840266038d7ea4c680000291506002337fac630406096ae702a37a73d0c4c63c8214fdf92b0a3d6db3b193c6aca0ce87973460405190815260200160405180910390a360043380600080516020613e498339815191523486900360405190815260200160405180910390a4333483900380156108fc0290604051600060405180830381858888f193505050501580156109bd573d6000803e3d6000fd5b5033600160a060020a03167fca135988c526c31dc3e45e62c1766c97fdfc76685f2b7816d85120bb2031265c84601554600d5488600e548a02604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a260048054830190556016805485019081905542601755601054600f54031015610afc57633b9aca00600754029050806004541115610ab9576018805460ff1916600217908190556015543391600080516020613e69833981519152919060ff1660405191825260ff1660208201526040908101905180910390a2600480548290039055610ab4600161167f565b610afc565b6018805460ff1916600317908190556015543391600080516020613e69833981519152919060ff1660405191825260ff1660208201526040908101905180910390a25b50505050565b610b3c82826000604051818152601f19601f8301168101602001604052908015610b36578160200160208202803883390190505b50610b4c565b5050565b60035481565b60055481565b610b546116f6565b600160a060020a03163314610b6857600080fd5b610b738383836118ca565b60ff1615610b8057600080fd5b60185460ff16600214610b9257600080fd5b7fb4a118648e2bc6a6f999c2ec2de151a165eaf041787e2e945f27bdcaceb8483960155484836040518381526020810183905260606040820181815290820183818151815260200191508051906020019080838360005b83811015610c01578082015183820152602001610be9565b50505050905090810190601f168015610c2e5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1610cb1601654836040518082805190602001908083835b60208310610c735780518252601f199092019160209182019101610c54565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020811515610ca857fe5b066001016119f4565b505050565b633b9aca0081565b60075481565b3360009081526020819052604090205460ff16600114610ce357600080fd5b80600160a060020a03166108fc6002549081150290604051600060405180830381858888f19350505050158015610d1e573d6000803e3d6000fd5b50600281600160a060020a031633600160a060020a0316600080516020613e4983398151915260025460405190815260200160405180910390a4506000600255565b60105481565b60045481565b600080600083118015610d815750601a548311155b1561076f57601a80546000198501908110610d9857fe5b9060005260206000200154600160a060020a03169392505050565b3360009081526020819052604090205460ff16600114610dd257600080fd5b60165415610ddf57600080fd5b600754600010610dee57600080fd5b612710881115610dfd57600080fd5b620f42408711158015610e11575060038710155b1515610e1c57600080fd5b6096841115610e2a57600080fd5b83861115610e3757600080fd5b84861115610e4457600080fd5b868510610e5057600080fd5b606360ff84161115610e6157600080fd5b600d805460010190819055600e899055600f8890556010879055601186905560128590556013805460ff191660ff86161761ff00191661010085151502179055601482905560155433917fe1baf9c34320d3e49c464a7a024630a21f31721a691691655f3a059ea6e8d77d91908b8b8b8b8b8b8b8b604051998a5260208a01989098526040808a01979097526060890195909552608088019390935260a087019190915260c086015260ff1660e08501521515610100840152610120830191909152610140909101905180910390a25050505050505050565b60015460ff1681565b60115481565b600080600083118015610f5e5750601c548311155b1561076f57601c8054600019850190811061076157fe5b600160a060020a038116600090815260196020528080604081205490508015801590610fa35750601a548111155b15610ffa5783600160a060020a0316601a60018303815481101515610fc457fe5b9060005260206000200154600160a060020a03161415610ffa57600160a060020a03841660009081526019602052604090205491505b5092915050565b60155481565b600d5481565b3360009081526020819052604090205460ff1660011461102c57600080fd5b6016541561103957600080fd5b600160ff8216111561104a57600080fd5b6018805460ff191660ff83161790556015543390600080516020613e69833981519152908360405191825260ff1660208201526040908101905180910390a250565b3360009081526020819052604090205460ff166001146110ab57600080fd5b601654156110b857600080fd5b80600160a060020a0316ff5b601854600090819060ff1660031480156110fc57503360009081526020819052604090205460ff16600114806110fc575060015460ff165b1561110657600191505b60185460ff16600214801561113957503360009081526020819052604090205460ff1660011480611139575060015460ff165b1561114357600291505b60185460ff16600114801561115d57506014546017540142115b801561118757503360009081526020819052604090205460ff1660011480611187575060015460ff165b1561119157600391505b60008260ff161115610b3c5750600754633b9aca0002348111156111b457600080fd5b333482900380156108fc0290604051600060405180830381858888f193505050501580156111e6573d6000803e3d6000fd5b50600260ff831614611235576018805460ff1916600217908190556015543391600080516020613e69833981519152919060ff1660405191825260ff1660208201526040908101905180910390a25b7f74ca45f9c93206493c6b8b5dba889f01da8975eedd18f299a741634ea75a6ae73360155484604051600160a060020a039093168352602083019190915260ff166040808301919091526060909101905180910390a1610b3c600261167f565b60025481565b60135460ff1681565b3360009081526020819052604081205460ff166001146112c357600080fd5b601654156112d057600080fd5b60185460ff16156112e057600080fd5b6112f060006007620186a0611c35565b9050337fb3aa7e0d7e5cbac14dbade4329efcc1f37127b6a728d6936d24d4b353645b3306000620186a08482604051938452602084019290925260408084019190915260ff90911660608301526080909101905180910390a250565b3360009081526020819052604090205460ff1660011461136b57600080fd5b80600160a060020a03166108fc6003549081150290604051600060405180830381858888f193505050501580156113a6573d6000803e3d6000fd5b50600181600160a060020a031633600160a060020a0316600080516020613e4983398151915260035460405190815260200160405180910390a4506000600355565b600f5481565b3360009081526020819052604090205460ff1660011461140d57600080fd5b6005805460010190819055600682905560148202600781905533917f65a56f0c049d5ad226ed0e1fb7d5aea3469d89fd53c5699ba8772c81422d210591849060405180848152602001838152602001828152602001935050505060405180910390a250565b3360009081526020819052604090205460ff1660011461149157600080fd5b6016541561149e57600080fd5b6003600160a060020a03821633600080516020613e49833981519152303160405190815260200160405180910390a4600160a060020a038116303180156108fc0290604051600060405180830381858888f19350505050158015611506573d6000803e3d6000fd5b505060006003819055600255565b601a545b90565b66038d7ea4c6800081565b60165481565b60065481565b600e5481565b60145481565b3360009081526020819052604090205460ff1660011461155d57600080fd5b6001805460ff1916821515179055337f5366d9ea3efee18b8dddadcc500e230ea0dd4a4f9b02a75fe84fa5fcfb55f6f482604051901515815260200160405180910390a250565b3360009081526020819052604090205460ff166001146115c357600080fd5b33600160a060020a03831614156115d957600080fd5b600160ff821611156115ea57600080fd5b600160a060020a03821660009081526020819052819060409020805460ff191660ff92909216919091179055600160a060020a038216337f6e93a70fa9e8babb6c2b5e86ce1a9b6c4483c36228b1bc67103f1ebc4f0dfe4b8360405160ff909116815260200160405180910390a35050565b60175481565b60125481565b60006020528060005260406000205460ff16905081565b600061169060006007600654611c35565b905033600160a060020a03167fb3aa7e0d7e5cbac14dbade4329efcc1f37127b6a728d6936d24d4b353645b3306015546005548486604051938452602084019290925260408084019190915260ff90911660608301526080909101905180910390a25050565b600854600090600160a060020a03161580611723575060085461172190600160a060020a0316612113565b155b15611734576117326000612117565b505b600854600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561177457600080fd5b505af1158015611788573d6000803e3d6000fd5b505050506040513d602081101561179e57600080fd5b810190808051600954600160a060020a03908116911614925061185291505057600854600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156117fe57600080fd5b505af1158015611812573d6000803e3d6000fd5b505050506040513d602081101561182857600080fd5b81019080805160098054600160a060020a031916600160a060020a03929092169190911790555050505b600954600160a060020a031663c281d19e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561189257600080fd5b505af11580156118a6573d6000803e3d6000fd5b505050506040513d60208110156118bc57600080fd5b810190808051935050505090565b600080826000815181106118da57fe5b016020015160f860020a900460f860020a02600160f860020a0319167f4c0000000000000000000000000000000000000000000000000000000000000014158061196c57508260018151811061192c57fe5b016020015160f860020a900460f860020a02600160f860020a0319167f500000000000000000000000000000000000000000000000000000000000000014155b806119b457508260028151811061197f57fe5b01602001517fff0000000000000000000000000000000000000000000000000000000000000060f860020a9182900482021614155b156119c257600191506119ec565b6119d58386866119d0612121565b6121c3565b90508015156119e757600291506119ec565b600091505b509392505050565b6000806000611a0284610f49565b9250611a0d83610d6c565b601354909250610100900460ff1615611a3657506013546004546064900460ff90911602611a6a565b601354600e5460ff9091169060649066038d7ea4c6800002611a5786610735565b6016540302811515611a6557fe5b040290505b60028054820190556004805482900390819055601554600d546013547ff0e77e8ae047a574f58e282b46286060c4cd061b3a3f3e0497257c283a629990939060ff1685604051808681526020018581526020018481526020018360ff1681526020018281526020019550505050505060405180910390a181600160a060020a03166108fc6004549081150290604051600060405180830381858888f19350505050158015611b1c573d6000803e3d6000fd5b50600582600160a060020a031633600160a060020a0316600080516020613e4983398151915260045460405190815260200160405180910390a481600160a060020a03167f2e55f11dc1b5e3cacea1410ba41c91e8298a6f7d5a267e0ab85a58e7419c44c984601554600d54601654611b9489610735565b600e54611ba08b610735565b026004548c604051808981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019850505050505050505060405180910390a26018805460ff1916600190811790915560006016819055601580549092019091556004819055611c1d90601a90613d55565b611c29601b6000613d55565b610afc601c6000613d55565b600060608060606000606080611c49613d71565b6000606060008c118015611c5e575060208c11155b1515611c6957600080fd5b600a8d029c506001604051818152601f19601f8301168101602001604052908015611c9e578160200160208202803883390190505b5098508b60f860020a0289600081518110611cb557fe5b906020010190600160f860020a031916908160001a9053506020604051818152601f19601f8301168101602001604052908015611cfc578160200160208202803883390190505b5097506020604051818152601f19601f8301168101602001604052908015611d2e578160200160208202803883390190505b509650611d396127b8565b9550602088524241186001430340186020890152602087528560208801526020604051818152601f19601f8301168101602001604052908015611d86578160200160208202803883390190505b5094508c60208601526008604051818152601f19601f8301168101602001604052908015611dbe578160200160208202803883390190505b509350611dd18560186008876000612954565b506080604051908101604052808981526020018a8152602001888152602001868152509250611e3460408051908101604052600681527f72616e646f6d00000000000000000000000000000000000000000000000000006020820152848d6129a3565b91506008604051818152601f19601f8301168101602001604052908015611e65578160200160208202803883390190505b509050602084015160f860020a810460278301537e01000000000000000000000000000000000000000000000000000000000000810460268301537d0100000000000000000000000000000000000000000000000000000000008104602583015360e060020a810460248301537b01000000000000000000000000000000000000000000000000000000810460238301537a01000000000000000000000000000000000000000000000000000081046022830153790100000000000000000000000000000000000000000000000000810460218301537801000000000000000000000000000000000000000000000000810460208301535061210382826020860151600287516040518082805190602001908083835b60208310611f9a5780518252601f199092019160209182019101611f7b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015611fde573d6000803e3d6000fd5b5050506040513d6020811015611ff357600080fd5b8101908080519250505060408801516040518085805190602001908083835b602083106120315780518252601f199092019160209182019101612012565b6001836020036101000a038019825116818451161790925250505091909101905084805190602001908083835b6020831061207d5780518252601f19909201916020918201910161205e565b6001836020036101000a038019825116818451161790925250505091909101848152602001905082805190602001908083835b602083106120cf5780518252601f1990920191602091820191016120b0565b6001836020036101000a03801982511681845116179092525050509190910195506040945050505050518091039020612bc0565b509b9a5050505050505050505050565b3b90565b600061076f612bd5565b6060600a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156121b95780601f1061218e576101008083540402835291602001916121b9565b820191906000526020600020905b81548152906001019060200180831161219c57829003601f168201915b5050505050905090565b60008060608060608060008060608c6045815181106121de57fe5b016020015160f860020a9081900481020460660197506020604051818152601f19601f8301168101602001604052908015612223578160200160208202803883390190505b5096506122358d8960208a6000612954565b5060028a8d6040518083805190602001908083835b602083106122695780518252601f19909201916020918201910161224a565b6001836020036101000a038019825116818451161790925250505091909101928352505060209081019150604051808303816000865af11580156122b1573d6000803e3d6000fd5b5050506040513d60208110156122c657600080fd5b81019080805192506040915050519081526020016040518091039020876040518082805190602001908083835b602083106123125780518252601f1990920191602091820191016122f3565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390201461234c57600098506127a8565b8c604a89018151811061235b57fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f83011681016020016040529080156123a4578160200160208202803883390190505b5095506123b98d896049018851896000612954565b5061248a6002876040518082805190602001908083835b602083106123ef5780518252601f1990920191602091820191016123d0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015612433573d6000803e3d6000fd5b5050506040513d602081101561244857600080fd5b81019080805190602001909291905050508c8f8b6020016008018151811061246c57fe5b016020015160f860020a900460f860020a0260f860020a9004612ef9565b151561249957600098506127a8565b6029604051818152601f19601f83011681016020016040529080156124c8578160200160208202803883390190505b5094506124dd8d896020016029886000612954565b5060408051818152601f19601f830116810160200160405290801561250c578160200160208202803883390190505b5093508551886020016029010160410192506125308d604085036040876000612954565b506002846040518082805190602001908083835b602083106125635780518252601f199092019160209182019101612544565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156125a7573d6000803e3d6000fd5b5050506040513d60208110156125bc57600080fd5b810190808051945087925084915060409050518083805190602001908083835b602083106125fb5780518252601f1990920191602091820191016125dc565b6001836020036101000a03801982511681845116179092525050509190910192835250506020019050604051809103902060008d8152600b602052604090205414156126585760008c8152600b6020526040902060009055612661565b600098506127a8565b6049604051818152601f19601f8301168101602001604052908015612690578160200160208202803883390190505b5090506126a28d896049846000612954565b506127446002826040518082805190602001908083835b602083106126d85780518252601f1990920191602091820191016126b9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af115801561271c573d6000803e3d6000fd5b5050506040513d602081101561273157600080fd5b8101908080519250899150879050612f7f565b151561275357600098506127a8565b6000828152600c602052604090205460ff161515612793576127758d846131a4565b6000838152600c60205260409020805460ff19169115159190911790555b6000828152600c602052604090205460ff1698505b5050505050505050949350505050565b600854600090600160a060020a031615806127e557506008546127e390600160a060020a0316612113565b155b156127f6576127f46000612117565b505b600854600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561283657600080fd5b505af115801561284a573d6000803e3d6000fd5b505050506040513d602081101561286057600080fd5b810190808051600954600160a060020a03908116911614925061291491505057600854600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156128c057600080fd5b505af11580156128d4573d6000803e3d6000fd5b505050506040513d60208110156128ea57600080fd5b81019080805160098054600160a060020a031916600160a060020a03929092169190911790555050505b600954600160a060020a031663abaa5f3e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561189257600080fd5b6060838201600080828651101561296a57600080fd5b505060208087019084015b86886020010182101561299657818901518682015260209182019101612975565b5093979650505050505050565b600854600090606090600160a060020a031615806129d357506008546129d190600160a060020a0316612113565b155b156129e4576129e26000612117565b505b600854600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015612a2457600080fd5b505af1158015612a38573d6000803e3d6000fd5b505050506040513d6020811015612a4e57600080fd5b810190808051600954600160a060020a039081169116149250612b0291505057600854600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015612aae57600080fd5b505af1158015612ac2573d6000803e3d6000fd5b505050506040513d6020811015612ad857600080fd5b81019080805160098054600160a060020a031916600160a060020a03929092169190911790555050505b6004604051908082528060200260200182016040528015612b3757816020015b6060815260200190600190039081612b225790505b509050835181600081518110612b4957fe5b60209081029091010152836001602002015181600181518110612b6857fe5b6020908102919091010152604084015181600281518110612b8557fe5b6020908102919091010152606084015181600381518110612ba257fe5b60209081029091010152612bb78582856135d1565b95945050505050565b6000828152600b602052819060409020555050565b600080612bf5731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed612113565b1115612c655760088054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed179055612c5d60408051908101604052600b81527f6574685f6d61696e6e657400000000000000000000000000000000000000000060208201526139ab565b506001611518565b6000612c8473c03a2615d5efaf5f49f60b7bb6583eaec212fdf1612113565b1115612cec5760088054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf1179055612c5d60408051908101604052600c81527f6574685f726f707374656e33000000000000000000000000000000000000000060208201526139ab565b6000612d0b73b7a07bcf2ba2f2703b24c0691b5278999c59ac7e612113565b1115612d735760088054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e179055612c5d60408051908101604052600981527f6574685f6b6f76616e000000000000000000000000000000000000000000000060208201526139ab565b6000612d9273146500cfd35b22e4a392fe0adc06de1a1368ed48612113565b1115612dfa5760088054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed48179055612c5d60408051908101604052600b81527f6574685f72696e6b65627900000000000000000000000000000000000000000060208201526139ab565b6000612e19736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475612113565b1115612e4d575060088054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4751790556001611518565b6000612e6c7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf612113565b1115612ea0575060088054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf1790556001611518565b6000612ebf7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa612113565b1115612ef3575060088054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa1790556001611518565b50600090565b600060018183855114612f0b57600080fd5b5060005b83811015612f7257848181518110612f2357fe5b016020015160f860020a900460f860020a02600160f860020a0319168682602081101515612f4d57fe5b1a60f860020a02600160f860020a031916141515612f6a57600091505b600101612f0f565b8192505b50509392505050565b60008060008060006060600060606020604051818152601f19601f8301168101602001604052908015612fbc578160200160208202803883390190505b50925060208a600381518110612fce57fe5b016020015160f860020a900460f860020a0260f860020a9004036004019150612ffc8a836020866000612954565b92506020604051818152601f19601f830116810160200160405290801561302d578160200160208202803883390190505b5090506022820191506130718a60208c600186038151811061304b57fe5b016020015160f860020a900460f860020a0260f860020a90040384016020846000612954565b9050602083015194506020810151935061308e8b601b87876139be565b9097509550600160a060020a038616896040518082805190602001908083835b602083106130cd5780518252601f1990920191602091820191016130ae565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020600160a060020a031614156131115760019750613196565b61311e8b601c87876139be565b9097509550600160a060020a038616896040518082805190602001908083835b6020831061315d5780518252601f19909201916020918201910161313e565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020600160a060020a03161497505b505050505050509392505050565b60008060608060608060608060608a8a600101815181106131c157fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f830116810160200160405290801561320a578160200160208202803883390190505b50965061321c8b8b89518a6000612954565b5060408051818152601f19601f830116810160200160405290801561324b578160200160208202803883390190505b50955061325e8b60046040896000612954565b506062604051818152601f19601f830116810160200160405290801561328e578160200160208202803883390190505b50945060f860020a856000815181106132a357fe5b906020010190600160f860020a031916908160001a9053506132cd8b60418c036041886001612954565b506040805190810160405280602081526020017ffd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c81525093506133168460006020886042612954565b506133b86002866040518082805190602001908083835b6020831061334c5780518252601f19909201916020918201910161332d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015613390573d6000803e3d6000fd5b5050506040513d60208110156133a557600080fd5b81019080805192508a9150899050612f7f565b97508715156133ca57600098506135c3565b606060405190810160405280604081526020017f7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e881526020017f537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e481525092506042604051818152601f19601f8301168101602001604052908015613458578160200160208202803883390190505b5091507ffe000000000000000000000000000000000000000000000000000000000000008260008151811061348957fe5b906020010190600160f860020a031916908160001a9053506134b18b60036041856001612954565b508a6045815181106134bf57fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f8301168101602001604052908015613508578160200160208202803883390190505b50905061351b8b60448351846000612954565b506135bd6002836040518082805190602001908083835b602083106135515780518252601f199092019160209182019101613532565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015613595573d6000803e3d6000fd5b5050506040513d60208110156135aa57600080fd5b8101908080519250849150869050612f7f565b97508798505b505050505050505092915050565b6008546000908190606090600160a060020a03161580613603575060085461360190600160a060020a0316612113565b155b15613614576136126000612117565b505b600854600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561365457600080fd5b505af1158015613668573d6000803e3d6000fd5b505050506040513d602081101561367e57600080fd5b810190808051600954600160a060020a03908116911614925061373291505057600854600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156136de57600080fd5b505af11580156136f2573d6000803e3d6000fd5b505050506040513d602081101561370857600080fd5b81019080805160098054600160a060020a031916600160a060020a03929092169190911790555050505b600954600160a060020a0316632ef3accc87866040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561379a578082015183820152602001613782565b50505050905090810190601f1680156137c75780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156137e757600080fd5b505af11580156137fb573d6000803e3d6000fd5b505050506040513d602081101561381157600080fd5b8101908080519450505050670de0b6b3a76400003a8502018211156138395760009250612f76565b613842856139fe565b600954909150600160a060020a031663c55c1cb68360008985896040518663ffffffff1660e060020a028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156138bb5780820151838201526020016138a3565b50505050905090810190601f1680156138e85780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101561391e578082015183820152602001613906565b50505050905090810190601f16801561394b5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801561396d57600080fd5b505af1158015613981573d6000803e3d6000fd5b50505050506040513d602081101561399857600080fd5b8101908080519998505050505050505050565b600a818051610b3c929160200190613d98565b60008060008060405188815287602082015286604082015285606082015260208160808360006001610bb8f1925080519299929850919650505050505050565b6060613a08613e16565b6000613a12613a75565b613a1e82610400613a81565b613a2782613aaf565b5060005b8351811015613a6257613a5a848281518110613a4357fe5b90602001906020020151839063ffffffff613abd16565b600101613a2b565b613a6b82613ada565b8151949350505050565b60405180590338823950565b806020810615613a945760208106602003015b60208301819052604051928390526000835290910160405250565b613aba816004613ae1565b50565b613aca8260028351613afa565b610cb1828263ffffffff613bf816565b613aba8160075b610b3c82601f602060ff8516021763ffffffff613c9516565b60178111613b1b57613b168360ff848116602002168317613c95565b610cb1565b60ff8111613b5457613b3c836018602060ff8616021763ffffffff613c9516565b613b4e8382600163ffffffff613cce16565b50610cb1565b61ffff8111613b8857613b76836019602060ff8616021763ffffffff613c9516565b613b4e8382600263ffffffff613cce16565b63ffffffff8111613bbe57613bac83601a602060ff8616021763ffffffff613c9516565b613b4e8382600463ffffffff613cce16565b67ffffffffffffffff8111610cb157613be683601b602060ff8616021763ffffffff613c9516565b610afc8382600863ffffffff613cce16565b613c00613e16565b60008060008086602001518751518751011115613c3257613c3287613c2a89602001518951613d24565b600202613d3b565b8551915086518051602081830101955087510190526020860192505b60208210613c715782518452602084019350602083019250602082039150613c4e565b6001826020036101000a039050801983511681855116179093525093949350505050565b81602001518251516001011115613cb757613cb7828360200151600202613d3b565b815180516020818301018381535060010190525050565b613cd6613e16565b6000846020015185515184011115613cfa57613cfa85613c2a876020015186613d24565b6001836101000a039050845180518481830101868419825116179052909301909252509192915050565b600081831115613d3557508161076f565b50919050565b606082519050613d4b8383613a81565b610afc8382613bf8565b50805460008255906000526020600020613aba91810190613e2e565b60806040519081016040526004815b6060815260200190600190039081613d805790505090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613dd957805160ff1916838001178555613e06565b82800160010185558215613e06579182015b82811115613e06578251825591602001919060010190613deb565b50613e12929150613e2e565b5090565b60408051908101604052606081526000602082015290565b61151891905b80821115613e125760008155600101613e34560082034b117197aa60ae349ce48bcef31764cf6f00bdc19155c2c02352298eb8b65fced9d1c082391beb18dc431f5283fc894e78046dd384918c930c68c6e9df2ca165627a7a72305820c29ad722f2a274a457aba6e99cd8779c661109de24a6a0bb9247658b80ffc8a10029

Swarm Source

bzzr://c29ad722f2a274a457aba6e99cd8779c661109de24a6a0bb9247658b80ffc8a1
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.