Latest 20 txns

TxHash Age From To Value [TxFee]
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf8 days 16 hrs ago0x85ede83c1ad6f99784b5222b50a18ed77fef3965  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.000892056
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b8415 days 15 hrs ago0x85ede83c1ad6f99784b5222b50a18ed77fef3965  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.001151008
0x479353869af3627d204a7c5b691cf98034be322ade461a4fd7f7492d553685db18 days 6 hrs ago0x85ede83c1ad6f99784b5222b50a18ed77fef3965  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00061372
0x163d34a8c82696c50fcb7473f0d6edd6c610728257c499bcc65cf101611cf1b318 days 6 hrs ago0xdc8f20170c0946accf9627b3eb1513cfd1c0499f  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00370366
0x44a6a448239f778287c67052af61aff92b82c562824e12d619cbaffa7eaeb14718 days 6 hrs ago0x85ede83c1ad6f99784b5222b50a18ed77fef3965  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00092665
0xf0104d2241d28e72c0195bb8615730c296d2a78420c2cb8fbde0dd2d79f4d95d22 days 4 hrs ago0x5d482674718a185d1b8d7c0a28b0ecb4abffaf4b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00007843
0xfeaf40d0dae18c3e2862c579cb5a1005b0a847f3df4c7ccad614bc9f6bc0bf7722 days 5 hrs ago0xd2de45c4ab346a07f2277279c42c9f45c6e72c6b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.000179814
0xbc678eb618051681fad58096ff00cd0e50380b6b4e3430b2ca03d8ff01f8a4a325 days 17 hrs ago0xdc8f20170c0946accf9627b3eb1513cfd1c0499f  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00182148
0xa10be111f9c37f8d62e214e4ba30ffbb9829a21b82f75cb7e2f9ede4ffa237ce25 days 17 hrs ago0x85ede83c1ad6f99784b5222b50a18ed77fef3965  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00111198
0x9f3390bce75fa248989f9f1c5fd469ac6f266c415f3443fc3bcbef898502afeb26 days 3 hrs ago0xd2de45c4ab346a07f2277279c42c9f45c6e72c6b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00010843
0xb88360a6ca002742851e794617422d1d99468e3e85e080f2ad5b4ba7d623442a26 days 3 hrs ago0x5d482674718a185d1b8d7c0a28b0ecb4abffaf4b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00018343
0xebc01de86d6b2cc98e502de2097f0de4de5c0184a20adf7473b40a897630e64c26 days 4 hrs ago0xdc8f20170c0946accf9627b3eb1513cfd1c0499f  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.00181752
0x32bd3000695fd56f8e2ce4b701c2e0bc7d86da1e2ceba6ee5523d0858894ad8826 days 4 hrs ago0xd2de45c4ab346a07f2277279c42c9f45c6e72c6b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80.1 Ether0.000109458
0x018067e7fe734916677cb7e87ed549b9afe59ff677d5e9576b4357f97e65ff2e26 days 4 hrs ago0xd2de45c4ab346a07f2277279c42c9f45c6e72c6b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80.05 Ether0.00018533
0xa503378fc7d62ba393b22d9e408563a43dfaef94f4a7b7fed6a2ff3170d19de326 days 5 hrs ago0xd2de45c4ab346a07f2277279c42c9f45c6e72c6b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.000179814
0x76e0acf038477665b7509bdf36e2ee7a00bd48ca9274993f0b31818896bcd2e426 days 6 hrs ago0xdc8f20170c0946accf9627b3eb1513cfd1c0499f  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.0021202
0x8b50fcd73dcd8ede1ccc7dba9d4435178342c7b7c891f28d2740509144f1d2c926 days 6 hrs ago0xd2de45c4ab346a07f2277279c42c9f45c6e72c6b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80.1 Ether0.000298463
0xbbc7a9f04eaf0314ee4350d1fca7e17ed21666b790f043848f9ab17d3202533b26 days 7 hrs ago0x5d482674718a185d1b8d7c0a28b0ecb4abffaf4b  IN   0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether0.000285565
0xb8e486fc79d05115168c97fac0260fac2dc6a920bfb192bc240697f8abb00e2a26 days 7 hrs ago0x5d482674718a185d1b8d7c0a28b0ecb4abffaf4b  IN    Contract Creation0 Ether0.00295832
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0xce6c20d7ea1062df209add0889dcbda7245d07b7b319f04910a3a8e78881c3bf49734908 days 16 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0x744b24d27133ee73b7ac149be2c24ae4e7ab4ac39fab059eec9c15d1999c6b84493093615 days 15 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0x479353869af3627d204a7c5b691cf98034be322ade461a4fd7f7492d553685db491498418 days 6 hrs ago0xa1bf7093037395c65b1dddeeadc528ff67cbd6150x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80 Ether
0x479353869af3627d204a7c5b691cf98034be322ade461a4fd7f7492d553685db491498418 days 6 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xa1bf7093037395c65b1dddeeadc528ff67cbd6150 Ether
0x163d34a8c82696c50fcb7473f0d6edd6c610728257c499bcc65cf101611cf1b3491497818 days 6 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xa1bf7093037395c65b1dddeeadc528ff67cbd6150 Ether
0x163d34a8c82696c50fcb7473f0d6edd6c610728257c499bcc65cf101611cf1b3491497818 days 6 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
0x163d34a8c82696c50fcb7473f0d6edd6c610728257c499bcc65cf101611cf1b3491497818 days 6 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xc03a2615d5efaf5f49f60b7bb6583eaec212fdf10 Ether
0x44a6a448239f778287c67052af61aff92b82c562824e12d619cbaffa7eaeb147491497418 days 6 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400.06 Ether
0x44a6a448239f778287c67052af61aff92b82c562824e12d619cbaffa7eaeb147491497418 days 6 hrs ago0x1fb0cfb4a939e07a0c7d81c9cb8addd1353c3db80xcbf1735aad8c4b337903cd44b419efe6538aab400 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact Match)
Contract Name: raffleContract
Compiler Version: v0.5.0+commit.1d4f565a
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.5.0; /*

ORACLIZE_API

Copyright (c) 2015-2016 Oraclize SRL
Copyright (c) 2016 Oraclize LTD

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

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

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

*/
pragma solidity >= 0.5.0; // Incompatible compiler version - please select a compiler within the stated pragma range, or use a different version of the oraclizeAPI!

// Dummy contract only used to emit to end-user they are using wrong solc
contract solcChecker {
/* INCOMPATIBLE SOLC: import the following instead: "github.com/oraclize/ethereum-api/oraclizeAPI_0.4.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

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

MIT License

Copyright (c) 2018 SmartContract ChainLink, Ltd.

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

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

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

*/
library Buffer {

    struct buffer {
        bytes buf;
        uint capacity;
    }

    function init(buffer memory _buf, uint _capacity) internal pure {
        uint capacity = _capacity;
        if (capacity % 32 != 0) {
            capacity += 32 - (capacity % 32);
        }
        _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 {
        __callback(_myid, _result, new bytes(0));
    }

    function __callback(bytes32 _myid, string memory _result, bytes memory _proof) 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 ERC20Interface {

    function allowance(address tokenOwner, address spender) public view returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);

}

contract raffleContract is usingOraclize {

   event LogConstructorInitiated(string nextStep);
   event LogResult(uint result, address winner, uint amount);
   event LogNewOraclizeQuery(string description);
   event LogID(bytes32 description);
   event LogNewEntry(address player, uint number, uint raffleV);
   event Owner(address newOwner);

   ERC20Interface btcnnTok = ERC20Interface(0xA1BF7093037395C65b1DDdeEADc528Ff67cbD615);

   address public owner;

   modifier onlyOwner() {
     require(msg.sender == owner);
     _;
   }

   struct raffle {
     uint start;
     uint end;
     uint price;
     uint players;
     address winner;
     mapping (uint => address) player;
     mapping (address => bool) already;
   }

   uint public defaultTime = 1 hours;
   uint public defaultPrice = 1 ether;

   uint public raffleToSolve;
   uint public currentRaffleVersion;
   mapping (uint => raffle) public raffleVersion;

   constructor() public payable {

     owner = msg.sender;
     emit Owner(owner);

   }

   function __callback(bytes32 myid, string memory result, bytes memory proof) public {
        if (msg.sender != oraclize_cbAddress()) revert();
        uint maxRange = raffleVersion[raffleToSolve].players;
        uint randomNumber = (uint(keccak256(abi.encodePacked(result))) % maxRange) + 1; // this is an efficient way to get the uint out in the [1, maxRange] range
        uint amount = raffleVersion[raffleToSolve].players * raffleVersion[raffleToSolve].price;
        address winner = raffleVersion[raffleToSolve].player[randomNumber];

        raffleVersion[raffleToSolve].winner = winner;

        btcnnTok.transfer(winner,amount);

        emit LogResult(randomNumber, winner, amount);

        raffleToSolve++;

   }

   function raffleExecute() public payable {

      if(now > raffleVersion[currentRaffleVersion].end){ //Current Version ended

        if(raffleVersion[currentRaffleVersion].players > 0){

          if (oraclize_getPrice("Random") > address(this).balance) {
             emit LogNewOraclizeQuery("Oraclize query was NOT sent, please add some ETH to cover for the query fee");
          } else {
            currentRaffleVersion++; //Next Raffle Verison

            raffleVersion[currentRaffleVersion].start = now;
            raffleVersion[currentRaffleVersion].end = now + defaultTime;
            raffleVersion[currentRaffleVersion].price = defaultPrice;

            oraclize_setProof(proofType_Ledger); // sets the Ledger authenticity proof
            uint N = 4; // number of random bytes we want the datasource to return
            uint delay = 0; // number of seconds to wait before the execution takes place
            uint callbackGas = 3000000; // amount of gas we want Oraclize to set for the callback function
            bytes32 queryId = oraclize_newRandomDSQuery(delay, N, callbackGas);
            emit LogID(queryId);
          }

        } else {


          raffleVersion[currentRaffleVersion].start = now;
          raffleVersion[currentRaffleVersion].end = now + defaultTime;
          raffleVersion[currentRaffleVersion].price = defaultPrice;
          btcnnTok.transferFrom(msg.sender, address(this), raffleVersion[currentRaffleVersion].price);

          raffleVersion[currentRaffleVersion].already[msg.sender] = true;
          raffleVersion[currentRaffleVersion].players ++;
          raffleVersion[currentRaffleVersion].player[raffleVersion[currentRaffleVersion].players] = msg.sender;

          emit LogNewEntry(msg.sender,raffleVersion[currentRaffleVersion].players,currentRaffleVersion);

        }



     } else {

       require(raffleVersion[currentRaffleVersion].already[msg.sender] == false);
       btcnnTok.transferFrom(msg.sender, address(this), raffleVersion[currentRaffleVersion].price);

       raffleVersion[currentRaffleVersion].already[msg.sender] = true;
       raffleVersion[currentRaffleVersion].players ++;
       raffleVersion[currentRaffleVersion].player[raffleVersion[currentRaffleVersion].players] = msg.sender;

       emit LogNewEntry(msg.sender,raffleVersion[currentRaffleVersion].players,currentRaffleVersion);

     }

   }

   function solveRaffle() public payable {

     require(currentRaffleVersion > raffleToSolve);

     oraclize_setProof(proofType_Ledger); // sets the Ledger authenticity proof
     uint N = 4; // number of random bytes we want the datasource to return
     uint delay = 0; // number of seconds to wait before the execution takes place
     uint callbackGas = 200000; // amount of gas we want Oraclize to set for the callback function
     bytes32 queryId = oraclize_newRandomDSQuery(delay, N, callbackGas);
     emit LogID(queryId);

   }

   function updateDefaults (uint time, uint amount) public onlyOwner {

     defaultTime = time;
     defaultPrice = amount;

   }

   function changeOwner (address newOwner) public onlyOwner {
     owner = newOwner;
     emit Owner(owner);
   }

   function tokenFallback(address _from, uint _amountOfTokens, bytes memory _data) public returns (bool) {
       return true;
   }

}

    Contract ABI  
[{"constant":false,"inputs":[],"name":"raffleExecute","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"currentRaffleVersion","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_myid","type":"bytes32"},{"name":"_result","type":"string"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"},{"name":"proof","type":"bytes"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"solveRaffle","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"defaultTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_amountOfTokens","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"tokenFallback","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"raffleToSolve","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"defaultPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"raffleVersion","outputs":[{"name":"start","type":"uint256"},{"name":"end","type":"uint256"},{"name":"price","type":"uint256"},{"name":"players","type":"uint256"},{"name":"winner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"time","type":"uint256"},{"name":"amount","type":"uint256"}],"name":"updateDefaults","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":true,"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"nextStep","type":"string"}],"name":"LogConstructorInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"result","type":"uint256"},{"indexed":false,"name":"winner","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"LogResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"description","type":"string"}],"name":"LogNewOraclizeQuery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"description","type":"bytes32"}],"name":"LogID","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"player","type":"address"},{"indexed":false,"name":"number","type":"uint256"},{"indexed":false,"name":"raffleV","type":"uint256"}],"name":"LogNewEntry","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"Owner","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6080604081905260058054600160a060020a031990811673a1bf7093037395c65b1dddeeadc528ff67cbd61517909155610e10600755670de0b6b3a764000060085560068054909116331790819055600160a060020a031681527fa5e220c2c27d986cc8efeafa8f34ba6ea6bf96a34e146b29b6bdd8587771b13090602090a16129ba8061008e6000396000f3fe6080604052600436106100aa5763ffffffff60e060020a60003504166247e60381146100af5780630de1f333146100b957806327dc297e146100e057806338bbfa50146101995780633a722fbf146102d85780638da5cb5b146102e0578063a454aaa614610311578063a6f9dae114610326578063c0ee0b8a14610359578063d32aab0a14610434578063e69e04b314610449578063f6458c381461045e578063f6b8f56e146104c1575b600080fd5b6100b76104f1565b005b3480156100c557600080fd5b506100ce610b15565b60405190815260200160405180910390f35b3480156100ec57600080fd5b506100b76004803603604081101561010357600080fd5b8135919081019060408101602082013564010000000081111561012557600080fd5b82018360208201111561013757600080fd5b8035906020019184600183028401116401000000008311171561015957600080fd5b91908080601f0160208091040260200160405190810160405281815292919060208401838380828437600092019190915250929550610b1b945050505050565b3480156101a557600080fd5b506100b7600480360360608110156101bc57600080fd5b813591908101906040810160208201356401000000008111156101de57600080fd5b8201836020820111156101f057600080fd5b8035906020019184600183028401116401000000008311171561021257600080fd5b91908080601f0160208091040260200160405190810160405281815292919060208401838380828437600092019190915250929594936020810193503591505064010000000081111561026457600080fd5b82018360208201111561027657600080fd5b8035906020019184600183028401116401000000008311171561029857600080fd5b91908080601f0160208091040260200160405190810160405281815292919060208401838380828437600092019190915250929550610b56945050505050565b6100b7610d84565b3480156102ec57600080fd5b506102f5610e0c565b604051600160a060020a03909116815260200160405180910390f35b34801561031d57600080fd5b506100ce610e1b565b34801561033257600080fd5b506100b76004803603602081101561034957600080fd5b5035600160a060020a0316610e21565b34801561036557600080fd5b506104206004803603606081101561037c57600080fd5b600160a060020a03823516916020810135918101906060810160408201356401000000008111156103ac57600080fd5b8201836020820111156103be57600080fd5b803590602001918460018302840111640100000000831117156103e057600080fd5b91908080601f0160208091040260200160405190810160405281815292919060208401838380828437600092019190915250929550610e9a945050505050565b604051901515815260200160405180910390f35b34801561044057600080fd5b506100ce610ea4565b34801561045557600080fd5b506100ce610eaa565b34801561046a57600080fd5b506104886004803603602081101561048157600080fd5b5035610eb0565b60405194855260208501939093526040808501929092526060840152600160a060020a03909116608083015260a0909101905180910390f35b3480156104cd57600080fd5b506100b7600480360360408110156104e457600080fd5b5080359060200135610ee8565b600a546000908152600b602052604090206001015442111561090f57600a546000908152600b602052604081206003015411156106ef57303161056660408051908101604052600681527f52616e646f6d00000000000000000000000000000000000000000000000000006020820152610f0a565b1115610622577f621c2856e3b87f81235f8ac8a22bbb40a0142961960710d00b2b6c380902b57e6040516020808252604b908201527f4f7261636c697a6520717565727920776173204e4f542073656e742c20706c656040808301919091527f6173652061646420736f6d652045544820746f20636f76657220666f7220746860608301527f6520717565727920666565000000000000000000000000000000000000000000608083015260a0909101905180910390a16106ea565b600a8054600101908190556000908152600b60205242906040902055600754600a546000908152600b60205242909101906040902060010155600854600a546000908152600b602052604090206002015561069c7f300000000000000000000000000000000000000000000000000000000000000061114c565b60046000622dc6c0816106b081858461132b565b90507fe10552bc767c10657276123c43d13cdf6ec3778967d00987b7c87018a7afaa798160405190815260200160405180910390a1505050505b61090a565b600a546000908152600b60205242906040902055600754600a546000908152600b60205242909101906040902060010155600854600a546000908152600b6020526040902060020155600554600a546000908152600b602052600160a060020a03909116906323b872dd9033903090604090206002015460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1580156107b657600080fd5b505af11580156107ca573d6000803e3d6000fd5b505050506040513d60208110156107e057600080fd5b8101908080515050600a546000908152600b60205260019250604091502033600090815260069190910160205260409020805460ff1916911515919091179055600a546000908152600b6020526040902060030180546001019055600a546000908152600b6020523390604090206005016000600b6000600a5481526020019081526020016000206003015481526020019081526020016000208054600160a060020a031916600160a060020a0392909216919091179055600a546000908152600b6020527f4fc8b7989978ba2b51de1844d4265a4343c97ae14b613ad8dfa114e9cb7c22f89033906040902060030154600a546040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a15b610b13565b600a546000908152600b60205260409020336000908152600691909101602052604090205460ff161561094157600080fd5b600554600a546000908152600b602052600160a060020a03909116906323b872dd9033903090604090206002015460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1580156109bf57600080fd5b505af11580156109d3573d6000803e3d6000fd5b505050506040513d60208110156109e957600080fd5b8101908080515050600a546000908152600b60205260019250604091502033600090815260069190910160205260409020805460ff1916911515919091179055600a546000908152600b6020526040902060030180546001019055600a546000908152600b6020523390604090206005016000600b6000600a5481526020019081526020016000206003015481526020019081526020016000208054600160a060020a031916600160a060020a0392909216919091179055600a546000908152600b6020527f4fc8b7989978ba2b51de1844d4265a4343c97ae14b613ad8dfa114e9cb7c22f89033906040902060030154600a546040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390a15b565b600a5481565b610b5282826000604051818152601f19601f8301168101602001604052908015610b4c576020820181803883390190505b50610b56565b5050565b610b5e611857565b600160a060020a03163314610b7257600080fd5b6009546000908152600b60205260408120600301549050600081846040516020018082805190602001908083835b60208310610bbf5780518252601f199092019160209182019101610ba0565b6001836020036101000a038019825116818451161790925250505091909101925060409150505160208183030381529060405280519060200120811515610c0257fe5b0660010190506000600b60006009548152602001908152602001600020600201546009546000908152600b60205260409020600301546009546000908152600b6020529102915060408120600084815260059190910160205260409020546009546000908152600b602052600160a060020a0390911691508190604090206004018054600160a060020a031916600160a060020a039283161790556005541663a9059cbb828460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b158015610cec57600080fd5b505af1158015610d00573d6000803e3d6000fd5b505050506040513d6020811015610d1657600080fd5b810190808051507fc08a5a603ad95338d0cc5a5761af2293bfca656eb2fbdba2e2d878d5bd508420925085915083905084604051928352600160a060020a0390911660208301526040808301919091526060909101905180910390a150506009805460010190555050505050565b600954600a5411610d9457600080fd5b610dbd7f300000000000000000000000000000000000000000000000000000000000000061114c565b6004600062030d4081610dd181858461132b565b90507fe10552bc767c10657276123c43d13cdf6ec3778967d00987b7c87018a7afaa798160405190815260200160405180910390a150505050565b600654600160a060020a031681565b60075481565b600654600160a060020a03163314610e3857600080fd5b60068054600160a060020a031916600160a060020a0383811691909117918290557fa5e220c2c27d986cc8efeafa8f34ba6ea6bf96a34e146b29b6bdd8587771b1309116604051600160a060020a03909116815260200160405180910390a150565b60015b9392505050565b60095481565b60085481565b600b602052806000526040600020805460018201546002830154600384015460049094015492945090929091600160a060020a031685565b600654600160a060020a03163314610eff57600080fd5b600791909155600855565b600154600090600160a060020a03161580610f375750600154610f3590600160a060020a0316611a2a565b155b15610f4857610f466000611a2e565b505b600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610f8857600080fd5b505af1158015610f9c573d6000803e3d6000fd5b505050506040513d6020811015610fb257600080fd5b810190808051600054600160a060020a03908116911614925061106691505057600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b505050506040513d602081101561103c57600080fd5b81019080805160008054600160a060020a031916600160a060020a03929092169190911790555050505b600054600160a060020a031663524f3889836040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156110c75780820151838201526020016110af565b50505050905090810190601f1680156110f45780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561111357600080fd5b505af1158015611127573d6000803e3d6000fd5b505050506040513d602081101561113d57600080fd5b81019080805195945050505050565b600154600160a060020a03161580611176575060015461117490600160a060020a0316611a2a565b155b15611187576111856000611a2e565b505b600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156111c757600080fd5b505af11580156111db573d6000803e3d6000fd5b505050506040513d60208110156111f157600080fd5b810190808051600054600160a060020a0390811691161492506112a591505057600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561125157600080fd5b505af1158015611265573d6000803e3d6000fd5b505050506040513d602081101561127b57600080fd5b81019080805160008054600160a060020a031916600160a060020a03929092169190911790555050505b600054600160a060020a031663688dcfd78260405160e060020a63ffffffff84160281527fff000000000000000000000000000000000000000000000000000000000000009091166004820152602401600060405180830381600087803b15801561130f57600080fd5b505af1158015611323573d6000803e3d6000fd5b505050505b50565b6000808311801561133d575060208311155b151561134857600080fd5b600a8402935060606001604051818152601f19601f830116810160200160405290801561137c576020820181803883390190505b509050837f010000000000000000000000000000000000000000000000000000000000000002816000815181106113af57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060606020604051818152601f19601f830116810160200160405290801561140d576020820181803883390190505b50905060606020604051818152601f19601f830116810160200160405290801561143e576020820181803883390190505b509050600061144b611a3e565b90506020835242411860014303401860208401526020825280602083015260606020604051818152601f19601f8301168101602001604052908015611497576020820181803883390190505b50905088602082015260606008604051818152601f19601f83011681016020016040529080156114ce576020820181803883390190505b5090506114e18260186008846000611bd8565b506114ea6128b7565b608060405190810160405280878152602001888152602001868152602001848152509050600061154e60408051908101604052600681527f72616e646f6d00000000000000000000000000000000000000000000000000006020820152838c611c22565b905060606008604051818152601f19601f830116810160200160405290801561157e576020820181803883390190505b50905060208401517f0100000000000000000000000000000000000000000000000000000000000000810460278301537e01000000000000000000000000000000000000000000000000000000000000810460268301537d0100000000000000000000000000000000000000000000000000000000008104602583015360e060020a810460248301537b01000000000000000000000000000000000000000000000000000000810460238301537a01000000000000000000000000000000000000000000000000000081046022830153790100000000000000000000000000000000000000000000000000810460218301537801000000000000000000000000000000000000000000000000810460208301535061184782826020860151600287516040518082805190602001908083835b602083106116cf5780518252601f1990920191602091820191016116b0565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015611711573d6000803e3d6000fd5b5050506040513d602081101561172657600080fd5b8101908080519250505060408801516040516020018085805190602001908083835b602083106117675780518252601f199092019160209182019101611748565b6001836020036101000a038019825116818451161790925250505091909101905084805190602001908083835b602083106117b35780518252601f199092019160209182019101611794565b6001836020036101000a038019825116818451161790925250505091909101848152602001905082805190602001908083835b602083106118055780518252601f1990920191602091820191016117e6565b6001836020036101000a038019825116818451161790925250505091909101955060409450505050505160208183030381529060405280519060200120611e3e565b509b9a5050505050505050505050565b600154600090600160a060020a03161580611884575060015461188290600160a060020a0316611a2a565b155b15611895576118936000611a2e565b505b600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156118d557600080fd5b505af11580156118e9573d6000803e3d6000fd5b505050506040513d60208110156118ff57600080fd5b810190808051600054600160a060020a0390811691161492506119b391505057600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561195f57600080fd5b505af1158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b81019080805160008054600160a060020a031916600160a060020a03929092169190911790555050505b600054600160a060020a031663c281d19e6040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156119f157600080fd5b505afa158015611a05573d6000803e3d6000fd5b505050506040513d6020811015611a1b57600080fd5b81019080805193505050505b90565b3b90565b6000611a38611e53565b92915050565b600154600090600160a060020a03161580611a6b5750600154611a6990600160a060020a0316611a2a565b155b15611a7c57611a7a6000611a2e565b505b600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611abc57600080fd5b505af1158015611ad0573d6000803e3d6000fd5b505050506040513d6020811015611ae657600080fd5b810190808051600054600160a060020a039081169116149250611b9a91505057600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611b4657600080fd5b505af1158015611b5a573d6000803e3d6000fd5b505050506040513d6020811015611b7057600080fd5b81019080805160008054600160a060020a031916600160a060020a03929092169190911790555050505b600054600160a060020a031663abaa5f3e6040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156119f157600080fd5b60608382018084511015611beb57600080fd5b60208087019084015b868860200101821015611c1557818901518682015260209182019101611bf4565b5093979650505050505050565b600154600090600160a060020a03161580611c4f5750600154611c4d90600160a060020a0316611a2a565b155b15611c6057611c5e6000611a2e565b505b600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611ca057600080fd5b505af1158015611cb4573d6000803e3d6000fd5b505050506040513d6020811015611cca57600080fd5b810190808051600054600160a060020a039081169116149250611d7e91505057600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611d2a57600080fd5b505af1158015611d3e573d6000803e3d6000fd5b505050506040513d6020811015611d5457600080fd5b81019080805160008054600160a060020a031916600160a060020a03929092169190911790555050505b60606004604051908082528060200260200182016040528015611db557816020015b6060815260200190600190039081611da05790505b509050835181600081518110611dc757fe5b60209081029091010152836001602002015181600181518110611de657fe5b6020908102919091010152604084015181600281518110611e0357fe5b6020908102919091010152606084015181600381518110611e2057fe5b60209081029091010152611e35858285612171565b95945050505050565b60008281526003602052819060409020555050565b600080611e73731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed611a2a565b1115611ee35760018054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed179055611edb60408051908101604052600b81527f6574685f6d61696e6e6574000000000000000000000000000000000000000000602082015261254e565b506001611a27565b6000611f0273c03a2615d5efaf5f49f60b7bb6583eaec212fdf1611a2a565b1115611f6a5760018054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf1179055611edb60408051908101604052600c81527f6574685f726f707374656e330000000000000000000000000000000000000000602082015261254e565b6000611f8973b7a07bcf2ba2f2703b24c0691b5278999c59ac7e611a2a565b1115611ff15760018054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e179055611edb60408051908101604052600981527f6574685f6b6f76616e0000000000000000000000000000000000000000000000602082015261254e565b600061201073146500cfd35b22e4a392fe0adc06de1a1368ed48611a2a565b11156120785760018054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed48179055611edb60408051908101604052600b81527f6574685f72696e6b656279000000000000000000000000000000000000000000602082015261254e565b6000612097736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475611a2a565b11156120c9575060018054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475178155611a27565b60006120e87320e12a1f859b3feae5fb2a0a32c18f5a65555bbf611a2a565b111561211a575060018054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf178155611a27565b60006121397351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa611a2a565b111561216b575060018054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa178155611a27565b50600090565b600154600090600160a060020a0316158061219e575060015461219c90600160a060020a0316611a2a565b155b156121af576121ad6000611a2e565b505b600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156121ef57600080fd5b505af1158015612203573d6000803e3d6000fd5b505050506040513d602081101561221957600080fd5b810190808051600054600160a060020a0390811691161492506122cd91505057600154600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561227957600080fd5b505af115801561228d573d6000803e3d6000fd5b505050506040513d60208110156122a357600080fd5b81019080805160008054600160a060020a031916600160a060020a03929092169190911790555050505b60008054600160a060020a0316632ef3accc86856040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561233657808201518382015260200161231e565b50505050905090810190601f1680156123635780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561238357600080fd5b505af1158015612397573d6000803e3d6000fd5b505050506040513d60208110156123ad57600080fd5b8101908080519350505050670de0b6b3a76400003a8402018111156123d6575060009050610e9d565b60606123e185612561565b60008054919250600160a060020a039091169063c55c1cb69084908985896040518663ffffffff1660e060020a028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561245e578082015183820152602001612446565b50505050905090810190601f16801561248b5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156124c15780820151838201526020016124a9565b50505050905090810190601f1680156124ee5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b15801561251057600080fd5b505af1158015612524573d6000803e3d6000fd5b50505050506040513d602081101561253b57600080fd5b8101908080519998505050505050505050565b6002818051610b529291602001906128de565b606061256b6125d5565b61257361295c565b61257f816104006125e1565b6125888161260f565b60005b83518110156125c2576125ba8482815181106125a357fe5b90602001906020020151839063ffffffff61261a16565b60010161258b565b506125cc8161263c565b80519392505050565b60405180590338823950565b8060208106156125f45760208106602003015b60208301819052604051928390526000835290910160405250565b611328816004612643565b612627826002835161265c565b612637828263ffffffff61276016565b505050565b6113288160075b610b5282601f602060ff8516021763ffffffff6127f916565b6017811161267d576126788360ff8481166020021683176127f9565b612637565b60ff81116126b65761269e836018602060ff8616021763ffffffff6127f916565b6126b08382600163ffffffff61283216565b50612637565b61ffff81116126ea576126d8836019602060ff8616021763ffffffff6127f916565b6126b08382600263ffffffff61283216565b63ffffffff81116127205761270e83601a602060ff8616021763ffffffff6127f916565b6126b08382600463ffffffff61283216565b67ffffffffffffffff81116126375761274883601b602060ff8616021763ffffffff6127f916565b61275a8382600863ffffffff61283216565b50505050565b61276861295c565b82602001518351518351011115612794576127948361278c85602001518551612886565b60020261289d565b60008060008451905085518051602081830101945086510190526020850191505b602081106127d557815183526020928301929190910190601f19016127b5565b60001960208290036101000a01801983511681855116179093525093949350505050565b8160200151825151600101111561281b5761281b82836020015160020261289d565b815180516020818301018381535060010190525050565b61283a61295c565b83602001518451518301111561285c5761285c8461278c866020015185612886565b60001961010083900a01845180518481830101868419825116179052909301909252509192915050565b600081831115612897575081611a38565b50919050565b6060825190506128ad83836125e1565b61275a8382612760565b60806040519081016040526004815b60608152602001906001900390816128c65790505090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061291f57805160ff191683800117855561294c565b8280016001018555821561294c579182015b8281111561294c578251825591602001919060010190612931565b50612958929150612974565b5090565b60408051908101604052606081526000602082015290565b611a2791905b80821115612958576000815560010161297a56fea165627a7a7230582001ddc364b14099af4d26bf9767576e521116d98976c85d7e263ec6bbf035b3d40029

   Swarm Source:
bzzr://01ddc364b14099af4d26bf9767576e521116d98976c85d7e263ec6bbf035b3d4

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward