ETH Price: $2,060.45 (+2.88%)

Contract

0x8d4d8f0dbaF52BD46e566eb2ee38d834C3CE6ccf
 

Overview

ETH Balance

0.000054246102063812 ETH

Eth Value

$0.11 (@ $2,060.45/ETH)

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Pay Royalty71840502019-02-06 16:54:342608 days ago1549472074IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000148024
Pay Royalty71840362019-02-06 16:48:462608 days ago1549471726IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000185035
Pay Royalty71839772019-02-06 16:33:002608 days ago1549470780IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000148024
Pay Royalty71839752019-02-06 16:32:232608 days ago1549470743IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000148024
Pay Royalty71838702019-02-06 16:03:342608 days ago1549469014IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000185035
Pay Royalty71838622019-02-06 16:01:012608 days ago1549468861IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000185035
Pay Royalty71838582019-02-06 15:58:312608 days ago1549468711IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000185035
Pay Royalty71838452019-02-06 15:51:342608 days ago1549468294IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000222046
Pay Royalty71838332019-02-06 15:48:352608 days ago1549468115IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000185035
__callback71683852019-02-03 12:12:592611 days ago1549195979IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.0014342220
Roll Dice71683832019-02-03 12:12:392611 days ago1549195959IN
0x8d4d8f0d...4C3CE6ccf
0.01 ETH0.000873114
__callback71683782019-02-03 12:11:492611 days ago1549195909IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.001703620
Roll Dice71683762019-02-03 12:11:322611 days ago1549195892IN
0x8d4d8f0d...4C3CE6ccf
0.02 ETH0.000790714
__callback71683742019-02-03 12:10:402611 days ago1549195840IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.001437420
Roll Dice71683702019-02-03 12:09:592611 days ago1549195799IN
0x8d4d8f0d...4C3CE6ccf
0.01 ETH0.000873114
Pay Royalty71393002019-01-28 13:39:122617 days ago1548682752IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000185035
Pay Royalty71392922019-01-28 13:37:402617 days ago1548682660IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000185035
Pay Royalty71392642019-01-28 13:28:412617 days ago1548682121IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000185035
Pay Royalty71392592019-01-28 13:27:352617 days ago1548682055IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.0003700710
Pay Royalty71392512019-01-28 13:26:032617 days ago1548681963IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000148024
Pay Royalty71391802019-01-28 13:03:482617 days ago1548680628IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000259047
Pay Royalty71391802019-01-28 13:03:482617 days ago1548680628IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000259047
Pay Royalty71391802019-01-28 13:03:482617 days ago1548680628IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000148764.02
Pay Royalty71391772019-01-28 13:02:222617 days ago1548680542IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000111023
Pay Royalty71388872019-01-28 11:37:312617 days ago1548675451IN
0x8d4d8f0d...4C3CE6ccf
0 ETH0.000255346.9
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
-71840502019-02-06 16:54:342608 days ago1549472074
0x8d4d8f0d...4C3CE6ccf
0.00002712 ETH
-71840502019-02-06 16:54:342608 days ago1549472074
0x8d4d8f0d...4C3CE6ccf
0.00002712 ETH
-71840362019-02-06 16:48:462608 days ago1549471726
0x8d4d8f0d...4C3CE6ccf
0.00005424 ETH
-71840362019-02-06 16:48:462608 days ago1549471726
0x8d4d8f0d...4C3CE6ccf
0.00005424 ETH
-71839772019-02-06 16:33:002608 days ago1549470780
0x8d4d8f0d...4C3CE6ccf
0.00010849 ETH
-71839772019-02-06 16:33:002608 days ago1549470780
0x8d4d8f0d...4C3CE6ccf
0.00010849 ETH
-71839752019-02-06 16:32:232608 days ago1549470743
0x8d4d8f0d...4C3CE6ccf
0.00021698 ETH
-71839752019-02-06 16:32:232608 days ago1549470743
0x8d4d8f0d...4C3CE6ccf
0.00021698 ETH
-71838702019-02-06 16:03:342608 days ago1549469014
0x8d4d8f0d...4C3CE6ccf
0.00043396 ETH
-71838702019-02-06 16:03:342608 days ago1549469014
0x8d4d8f0d...4C3CE6ccf
0.00043396 ETH
-71838622019-02-06 16:01:012608 days ago1549468861
0x8d4d8f0d...4C3CE6ccf
0.00086793 ETH
-71838622019-02-06 16:01:012608 days ago1549468861
0x8d4d8f0d...4C3CE6ccf
0.00086793 ETH
-71838582019-02-06 15:58:312608 days ago1549468711
0x8d4d8f0d...4C3CE6ccf
0.00173587 ETH
-71838582019-02-06 15:58:312608 days ago1549468711
0x8d4d8f0d...4C3CE6ccf
0.00173587 ETH
-71838452019-02-06 15:51:342608 days ago1549468294
0x8d4d8f0d...4C3CE6ccf
0.00347175 ETH
-71838452019-02-06 15:51:342608 days ago1549468294
0x8d4d8f0d...4C3CE6ccf
0.00347175 ETH
-71838332019-02-06 15:48:352608 days ago1549468115
0x8d4d8f0d...4C3CE6ccf
0.0069435 ETH
-71838332019-02-06 15:48:352608 days ago1549468115
0x8d4d8f0d...4C3CE6ccf
0.0069435 ETH
-71683832019-02-03 12:12:392611 days ago1549195959
0x8d4d8f0d...4C3CE6ccf
0.00409251 ETH
-71683762019-02-03 12:11:322611 days ago1549195892
0x8d4d8f0d...4C3CE6ccf
0.00409251 ETH
-71683702019-02-03 12:09:592611 days ago1549195799
0x8d4d8f0d...4C3CE6ccf
0.00409251 ETH
-71393002019-01-28 13:39:122617 days ago1548682752
0x8d4d8f0d...4C3CE6ccf
0.00002577 ETH
-71393002019-01-28 13:39:122617 days ago1548682752
0x8d4d8f0d...4C3CE6ccf
0.00002577 ETH
-71392922019-01-28 13:37:402617 days ago1548682660
0x8d4d8f0d...4C3CE6ccf
0.00005155 ETH
-71392922019-01-28 13:37:402617 days ago1548682660
0x8d4d8f0d...4C3CE6ccf
0.00005155 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
Dice

Compiler Version
v0.5.0+commit.1d4f565a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2019-01-21
*/

pragma solidity ^0.5.0;


/*

ORACLIZE_API
github.com/oraclize/ethereum-api/oraclizeAPI.sol

*/

contract solcChecker {
    /* INCOMPATIBLE SOLC: import the following instead: "github.com/oraclize/ethereum-api/oraclizeAPI_0.5.sol" */ function f(bytes calldata x) external;
}

contract OraclizeI {

    address public cbAddress;

    function setProofType(byte _proofType) external;
    function setCustomGasPrice(uint _gasPrice) external;
    function getPrice(string memory _datasource) public returns (uint _dsprice);
    function randomDS_getSessionPubKeyHash() external view returns (bytes32 _sessionKeyHash);
    function getPrice(string memory _datasource, uint _gasLimit) public returns (uint _dsprice);
    function queryN(uint _timestamp, string memory _datasource, bytes memory _argN) public payable returns (bytes32 _id);
    function query(uint _timestamp, string calldata _datasource, string calldata _arg) external payable returns (bytes32 _id);
    function query2(uint _timestamp, string memory _datasource, string memory _arg1, string memory _arg2) public payable returns (bytes32 _id);
    function query_withGasLimit(uint _timestamp, string calldata _datasource, string calldata _arg, uint _gasLimit) external payable returns (bytes32 _id);
    function queryN_withGasLimit(uint _timestamp, string calldata _datasource, bytes calldata _argN, uint _gasLimit) external payable returns (bytes32 _id);
    function query2_withGasLimit(uint _timestamp, string calldata _datasource, string calldata _arg1, string calldata _arg2, uint _gasLimit) external payable returns (bytes32 _id);
}

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

/*

Begin solidity-cborutils

*/
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);
        }
        _buf.capacity = capacity; // Allocate space for the buffer data
        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 _max) {
        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 memory _data) internal pure returns (buffer memory _buffer) {
        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 {
            let bufptr := mload(_buf) // Memory address of the buffer data
            let buflen := mload(bufptr) // Length of existing buffer data
            dest := add(add(bufptr, buflen), 32) // Start address = buffer address + buffer length + sizeof(buffer length)
            mstore(bufptr, add(buflen, mload(_data))) // Update buffer length
            src := add(_data, 32)
        }
        for(; len >= 32; len -= 32) { // Copy word-length chunks while possible
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }
        uint mask = 256 ** (32 - len) - 1; // Copy remaining bytes
        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 {
            let bufptr := mload(_buf) // Memory address of the buffer data
            let buflen := mload(bufptr) // Length of existing buffer data
            let dest := add(add(bufptr, buflen), 32) // Address = buffer address + buffer length + sizeof(buffer length)
            mstore8(dest, _data)
            mstore(bufptr, add(buflen, 1)) // Update buffer length
        }
    }
    /**
      *
      * @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 _buffer) {
        if (_len + _buf.buf.length > _buf.capacity) {
            resize(_buf, max(_buf.capacity, _len) * 2);
        }
        uint mask = 256 ** _len - 1;
        assembly {
            let bufptr := mload(_buf) // Memory address of the buffer data
            let buflen := mload(bufptr) // Length of existing buffer data
            let dest := add(add(bufptr, buflen), _len) // Address = buffer address + buffer length + sizeof(buffer length) + len
            mstore(dest, or(and(mload(dest), not(mask)), _data))
            mstore(bufptr, add(buflen, _len)) // Update buffer length
        }
        return _buf;
    }
}

library CBOR {

    using Buffer for Buffer.buffer;

    uint8 private constant MAJOR_TYPE_INT = 0;
    uint8 private constant MAJOR_TYPE_MAP = 5;
    uint8 private constant MAJOR_TYPE_BYTES = 2;
    uint8 private constant MAJOR_TYPE_ARRAY = 4;
    uint8 private constant MAJOR_TYPE_STRING = 3;
    uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1;
    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 memory _value) internal pure {
        encodeType(_buf, MAJOR_TYPE_BYTES, _value.length);
        _buf.append(_value);
    }

    function encodeString(Buffer.buffer memory _buf, string memory _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 {

    using CBOR for Buffer.buffer;

    OraclizeI oraclize;
    OraclizeAddrResolverI OAR;

    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_Ledger = 0x30;
    byte constant proofType_Native = 0xF0;
    byte constant proofStorage_IPFS = 0x01;
    byte constant proofType_Android = 0x40;
    byte constant proofType_TLSNotary = 0x10;

    string oraclize_network_name;
    uint8 constant networkID_auto = 0;
    uint8 constant networkID_morden = 2;
    uint8 constant networkID_mainnet = 1;
    uint8 constant networkID_testnet = 2;
    uint8 constant networkID_consensys = 161;

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

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

    modifier oraclize_randomDS_proofVerify(bytes32 _queryId, string memory _result, bytes memory _proof) {
        // RandomDS Proof Step 1: The prefix has to match 'LP\x01' (Ledger Proof version 1)
        require((_proof[0] == "L") && (_proof[1] == "P") && (uint8(_proof[2]) == uint8(1)));
        bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName());
        require(proofVerified);
        _;
    }

    function oraclize_setNetwork(uint8 _networkID) internal returns (bool _networkSet) {
      return oraclize_setNetwork();
      _networkID; // silence the warning and remain backwards compatible
    }

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

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

    function oraclize_setNetwork() internal returns (bool _networkSet) {
        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 memory _result) public payable {
        __callback(_myid, _result, new bytes(0));
    }

    function __callback(bytes32 _myid, string memory _result, bytes memory _proof) pure public {
      return;
      _myid; _result; _proof; // Silence compiler warnings
    }

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

    function oraclize_getPrice(string memory _datasource, uint _gasLimit) oraclizeAPI internal returns (uint _queryPrice) {
        return oraclize.getPrice(_datasource, _gasLimit);
    }

    function oraclize_query(string memory _datasource, string memory _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 memory _datasource, string memory _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 memory _datasource, string memory _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 memory _datasource, string memory _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 memory _datasource, string memory _arg1, string memory _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 memory _datasource, string memory _arg1, string memory _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 memory _datasource, string memory _arg1, string memory _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 memory _datasource, string memory _arg1, string memory _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 memory _datasource, string[] memory _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 memory _datasource, string[] memory _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 memory _datasource, string[] memory _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 memory _datasource, string[] memory _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 memory _datasource, string[1] memory _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 memory _datasource, string[1] memory _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 memory _datasource, string[1] memory _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 memory _datasource, string[1] memory _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 memory _datasource, string[2] memory _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 memory _datasource, string[2] memory _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 memory _datasource, string[2] memory _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 memory _datasource, string[2] memory _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 memory _datasource, string[3] memory _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 memory _datasource, string[3] memory _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 memory _datasource, string[3] memory _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 memory _datasource, string[3] memory _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 memory _datasource, string[4] memory _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 memory _datasource, string[4] memory _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 memory _datasource, string[4] memory _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 memory _datasource, string[4] memory _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 memory _datasource, string[5] memory _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 memory _datasource, string[5] memory _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 memory _datasource, string[5] memory _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 memory _datasource, string[5] memory _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 memory _datasource, bytes[] memory _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 memory _datasource, bytes[] memory _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 memory _datasource, bytes[] memory _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 memory _datasource, bytes[] memory _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 memory _datasource, bytes[1] memory _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 memory _datasource, bytes[1] memory _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 memory _datasource, bytes[1] memory _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 memory _datasource, bytes[1] memory _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 memory _datasource, bytes[2] memory _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 memory _datasource, bytes[2] memory _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 memory _datasource, bytes[2] memory _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 memory _datasource, bytes[2] memory _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 memory _datasource, bytes[3] memory _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 memory _datasource, bytes[3] memory _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 memory _datasource, bytes[3] memory _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 memory _datasource, bytes[3] memory _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 memory _datasource, bytes[4] memory _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 memory _datasource, bytes[4] memory _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 memory _datasource, bytes[4] memory _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 memory _datasource, bytes[4] memory _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 memory _datasource, bytes[5] memory _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 memory _datasource, bytes[5] memory _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 memory _datasource, bytes[5] memory _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 memory _datasource, bytes[5] memory _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_setProof(byte _proofP) oraclizeAPI internal {
        return oraclize.setProofType(_proofP);
    }


    function oraclize_cbAddress() oraclizeAPI internal returns (address _callbackAddress) {
        return oraclize.cbAddress();
    }

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

    function oraclize_setCustomGasPrice(uint _gasPrice) oraclizeAPI internal {
        return oraclize.setCustomGasPrice(_gasPrice);
    }

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

    function parseAddr(string memory _a) internal pure returns (address _parsedAddress) {
        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(uint8(tmp[i]));
            b2 = uint160(uint8(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 memory _a, string memory _b) internal pure returns (int _returnCode) {
        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 memory _haystack, string memory _needle) internal pure returns (int _returnCode) {
        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 memory _a, string memory _b) internal pure returns (string memory _concatenatedString) {
        return strConcat(_a, _b, "", "", "");
    }

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

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

    function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory _concatenatedString) {
        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;
        uint i = 0;
        for (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 safeParseInt(string memory _a) internal pure returns (uint _parsedInt) {
        return safeParseInt(_a, 0);
    }

    function safeParseInt(string memory _a, uint _b) internal pure returns (uint _parsedInt) {
        bytes memory bresult = bytes(_a);
        uint mint = 0;
        bool decimals = false;
        for (uint i = 0; i < bresult.length; i++) {
            if ((uint(uint8(bresult[i])) >= 48) && (uint(uint8(bresult[i])) <= 57)) {
                if (decimals) {
                   if (_b == 0) break;
                    else _b--;
                }
                mint *= 10;
                mint += uint(uint8(bresult[i])) - 48;
            } else if (uint(uint8(bresult[i])) == 46) {
                require(!decimals, 'More than one decimal encountered in string!');
                decimals = true;
            } else {
                revert("Non-numeral character encountered in string!");
            }
        }
        if (_b > 0) {
            mint *= 10 ** _b;
        }
        return mint;
    }

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

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

    function uint2str(uint _i) internal pure returns (string memory _uintAsString) {
        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(uint8(48 + _i % 10));
            _i /= 10;
        }
        return string(bstr);
    }

    function stra2cbor(string[] memory _arr) internal pure returns (bytes memory _cborEncoding) {
        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[] memory _arr) internal pure returns (bytes memory _cborEncoding) {
        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;
    }

    function oraclize_newRandomDSQuery(uint _delay, uint _nbytes, uint _customGasLimit) internal returns (bytes32 _queryId) {
        require((_nbytes > 0) && (_nbytes <= 32));
        _delay *= 10; // Convert from seconds to ledger timer ticks
        bytes memory nbytes = new bytes(1);
        nbytes[0] = byte(uint8(_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 the relaxed random contract at https://github.com/oraclize/ethereum-examples
             for an idea on how to override and replace commit hash variables.
            */
            mstore(add(unonce, 0x20), xor(blockhash(sub(number, 1)), xor(coinbase, timestamp)))
            mstore(sessionKeyHash, 0x20)
            mstore(add(sessionKeyHash, 0x20), sessionKeyHash_bytes32)
        }
        bytes memory delay = new bytes(32);
        assembly {
            mstore(add(delay, 0x20), _delay)
        }
        bytes memory delay_bytes8 = new bytes(8);
        copyBytes(delay, 24, 8, delay_bytes8, 0);
        bytes[4] memory args = [unonce, nbytes, sessionKeyHash, delay];
        bytes32 queryId = oraclize_query("random", args, _customGasLimit);
        bytes memory delay_bytes8_left = new bytes(8);
        assembly {
            let x := mload(add(delay_bytes8, 0x20))
            mstore8(add(delay_bytes8_left, 0x27), div(x, 0x100000000000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x26), div(x, 0x1000000000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x25), div(x, 0x10000000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x24), div(x, 0x100000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x23), div(x, 0x1000000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x22), div(x, 0x10000000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x21), div(x, 0x100000000000000000000000000000000000000000000000000))
            mstore8(add(delay_bytes8_left, 0x20), div(x, 0x1000000000000000000000000000000000000000000000000))
        }
        oraclize_randomDS_setCommitment(queryId, keccak256(abi.encodePacked(delay_bytes8_left, args[1], sha256(args[0]), args[2])));
        return queryId;
    }

    function oraclize_randomDS_setCommitment(bytes32 _queryId, bytes32 _commitment) internal {
        oraclize_randomDS_args[_queryId] = _commitment;
    }

    function verifySig(bytes32 _tosignh, bytes memory _dersig, bytes memory _pubkey) internal returns (bool _sigVerified) {
        bool sigok;
        address signer;
        bytes32 sigr;
        bytes32 sigs;
        bytes memory sigr_ = new bytes(32);
        uint offset = 4 + (uint(uint8(_dersig[3])) - 0x20);
        sigr_ = copyBytes(_dersig, offset, 32, sigr_, 0);
        bytes memory sigs_ = new bytes(32);
        offset += 32 + 2;
        sigs_ = copyBytes(_dersig, offset + (uint(uint8(_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(uint160(uint256(keccak256(_pubkey)))) == signer) {
            return true;
        } else {
            (sigok, signer) = safer_ecrecover(_tosignh, 28, sigr, sigs);
            return (address(uint160(uint256(keccak256(_pubkey)))) == signer);
        }
    }

    function oraclize_randomDS_proofVerify__sessionKeyValidity(bytes memory _proof, uint _sig2offset) internal returns (bool _proofVerified) {
        bool sigok;
        // Random DS Proof Step 6: Verify the attestation signature, APPKEY1 must sign the sessionKey from the correct ledger app (CODEHASH)
        bytes memory sig2 = new bytes(uint(uint8(_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(uint8(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) {
            return false;
        }
        // Random DS Proof 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(uint8(_proof[3 + 65 + 1])) + 2);
        copyBytes(_proof, 3 + 65, sig3.length, sig3, 0);
        sigok = verifySig(sha256(tosign3), sig3, LEDGERKEY);
        return sigok;
    }

    function oraclize_randomDS_proofVerify__returnCode(bytes32 _queryId, string memory _result, bytes memory _proof) internal returns (uint8 _returnCode) {
        // Random DS Proof Step 1: The prefix has to match 'LP\x01' (Ledger Proof version 1)
        if ((_proof[0] != "L") || (_proof[1] != "P") || (uint8(_proof[2]) != uint8(1))) {
            return 1;
        }
        bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName());
        if (!proofVerified) {
            return 2;
        }
        return 0;
    }

    function matchBytes32Prefix(bytes32 _content, bytes memory _prefix, uint _nRandomBytes) internal pure returns (bool _matchesPrefix) {
        bool match_ = true;
        require(_prefix.length == _nRandomBytes);
        for (uint256 i = 0; i< _nRandomBytes; i++) {
            if (_content[i] != _prefix[i]) {
                match_ = false;
            }
        }
        return match_;
    }

    function oraclize_randomDS_proofVerify__main(bytes memory _proof, bytes32 _queryId, bytes memory _result, string memory _contextName) internal returns (bool _proofVerified) {
        // Random DS Proof Step 2: The unique keyhash has to match with the sha256 of (context name + _queryId)
        uint ledgerProofLength = 3 + 65 + (uint(uint8(_proof[3 + 65 + 1])) + 2) + 32;
        bytes memory keyhash = new bytes(32);
        copyBytes(_proof, ledgerProofLength, 32, keyhash, 0);
        if (!(keccak256(keyhash) == keccak256(abi.encodePacked(sha256(abi.encodePacked(_contextName, _queryId)))))) {
            return false;
        }
        bytes memory sig1 = new bytes(uint(uint8(_proof[ledgerProofLength + (32 + 8 + 1 + 32) + 1])) + 2);
        copyBytes(_proof, ledgerProofLength + (32 + 8 + 1 + 32), sig1.length, sig1, 0);
        // Random DS Proof 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(uint8(_proof[ledgerProofLength + 32 + 8])))) {
            return false;
        }
        // Random DS Proof Step 4: Commitment match verification, keccak256(delay, nbytes, unonce, sessionKeyHash) == commitment in storage.
        // This is to verify that the computed args match with the ones specified in the query.
        bytes memory commitmentSlice1 = new bytes(8 + 1 + 32);
        copyBytes(_proof, ledgerProofLength + 32, 8 + 1 + 32, commitmentSlice1, 0);
        bytes memory sessionPubkey = new bytes(64);
        uint sig2offset = ledgerProofLength + 32 + (8 + 1 + 32) + sig1.length + 65;
        copyBytes(_proof, sig2offset - 64, 64, sessionPubkey, 0);
        bytes32 sessionPubkeyHash = sha256(sessionPubkey);
        if (oraclize_randomDS_args[_queryId] == keccak256(abi.encodePacked(commitmentSlice1, sessionPubkeyHash))) { //unonce, nbytes and sessionKeyHash match
            delete oraclize_randomDS_args[_queryId];
        } else return false;
        // Random DS Proof 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]) {
            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 memory _from, uint _fromOffset, uint _length, bytes memory _to, uint _toOffset) internal pure returns (bytes memory _copiedBytes) {
        uint minLength = _length + _toOffset;
        require(_to.length >= minLength); // Buffer too small. Should be a better way?
        uint i = 32 + _fromOffset; // NOTE: the offset 32 is added to skip the `size` field of both bytes variables
        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 _success, address _recoveredAddress) {
        /*
         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)
            ret := call(3000, 1, 0, size, 128, size, 32) // NOTE: we can reuse the request memory because we deal with the return code.
            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 memory _sig) internal returns (bool _success, address _recoveredAddress) {
        bytes32 r;
        bytes32 s;
        uint8 v;
        if (_sig.length != 65) {
            return (false, address(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, address(0));
        }
        return safer_ecrecover(_hash, v, r, s);
    }

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

/*

END ORACLIZE_API

*/


contract Dice is usingOraclize {

    uint minimumBet;

    // The oraclize callback structure: we use several oraclize calls.
    // All oraclize calls will result in a common callback to __callback(...).
    // To keep track of the different queries we the struct callback struct in place.

    struct oraclizeCallback {
        address payable player;
        bytes32 queryId;
        bool    status;
        uint[]  betNumbers;
        uint    betAmount;
        uint    winningNumber;
        uint    winAmount;
    }
    
    // Lookup state for oraclizeQueryIds

    mapping (bytes32 => oraclizeCallback) oraclizeStructs;
    bytes32[] public oraclizedIndices;

    // General events

    event GameStarted(address _contract);
    event PlayerBetAccepted(address _contract, address _player, uint[] _numbers, uint _bet);
    event RollDice(address _contract, address _player, string _description);
    event NumberGeneratorQuery(address _contract, address _player, bytes32 _randomOrgQueryId);
    event AwaitingRandomOrgCallback(address _contract, bytes32 _randomOrgQueryId);
    event RandomOrgCallback(address _contract, bytes32 _oraclizeQueryId);
    event NumberGeneratorResponse(address _contract, address _player, bytes32 _oraclizeQueryId, string _oraclizeResponse);
    event WinningNumber(address _contract, bytes32 _oraclizeQueryId, uint[] _betNumbers, uint _winningNumber);
    event DidNotWin(address _contract, uint _winningNumber, uint[] _betNumbers);
    event PlayerWins(address _contract, address _winner, uint _winningNumber, uint _winAmount);
    event PlayerCashout(address _contract, address _winner, uint _winningNumber, uint _winAmount);
    event GameFinalized(address _contract);

    constructor() 
        public
    {
        minimumBet = 0.01 ether;
        emit GameStarted(address(this));
    }


    function rollDice(uint[] memory betNumbers) 
        public 
        payable
        returns (bool success)
    {
        
        bytes32 oraclizeQueryId;
        
        address payable player = msg.sender;
        
        uint betAmount = msg.value;
        
        require(betAmount >= minimumBet);
        require(betNumbers.length >= 1);

        emit PlayerBetAccepted(address(this), player, betNumbers, betAmount);

        emit RollDice(address(this), player, "Query to random.org was sent, standing by for the answer.");


        if(betNumbers.length < 6) {

            // Making oraclized query to random.org.

            oraclizeQueryId = oraclize_query("URL", "https://www.random.org/integers/?num=1&min=1&max=6&col=1&base=8&format=plain");

            // Recording the bet info for future reference.
            
            oraclizeStructs[oraclizeQueryId].status = false;
            oraclizeStructs[oraclizeQueryId].queryId = oraclizeQueryId;
            oraclizeStructs[oraclizeQueryId].player = player;
            oraclizeStructs[oraclizeQueryId].betNumbers = betNumbers;
            oraclizeStructs[oraclizeQueryId].betAmount = betAmount;

            // Recording oraclize indices.
            
            oraclizedIndices.push(oraclizeQueryId) -1;
  
            emit NumberGeneratorQuery(address(this), player, oraclizeQueryId);
 
 
        } else {
            
            // Player bets on every number, that's an invalid bet, money are returned back to the player.

            msg.sender.transfer(msg.value);

        }
    
    
        emit AwaitingRandomOrgCallback(address(this), oraclizeQueryId);

        return true;

    }


    function __callback(bytes32 myid, string memory result) 
        public
        payable 
    {
        
        // All the action takes place on when we receive a new number from random.org

        bool playerWins;
        
        uint winAmount;
    
        emit RandomOrgCallback(address(this), myid);
    
        address oraclize_cb = oraclize_cbAddress();

        require(msg.sender == oraclize_cb);
        
        
        address payable player = oraclizeStructs[myid].player;


        emit NumberGeneratorResponse(address(this), msg.sender, myid, result);
        
        uint winningNumber = parseInt(result);
        
        
        uint[] memory betNumbers = oraclizeStructs[myid].betNumbers;
        
        emit WinningNumber(address(this), myid, betNumbers, winningNumber);


        oraclizeStructs[myid].winningNumber = winningNumber;
        

        uint betAmount = oraclizeStructs[myid].betAmount;


        for (uint i = 0; i < betNumbers.length; i++) {

            uint betNumber = betNumbers[i];

            if(betNumber == winningNumber) {
                playerWins = true;
                break;
            }

        }
        
        
        if(playerWins) {
            
            // Calculate how much player wins..

            if(betNumbers.length == 1) {
                    winAmount = (betAmount * 589) / 100;
            }
            if(betNumbers.length == 2) {
                    winAmount = (betAmount * 293) / 100;
            }
            if(betNumbers.length == 3) {
                    winAmount = (betAmount * 195) / 100;
            }
            if(betNumbers.length == 4) {
                    winAmount = (betAmount * 142) / 100;
            }
            if(betNumbers.length == 5) {
                    winAmount = (betAmount * 107) / 100;
            }
            if(betNumbers.length >= 6) {
                    winAmount = 0;
            }

            emit PlayerWins(address(this), player, winningNumber, winAmount);

            if(winAmount > 0) {

                // Substract the casino edge 4% and pay the winner..
                
                uint casino_edge = (winAmount / 100) * 4;
                
                winAmount = winAmount - casino_edge;

                address(player).transfer(winAmount);

                oraclizeStructs[myid].winAmount = winAmount;

                emit PlayerCashout(address(this), player, winningNumber, winAmount);
            
            }
            
        }

        if(playerWins==false) {

            emit DidNotWin(address(this), winningNumber, betNumbers);

            emit GameFinalized(address(this));

        }

        oraclizeStructs[myid].status = true;

    }
    
    function payRoyalty()
        public
        payable
        returns (bool success)
    {

        // There is a cost associated to provide this service, as an example, it costs 0.004 ether to make a single call to oraclize and we need to somehow cover for the it.
        uint royalty = address(this).balance/2;

        address payable trustedParty1 = 0xE2cf529D780bda21D880E1d1A2035E7f4f503e60;
        address payable trustedParty2 = 0x07b7b9d3710dC72A0A6B7A8B6D31EB5D0E62cF56;
        trustedParty1.transfer(royalty/2);
        trustedParty2.transfer(royalty/2);

        return (true);
    }

    function gameStatus(bytes32 oraclizeQueryId)
        public
        view
        returns (bool, address, uint[] memory, uint, uint, uint)
    {

        bool status = oraclizeStructs[oraclizeQueryId].status;
        address player = oraclizeStructs[oraclizeQueryId].player;
        uint[] memory betNumbers = oraclizeStructs[oraclizeQueryId].betNumbers;
        uint winningNumber = oraclizeStructs[oraclizeQueryId].winningNumber;
        uint betAmount = oraclizeStructs[oraclizeQueryId].betAmount;
        uint winAmount = oraclizeStructs[oraclizeQueryId].winAmount;

        return (status, player, betNumbers, winningNumber, betAmount, winAmount);
    }

    function getBlockTimestamp()
        public
        view
        returns (uint)
    {
        return (now);
    }

    function getContractBalance()
        public
        view
        returns (uint)
    {
        return (address(this).balance);
    }

}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[],"name":"payRoyalty","outputs":[{"name":"success","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_myid","type":"bytes32"},{"name":"_result","type":"string"},{"name":"_proof","type":"bytes"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"getContractBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBlockTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"betNumbers","type":"uint256[]"}],"name":"rollDice","outputs":[{"name":"success","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"oraclizeQueryId","type":"bytes32"}],"name":"gameStatus","outputs":[{"name":"","type":"bool"},{"name":"","type":"address"},{"name":"","type":"uint256[]"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"oraclizedIndices","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"}],"name":"GameStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_player","type":"address"},{"indexed":false,"name":"_numbers","type":"uint256[]"},{"indexed":false,"name":"_bet","type":"uint256"}],"name":"PlayerBetAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_player","type":"address"},{"indexed":false,"name":"_description","type":"string"}],"name":"RollDice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_player","type":"address"},{"indexed":false,"name":"_randomOrgQueryId","type":"bytes32"}],"name":"NumberGeneratorQuery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_randomOrgQueryId","type":"bytes32"}],"name":"AwaitingRandomOrgCallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_oraclizeQueryId","type":"bytes32"}],"name":"RandomOrgCallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_player","type":"address"},{"indexed":false,"name":"_oraclizeQueryId","type":"bytes32"},{"indexed":false,"name":"_oraclizeResponse","type":"string"}],"name":"NumberGeneratorResponse","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_oraclizeQueryId","type":"bytes32"},{"indexed":false,"name":"_betNumbers","type":"uint256[]"},{"indexed":false,"name":"_winningNumber","type":"uint256"}],"name":"WinningNumber","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_winningNumber","type":"uint256"},{"indexed":false,"name":"_betNumbers","type":"uint256[]"}],"name":"DidNotWin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_winner","type":"address"},{"indexed":false,"name":"_winningNumber","type":"uint256"},{"indexed":false,"name":"_winAmount","type":"uint256"}],"name":"PlayerWins","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"},{"indexed":false,"name":"_winner","type":"address"},{"indexed":false,"name":"_winningNumber","type":"uint256"},{"indexed":false,"name":"_winAmount","type":"uint256"}],"name":"PlayerCashout","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_contract","type":"address"}],"name":"GameFinalized","type":"event"}]

608060405234801561001057600080fd5b50662386f26fc100006005819055507f67cf7f1535e1c1323fe4e76266f7d55f0c1f67fdf449db65e014f9d35881514d30604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a161267e806100916000396000f3fe60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063212d67231461009357806327dc297e146100b557806338bbfa501461017a5780636f9fb98a146102e3578063796b89b91461030e578063d5a1335714610339578063f0942d3514610409578063fd480db0146104ec575b600080fd5b61009b61053b565b604051808215151515815260200191505060405180910390f35b610178600480360360408110156100cb57600080fd5b8101908080359060200190929190803590602001906401000000008111156100f257600080fd5b82018360208201111561010457600080fd5b8035906020019184600183028401116401000000008311171561012657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610646565b005b34801561018657600080fd5b506102e16004803603606081101561019d57600080fd5b8101908080359060200190929190803590602001906401000000008111156101c457600080fd5b8201836020820111156101d657600080fd5b803590602001918460018302840111640100000000831117156101f857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561025b57600080fd5b82018360208201111561026d57600080fd5b8035906020019184600183028401116401000000008311171561028f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd2565b005b3480156102ef57600080fd5b506102f8610dd7565b6040518082815260200191505060405180910390f35b34801561031a57600080fd5b50610323610df6565b6040518082815260200191505060405180910390f35b6103ef6004803603602081101561034f57600080fd5b810190808035906020019064010000000081111561036c57600080fd5b82018360208201111561037e57600080fd5b803590602001918460208302840111640100000000831117156103a057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dfe565b604051808215151515815260200191505060405180910390f35b34801561041557600080fd5b506104426004803603602081101561042c57600080fd5b810190808035906020019092919050505061134f565b60405180871515151581526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001858152602001848152602001838152602001828103825286818151815260200191508051906020019060200280838360005b838110156104d35780820151818401526020810190506104b8565b5050505090500197505050505050505060405180910390f35b3480156104f857600080fd5b506105256004803603602081101561050f57600080fd5b8101908080359060200190929190505050611496565b6040518082815260200191505060405180910390f35b60008060023073ffffffffffffffffffffffffffffffffffffffff163181151561056157fe5b049050600073e2cf529d780bda21d880e1d1a2035e7f4f503e60905060007307b7b9d3710dc72a0a6b7a8b6d31eb5d0e62cf5690508173ffffffffffffffffffffffffffffffffffffffff166108fc6002858115156105bc57fe5b049081150290604051600060405180830381858888f193505050501580156105e8573d6000803e3d6000fd5b508073ffffffffffffffffffffffffffffffffffffffff166108fc60028581151561060f57fe5b049081150290604051600060405180830381858888f1935050505015801561063b573d6000803e3d6000fd5b506001935050505090565b6000807f602b89240ce6987297f78380c3ebebc9986945234f03f7752c42da22947ff5693085604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160006106be6114b9565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106fa57600080fd5b60006006600087815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690507fed822697d59a0c1886c1bb967ef984f8a9352808f7f7f57daba5c1c2866032f630338888604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108045780820151818401526020810190506107e9565b50505050905090810190601f1680156108315780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1600061084c8661182c565b90506060600660008981526020019081526020016000206003018054806020026020016040519081016040528092919081815260200182805480156108b057602002820191906000526020600020905b81548152602001906001019080831161089c575b505050505090507f03478d343c9c91598b90aa771d40bfc509b9c571c93585e1d80a7e46566846c330898385604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b8381101561095d578082015181840152602081019050610942565b505050509050019550505050505060405180910390a181600660008a8152602001908152602001600020600501819055506000600660008a815260200190815260200160002060040154905060008090505b82518110156109f457600083828151811015156109c857fe5b906020019060200201519050848114156109e65760019850506109f4565b5080806001019150506109af565b508615610c7357600182511415610a1957606461024d8202811515610a1557fe5b0495505b600282511415610a375760646101258202811515610a3357fe5b0495505b600382511415610a5457606460c38202811515610a5057fe5b0495505b600482511415610a71576064608e8202811515610a6d57fe5b0495505b600582511415610a8e576064606b8202811515610a8a57fe5b0495505b60068251101515610a9e57600095505b7fce0bba193e3a452066f829a9d0e614d77c7bcdcd210f9b3e2211cf022875644330858589604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a16000861115610c725760006004606488811515610b5e57fe5b0402905080870396508473ffffffffffffffffffffffffffffffffffffffff166108fc889081150290604051600060405180830381858888f19350505050158015610bad573d6000803e3d6000fd5b5086600660008c8152602001908152602001600020600601819055507f20079202da2dd1fbc2e34fc129b22ea8484174d3d82fa441a74d5b8c6f00acb03086868a604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a1505b5b600015158715151415610d98577f4287a69526ecf242e7e699cc7c52a9d7ff7e6e56171f984b0e97ff5de471606e308484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015610d1f578082015181840152602081019050610d04565b5050505090500194505050505060405180910390a17f943458c26f2ea67fe8be99639dae40b390c9f7d0ded2a710f97e4a599a78e85b30604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b6001600660008b815260200190815260200160002060020160006101000a81548160ff021916908315150217905550505050505050505050565b505050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600042905090565b600080600033905060003490506005548110151515610e1c57600080fd5b6001855110151515610e2d57600080fd5b7fd4e0f46541dafcc37f074b94fd51632ed262721c2579ebe2cfd942e1e9e5b7ba30838784604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b83811015610eff578082015181840152602081019050610ee4565b505050509050019550505050505060405180910390a17ffda291853687b58e76c44759c1f18fbbbba2288607d4bb996296e93e606b25a43083604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825260398152602001807f517565727920746f2072616e646f6d2e6f7267207761732073656e742c20737481526020017f616e64696e6720627920666f722074686520616e737765722e00000000000000815250604001935050505060405180910390a1600685511015611290576110d66040805190810160405280600381526020017f55524c0000000000000000000000000000000000000000000000000000000000815250608060405190810160405280604c81526020017f68747470733a2f2f7777772e72616e646f6d2e6f72672f696e7465676572732f81526020017f3f6e756d3d31266d696e3d31266d61783d3626636f6c3d3126626173653d382681526020017f666f726d61743d706c61696e0000000000000000000000000000000000000000815250611840565b925060006006600085815260200190815260200160002060020160006101000a81548160ff021916908315150217905550826006600085815260200190815260200160002060010181905550816006600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550846006600085815260200190815260200160002060030190805190602001906111a1929190612560565b5080600660008581526020019081526020016000206004018190555060016007849080600181540180825580915050906001820390600052602060002001600090919290919091505550507f1bec31073981b1ab0d17d1a6a0d301ab377caea5c0fb8b6c4ee72817ce145ca9308385604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a16112d8565b3373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156112d6573d6000803e3d6000fd5b505b7f0afc4c3b9c9d5ecccaf19a7693d3b83451bcd741213ec006156248b0562e98cd3084604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160019350505050919050565b60008060606000806000806006600089815260200190815260200160002060020160009054906101000a900460ff1690506000600660008a815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506060600660008b815260200190815260200160002060030180548060200260200160405190810160405280929190818152602001828054801561141d57602002820191906000526020600020905b815481526020019060010190808311611409575b505050505090506000600660008c81526020019081526020016000206005015490506000600660008d81526020019081526020016000206004015490506000600660008e81526020019081526020016000206006015490508585858585859b509b509b509b509b509b5050505050505091939550919395565b6007818154811015156114a557fe5b906000526020600020016000915090505481565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806115415750600061153f600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611df9565b145b15611552576115506000611e04565b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156115d857600080fd5b505af11580156115ec573d6000803e3d6000fd5b505050506040513d602081101561160257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561176957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d602081101561171857600080fd5b81019080805190602001909291905050506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156117ec57600080fd5b505afa158015611800573d6000803e3d6000fd5b505050506040513d602081101561181657600080fd5b8101908080519060200190929190505050905090565b6000611839826000611e15565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806118c8575060006118c6600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611df9565b145b156118d9576118d76000611e04565b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561195f57600080fd5b505af1158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611af057600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611a7557600080fd5b505af1158015611a89573d6000803e3d6000fd5b505050506040513d6020811015611a9f57600080fd5b81019080805190602001909291905050506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663524f3889856040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b9b578082015181840152602081019050611b80565b50505050905090810190601f168015611bc85780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b158015611be757600080fd5b505af1158015611bfb573d6000803e3d6000fd5b505050506040513d6020811015611c1157600080fd5b8101908080519060200190929190505050905062030d403a02670de0b6b3a764000001811115611c48576000600102915050611df3565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663adf59f9982600087876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611cff578082015181840152602081019050611ce4565b50505050905090810190601f168015611d2c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611d65578082015181840152602081019050611d4a565b50505050905090810190601f168015611d925780820380516001836020036101000a031916815260200191505b50955050505050506020604051808303818588803b158015611db357600080fd5b505af1158015611dc7573d6000803e3d6000fd5b50505050506040513d6020811015611dde57600080fd5b81019080805190602001909291905050509150505b92915050565b6000813b9050919050565b6000611e0e6120b0565b9050919050565b600060608390506000809050600080905060008090505b83518110156120915760308482815181101515611e4557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900460ff1610158015611f43575060398482815181101515611ecf57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900460ff1611155b15611ff7578115611f66576000861415611f5c57612091565b8580600190039650505b600a8302925060308482815181101515611f7c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900460ff160383019250612084565b602e848281518110151561200757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900460ff16141561208357600191505b5b8080600101915050611e2c565b5060008511156120a45784600a0a820291505b81935050505092915050565b6000806120d0731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611df9565b111561217257731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506121696040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250612546565b60019050612543565b600061219173c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611df9565b11156122335773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061222a6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250612546565b60019050612543565b600061225273b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611df9565b11156122f45773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506122eb6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250612546565b60019050612543565b600061231373146500cfd35b22e4a392fe0adc06de1a1368ed48611df9565b11156123b55773146500cfd35b22e4a392fe0adc06de1a1368ed48600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506123ac6040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250612546565b60019050612543565b60006123d4736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611df9565b111561243857736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612543565b60006124577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611df9565b11156124bb577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612543565b60006124da7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611df9565b111561253e577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612543565b600090505b90565b806002908051906020019061255c9291906125ad565b5050565b82805482825590600052602060002090810192821561259c579160200282015b8281111561259b578251825591602001919060010190612580565b5b5090506125a9919061262d565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106125ee57805160ff191683800117855561261c565b8280016001018555821561261c579182015b8281111561261b578251825591602001919060010190612600565b5b509050612629919061262d565b5090565b61264f91905b8082111561264b576000816000905550600101612633565b5090565b9056fea165627a7a723058209409f45c565ffbed48fce294b2b44c4a66b910dac07f251843aba7d906f7a8870029

Deployed Bytecode

0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063212d67231461009357806327dc297e146100b557806338bbfa501461017a5780636f9fb98a146102e3578063796b89b91461030e578063d5a1335714610339578063f0942d3514610409578063fd480db0146104ec575b600080fd5b61009b61053b565b604051808215151515815260200191505060405180910390f35b610178600480360360408110156100cb57600080fd5b8101908080359060200190929190803590602001906401000000008111156100f257600080fd5b82018360208201111561010457600080fd5b8035906020019184600183028401116401000000008311171561012657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610646565b005b34801561018657600080fd5b506102e16004803603606081101561019d57600080fd5b8101908080359060200190929190803590602001906401000000008111156101c457600080fd5b8201836020820111156101d657600080fd5b803590602001918460018302840111640100000000831117156101f857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561025b57600080fd5b82018360208201111561026d57600080fd5b8035906020019184600183028401116401000000008311171561028f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd2565b005b3480156102ef57600080fd5b506102f8610dd7565b6040518082815260200191505060405180910390f35b34801561031a57600080fd5b50610323610df6565b6040518082815260200191505060405180910390f35b6103ef6004803603602081101561034f57600080fd5b810190808035906020019064010000000081111561036c57600080fd5b82018360208201111561037e57600080fd5b803590602001918460208302840111640100000000831117156103a057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dfe565b604051808215151515815260200191505060405180910390f35b34801561041557600080fd5b506104426004803603602081101561042c57600080fd5b810190808035906020019092919050505061134f565b60405180871515151581526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001858152602001848152602001838152602001828103825286818151815260200191508051906020019060200280838360005b838110156104d35780820151818401526020810190506104b8565b5050505090500197505050505050505060405180910390f35b3480156104f857600080fd5b506105256004803603602081101561050f57600080fd5b8101908080359060200190929190505050611496565b6040518082815260200191505060405180910390f35b60008060023073ffffffffffffffffffffffffffffffffffffffff163181151561056157fe5b049050600073e2cf529d780bda21d880e1d1a2035e7f4f503e60905060007307b7b9d3710dc72a0a6b7a8b6d31eb5d0e62cf5690508173ffffffffffffffffffffffffffffffffffffffff166108fc6002858115156105bc57fe5b049081150290604051600060405180830381858888f193505050501580156105e8573d6000803e3d6000fd5b508073ffffffffffffffffffffffffffffffffffffffff166108fc60028581151561060f57fe5b049081150290604051600060405180830381858888f1935050505015801561063b573d6000803e3d6000fd5b506001935050505090565b6000807f602b89240ce6987297f78380c3ebebc9986945234f03f7752c42da22947ff5693085604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160006106be6114b9565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106fa57600080fd5b60006006600087815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690507fed822697d59a0c1886c1bb967ef984f8a9352808f7f7f57daba5c1c2866032f630338888604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108045780820151818401526020810190506107e9565b50505050905090810190601f1680156108315780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1600061084c8661182c565b90506060600660008981526020019081526020016000206003018054806020026020016040519081016040528092919081815260200182805480156108b057602002820191906000526020600020905b81548152602001906001019080831161089c575b505050505090507f03478d343c9c91598b90aa771d40bfc509b9c571c93585e1d80a7e46566846c330898385604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b8381101561095d578082015181840152602081019050610942565b505050509050019550505050505060405180910390a181600660008a8152602001908152602001600020600501819055506000600660008a815260200190815260200160002060040154905060008090505b82518110156109f457600083828151811015156109c857fe5b906020019060200201519050848114156109e65760019850506109f4565b5080806001019150506109af565b508615610c7357600182511415610a1957606461024d8202811515610a1557fe5b0495505b600282511415610a375760646101258202811515610a3357fe5b0495505b600382511415610a5457606460c38202811515610a5057fe5b0495505b600482511415610a71576064608e8202811515610a6d57fe5b0495505b600582511415610a8e576064606b8202811515610a8a57fe5b0495505b60068251101515610a9e57600095505b7fce0bba193e3a452066f829a9d0e614d77c7bcdcd210f9b3e2211cf022875644330858589604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a16000861115610c725760006004606488811515610b5e57fe5b0402905080870396508473ffffffffffffffffffffffffffffffffffffffff166108fc889081150290604051600060405180830381858888f19350505050158015610bad573d6000803e3d6000fd5b5086600660008c8152602001908152602001600020600601819055507f20079202da2dd1fbc2e34fc129b22ea8484174d3d82fa441a74d5b8c6f00acb03086868a604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a1505b5b600015158715151415610d98577f4287a69526ecf242e7e699cc7c52a9d7ff7e6e56171f984b0e97ff5de471606e308484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015610d1f578082015181840152602081019050610d04565b5050505090500194505050505060405180910390a17f943458c26f2ea67fe8be99639dae40b390c9f7d0ded2a710f97e4a599a78e85b30604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b6001600660008b815260200190815260200160002060020160006101000a81548160ff021916908315150217905550505050505050505050565b505050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b600042905090565b600080600033905060003490506005548110151515610e1c57600080fd5b6001855110151515610e2d57600080fd5b7fd4e0f46541dafcc37f074b94fd51632ed262721c2579ebe2cfd942e1e9e5b7ba30838784604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b83811015610eff578082015181840152602081019050610ee4565b505050509050019550505050505060405180910390a17ffda291853687b58e76c44759c1f18fbbbba2288607d4bb996296e93e606b25a43083604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825260398152602001807f517565727920746f2072616e646f6d2e6f7267207761732073656e742c20737481526020017f616e64696e6720627920666f722074686520616e737765722e00000000000000815250604001935050505060405180910390a1600685511015611290576110d66040805190810160405280600381526020017f55524c0000000000000000000000000000000000000000000000000000000000815250608060405190810160405280604c81526020017f68747470733a2f2f7777772e72616e646f6d2e6f72672f696e7465676572732f81526020017f3f6e756d3d31266d696e3d31266d61783d3626636f6c3d3126626173653d382681526020017f666f726d61743d706c61696e0000000000000000000000000000000000000000815250611840565b925060006006600085815260200190815260200160002060020160006101000a81548160ff021916908315150217905550826006600085815260200190815260200160002060010181905550816006600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550846006600085815260200190815260200160002060030190805190602001906111a1929190612560565b5080600660008581526020019081526020016000206004018190555060016007849080600181540180825580915050906001820390600052602060002001600090919290919091505550507f1bec31073981b1ab0d17d1a6a0d301ab377caea5c0fb8b6c4ee72817ce145ca9308385604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a16112d8565b3373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156112d6573d6000803e3d6000fd5b505b7f0afc4c3b9c9d5ecccaf19a7693d3b83451bcd741213ec006156248b0562e98cd3084604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160019350505050919050565b60008060606000806000806006600089815260200190815260200160002060020160009054906101000a900460ff1690506000600660008a815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506060600660008b815260200190815260200160002060030180548060200260200160405190810160405280929190818152602001828054801561141d57602002820191906000526020600020905b815481526020019060010190808311611409575b505050505090506000600660008c81526020019081526020016000206005015490506000600660008d81526020019081526020016000206004015490506000600660008e81526020019081526020016000206006015490508585858585859b509b509b509b509b509b5050505050505091939550919395565b6007818154811015156114a557fe5b906000526020600020016000915090505481565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806115415750600061153f600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611df9565b145b15611552576115506000611e04565b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156115d857600080fd5b505af11580156115ec573d6000803e3d6000fd5b505050506040513d602081101561160257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561176957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d602081101561171857600080fd5b81019080805190602001909291905050506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156117ec57600080fd5b505afa158015611800573d6000803e3d6000fd5b505050506040513d602081101561181657600080fd5b8101908080519060200190929190505050905090565b6000611839826000611e15565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806118c8575060006118c6600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611df9565b145b156118d9576118d76000611e04565b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561195f57600080fd5b505af1158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611af057600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611a7557600080fd5b505af1158015611a89573d6000803e3d6000fd5b505050506040513d6020811015611a9f57600080fd5b81019080805190602001909291905050506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663524f3889856040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b9b578082015181840152602081019050611b80565b50505050905090810190601f168015611bc85780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b158015611be757600080fd5b505af1158015611bfb573d6000803e3d6000fd5b505050506040513d6020811015611c1157600080fd5b8101908080519060200190929190505050905062030d403a02670de0b6b3a764000001811115611c48576000600102915050611df3565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663adf59f9982600087876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611cff578082015181840152602081019050611ce4565b50505050905090810190601f168015611d2c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611d65578082015181840152602081019050611d4a565b50505050905090810190601f168015611d925780820380516001836020036101000a031916815260200191505b50955050505050506020604051808303818588803b158015611db357600080fd5b505af1158015611dc7573d6000803e3d6000fd5b50505050506040513d6020811015611dde57600080fd5b81019080805190602001909291905050509150505b92915050565b6000813b9050919050565b6000611e0e6120b0565b9050919050565b600060608390506000809050600080905060008090505b83518110156120915760308482815181101515611e4557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900460ff1610158015611f43575060398482815181101515611ecf57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900460ff1611155b15611ff7578115611f66576000861415611f5c57612091565b8580600190039650505b600a8302925060308482815181101515611f7c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900460ff160383019250612084565b602e848281518110151561200757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900460ff16141561208357600191505b5b8080600101915050611e2c565b5060008511156120a45784600a0a820291505b81935050505092915050565b6000806120d0731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611df9565b111561217257731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506121696040805190810160405280600b81526020017f6574685f6d61696e6e6574000000000000000000000000000000000000000000815250612546565b60019050612543565b600061219173c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611df9565b11156122335773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061222a6040805190810160405280600c81526020017f6574685f726f707374656e330000000000000000000000000000000000000000815250612546565b60019050612543565b600061225273b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611df9565b11156122f45773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506122eb6040805190810160405280600981526020017f6574685f6b6f76616e0000000000000000000000000000000000000000000000815250612546565b60019050612543565b600061231373146500cfd35b22e4a392fe0adc06de1a1368ed48611df9565b11156123b55773146500cfd35b22e4a392fe0adc06de1a1368ed48600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506123ac6040805190810160405280600b81526020017f6574685f72696e6b656279000000000000000000000000000000000000000000815250612546565b60019050612543565b60006123d4736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611df9565b111561243857736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612543565b60006124577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611df9565b11156124bb577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612543565b60006124da7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611df9565b111561253e577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050612543565b600090505b90565b806002908051906020019061255c9291906125ad565b5050565b82805482825590600052602060002090810192821561259c579160200282015b8281111561259b578251825591602001919060010190612580565b5b5090506125a9919061262d565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106125ee57805160ff191683800117855561261c565b8280016001018555821561261c579182015b8281111561261b578251825591602001919060010190612600565b5b509050612629919061262d565b5090565b61264f91905b8082111561264b576000816000905550600101612633565b5090565b9056fea165627a7a723058209409f45c565ffbed48fce294b2b44c4a66b910dac07f251843aba7d906f7a8870029

Swarm Source

bzzr://9409f45c565ffbed48fce294b2b44c4a66b910dac07f251843aba7d906f7a887

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

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