ETH Price: $3,380.85 (+5.93%)
Gas: 24 Gwei

Contract

0x549C10ceDeF9e3ca44D0DE02f2E7E4C77C878F81
 

Overview

ETH Balance

11 wei

Eth Value

Less Than $0.01 (@ $3,380.85/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Bet68354432018-12-06 7:57:142048 days ago1544083034IN
0x549C10ce...77C878F81
0.1 ETH0.0014614665
Bet60326052018-07-26 9:17:182181 days ago1532596638IN
0x549C10ce...77C878F81
0.04 ETH0.000224210
Bet60326052018-07-26 9:17:182181 days ago1532596638IN
0x549C10ce...77C878F81
0.037 ETH0.000896840
Bet60326052018-07-26 9:17:182181 days ago1532596638IN
0x549C10ce...77C878F81
0.035 ETH0.00092442
Bet60326052018-07-26 9:17:182181 days ago1532596638IN
0x549C10ce...77C878F81
0.035 ETH0.000896840
Bet60326032018-07-26 9:16:402181 days ago1532596600IN
0x549C10ce...77C878F81
0.035 ETH0.000896840
Bet60122642018-07-22 22:02:452184 days ago1532296965IN
0x549C10ce...77C878F81
0.031 ETH0.000022421
Bet59950962018-07-20 0:38:292187 days ago1532047109IN
0x549C10ce...77C878F81
0.031 ETH0.000022421
Bet59777952018-07-17 1:09:062190 days ago1531789746IN
0x549C10ce...77C878F81
0.06 ETH0.000896840
Bet59777952018-07-17 1:09:062190 days ago1531789746IN
0x549C10ce...77C878F81
0.066 ETH0.000024661.1
Collect59740752018-07-16 9:52:532191 days ago1531734773IN
0x549C10ce...77C878F81
0 ETH0.001221420
Collect59737712018-07-16 8:34:002191 days ago1531730040IN
0x549C10ce...77C878F81
0 ETH0.000610710
Collect59735382018-07-16 7:35:412191 days ago1531726541IN
0x549C10ce...77C878F81
0 ETH0.000610710
Collect59728662018-07-16 4:52:312191 days ago1531716751IN
0x549C10ce...77C878F81
0 ETH0.000549639
Collect59724212018-07-16 2:58:242191 days ago1531709904IN
0x549C10ce...77C878F81
0 ETH0.000610710
Collect59723312018-07-16 2:38:372191 days ago1531708717IN
0x549C10ce...77C878F81
0 ETH0.000610710
Collect59723302018-07-16 2:38:072191 days ago1531708687IN
0x549C10ce...77C878F81
0 ETH0.000610710
Collect59721322018-07-16 1:49:582191 days ago1531705798IN
0x549C10ce...77C878F81
0 ETH0.000427497
Collect59719052018-07-16 0:58:172191 days ago1531702697IN
0x549C10ce...77C878F81
0 ETH0.000366426
Collect59716222018-07-15 23:52:202191 days ago1531698740IN
0x549C10ce...77C878F81
0 ETH0.000610710
Collect59714682018-07-15 23:16:032191 days ago1531696563IN
0x549C10ce...77C878F81
0 ETH0.0009160515
Bet59713432018-07-15 22:43:292191 days ago1531694609IN
0x549C10ce...77C878F81
0.5 ETH0.00329574147
Bet59713072018-07-15 22:34:172191 days ago1531694057IN
0x549C10ce...77C878F81
0.1 ETH0.0011017149
Bet59713072018-07-15 22:34:172191 days ago1531694057IN
0x549C10ce...77C878F81
0.1 ETH0.0004496820
Bet59713072018-07-15 22:34:172191 days ago1531694057IN
0x549C10ce...77C878F81
0.1 ETH0.0011017149
View all transactions

Latest 24 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
59740752018-07-16 9:52:532191 days ago1531734773
0x549C10ce...77C878F81
0.0292958 ETH
59737712018-07-16 8:34:002191 days ago1531730040
0x549C10ce...77C878F81
0.35447924 ETH
59735382018-07-16 7:35:412191 days ago1531726541
0x549C10ce...77C878F81
0.11710998 ETH
59728662018-07-16 4:52:312191 days ago1531716751
0x549C10ce...77C878F81
0.10253531 ETH
59724212018-07-16 2:58:242191 days ago1531709904
0x549C10ce...77C878F81
0.71774722 ETH
59723312018-07-16 2:38:372191 days ago1531708717
0x549C10ce...77C878F81
1.46479025 ETH
59723302018-07-16 2:38:072191 days ago1531708687
0x549C10ce...77C878F81
0.31932427 ETH
59721322018-07-16 1:49:582191 days ago1531705798
0x549C10ce...77C878F81
1.46479025 ETH
59719052018-07-16 0:58:172191 days ago1531702697
0x549C10ce...77C878F81
0.29295805 ETH
59716222018-07-15 23:52:202191 days ago1531698740
0x549C10ce...77C878F81
0.06578247 ETH
59714682018-07-15 23:16:032191 days ago1531696563
0x549C10ce...77C878F81
0.13183112 ETH
59712072018-07-15 22:13:192191 days ago1531692799
0x549C10ce...77C878F81
0.67856408 ETH
59711552018-07-15 22:02:182191 days ago1531692138
0x549C10ce...77C878F81
0.26366224 ETH
59711282018-07-15 21:55:002191 days ago1531691700
0x549C10ce...77C878F81
1.46479025 ETH
59710072018-07-15 21:28:122191 days ago1531690092
0x549C10ce...77C878F81
0.20507063 ETH
59707452018-07-15 20:25:192191 days ago1531686319
0x549C10ce...77C878F81
0.0292958 ETH
59706512018-07-15 20:03:502191 days ago1531685030
0x549C10ce...77C878F81
0.14647902 ETH
59705072018-07-15 19:27:572191 days ago1531682877
0x549C10ce...77C878F81
0.73239512 ETH
59704642018-07-15 19:17:292191 days ago1531682249
0x549C10ce...77C878F81
6.63549984 ETH
59704382018-07-15 19:09:232191 days ago1531681763
0x549C10ce...77C878F81
0.27831014 ETH
59704362018-07-15 19:09:142191 days ago1531681754
0x549C10ce...77C878F81
0.6298598 ETH
59704132018-07-15 19:04:462191 days ago1531681486
0x549C10ce...77C878F81
0.0146479 ETH
59704082018-07-15 19:03:482191 days ago1531681428
0x549C10ce...77C878F81
0.14647902 ETH
59704072018-07-15 19:03:292191 days ago1531681409
0x549C10ce...77C878F81
1.46479025 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FrancevsCroatia

Compiler Version
v0.4.20+commit.3155dd80

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-07-13
*/

pragma solidity ^0.4.11;

// <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.4.0;//please import oraclizeAPI_pre0.4.sol when solidity < 0.4.0

contract OraclizeI {
    address public cbAddress;
    function query(uint _timestamp, string _datasource, string _arg) payable returns (bytes32 _id);
    function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) payable returns (bytes32 _id);
    function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) payable returns (bytes32 _id);
    function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) payable returns (bytes32 _id);
    function queryN(uint _timestamp, string _datasource, bytes _argN) payable returns (bytes32 _id);
    function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) payable returns (bytes32 _id);
    function getPrice(string _datasource) returns (uint _dsprice);
    function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice);
    function useCoupon(string _coupon);
    function setProofType(byte _proofType);
    function setConfig(bytes32 _config);
    function setCustomGasPrice(uint _gasPrice);
    function randomDS_getSessionPubKeyHash() returns(bytes32);
}
contract OraclizeAddrResolverI {
    function getAddress() returns (address _addr);
}
contract usingOraclize {
    uint constant day = 60*60*24;
    uint constant week = 60*60*24*7;
    uint constant month = 60*60*24*30;
    byte constant proofType_NONE = 0x00;
    byte constant proofType_TLSNotary = 0x10;
    byte constant proofType_Android = 0x20;
    byte constant proofType_Ledger = 0x30;
    byte constant proofType_Native = 0xF0;
    byte constant proofStorage_IPFS = 0x01;
    uint8 constant networkID_auto = 0;
    uint8 constant networkID_mainnet = 1;
    uint8 constant networkID_testnet = 2;
    uint8 constant networkID_morden = 2;
    uint8 constant networkID_consensys = 161;

    OraclizeAddrResolverI OAR;

    OraclizeI oraclize;
    modifier oraclizeAPI {
        if((address(OAR)==0)||(getCodeSize(address(OAR))==0))
            oraclize_setNetwork(networkID_auto);

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

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

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

    function __callback(bytes32 myid, string result) {
        __callback(myid, result, new bytes(0));
    }
    function __callback(bytes32 myid, string result, bytes proof) {
    }

    function oraclize_useCoupon(string code) oraclizeAPI internal {
        oraclize.useCoupon(code);
    }

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

    function oraclize_getPrice(string datasource, uint gaslimit) oraclizeAPI internal returns (uint){
        return oraclize.getPrice(datasource, gaslimit);
    }

    function oraclize_query(string datasource, string arg) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query.value(price)(0, datasource, arg);
    }
    function oraclize_query(uint timestamp, string datasource, string arg) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query.value(price)(timestamp, datasource, arg);
    }
    function oraclize_query(uint timestamp, string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query_withGasLimit.value(price)(timestamp, datasource, arg, gaslimit);
    }
    function oraclize_query(string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query_withGasLimit.value(price)(0, datasource, arg, gaslimit);
    }
    function oraclize_query(string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query2.value(price)(0, datasource, arg1, arg2);
    }
    function oraclize_query(uint timestamp, string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        return oraclize.query2.value(price)(timestamp, datasource, arg1, arg2);
    }
    function oraclize_query(uint timestamp, string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query2_withGasLimit.value(price)(timestamp, datasource, arg1, arg2, gaslimit);
    }
    function oraclize_query(string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        return oraclize.query2_withGasLimit.value(price)(0, datasource, arg1, arg2, gaslimit);
    }
    function oraclize_query(string datasource, string[] argN) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        bytes memory args = stra2cbor(argN);
        return oraclize.queryN.value(price)(0, datasource, args);
    }
    function oraclize_query(uint timestamp, string datasource, string[] argN) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        bytes memory args = stra2cbor(argN);
        return oraclize.queryN.value(price)(timestamp, datasource, args);
    }
    function oraclize_query(uint timestamp, string datasource, string[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        bytes memory args = stra2cbor(argN);
        return oraclize.queryN_withGasLimit.value(price)(timestamp, datasource, args, gaslimit);
    }
    function oraclize_query(string datasource, string[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        bytes memory args = stra2cbor(argN);
        return oraclize.queryN_withGasLimit.value(price)(0, datasource, args, gaslimit);
    }
    function oraclize_query(string datasource, string[1] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](1);
        dynargs[0] = args[0];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[1] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](1);
        dynargs[0] = args[0];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](1);
        dynargs[0] = args[0];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](1);
        dynargs[0] = args[0];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_query(string datasource, string[2] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[2] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[3] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[3] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_query(string datasource, string[4] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[4] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[5] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[5] args) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, string[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, string[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        string[] memory dynargs = new string[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[] argN) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        bytes memory args = ba2cbor(argN);
        return oraclize.queryN.value(price)(0, datasource, args);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[] argN) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource);
        if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
        bytes memory args = ba2cbor(argN);
        return oraclize.queryN.value(price)(timestamp, datasource, args);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        bytes memory args = ba2cbor(argN);
        return oraclize.queryN_withGasLimit.value(price)(timestamp, datasource, args, gaslimit);
    }
    function oraclize_query(string datasource, bytes[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
        uint price = oraclize.getPrice(datasource, gaslimit);
        if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
        bytes memory args = ba2cbor(argN);
        return oraclize.queryN_withGasLimit.value(price)(0, datasource, args, gaslimit);
    }
    function oraclize_query(string datasource, bytes[1] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](1);
        dynargs[0] = args[0];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[1] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](1);
        dynargs[0] = args[0];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](1);
        dynargs[0] = args[0];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](1);
        dynargs[0] = args[0];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_query(string datasource, bytes[2] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[2] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](2);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[3] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[3] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](3);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_query(string datasource, bytes[4] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[4] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](4);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        return oraclize_query(datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[5] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[5] args) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(timestamp, datasource, dynargs);
    }
    function oraclize_query(uint timestamp, string datasource, bytes[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(timestamp, datasource, dynargs, gaslimit);
    }
    function oraclize_query(string datasource, bytes[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) {
        bytes[] memory dynargs = new bytes[](5);
        dynargs[0] = args[0];
        dynargs[1] = args[1];
        dynargs[2] = args[2];
        dynargs[3] = args[3];
        dynargs[4] = args[4];
        return oraclize_query(datasource, dynargs, gaslimit);
    }

    function oraclize_cbAddress() oraclizeAPI internal returns (address){
        return oraclize.cbAddress();
    }
    function oraclize_setProof(byte proofP) oraclizeAPI internal {
        return oraclize.setProofType(proofP);
    }
    function oraclize_setCustomGasPrice(uint gasPrice) oraclizeAPI internal {
        return oraclize.setCustomGasPrice(gasPrice);
    }
    function oraclize_setConfig(bytes32 config) oraclizeAPI internal {
        return oraclize.setConfig(config);
    }

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

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

    function parseAddr(string _a) internal returns (address){
        bytes memory tmp = bytes(_a);
        uint160 iaddr = 0;
        uint160 b1;
        uint160 b2;
        for (uint i=2; i<2+2*20; i+=2){
            iaddr *= 256;
            b1 = uint160(tmp[i]);
            b2 = uint160(tmp[i+1]);
            if ((b1 >= 97)&&(b1 <= 102)) b1 -= 87;
            else if ((b1 >= 65)&&(b1 <= 70)) b1 -= 55;
            else if ((b1 >= 48)&&(b1 <= 57)) b1 -= 48;
            if ((b2 >= 97)&&(b2 <= 102)) b2 -= 87;
            else if ((b2 >= 65)&&(b2 <= 70)) b2 -= 55;
            else if ((b2 >= 48)&&(b2 <= 57)) b2 -= 48;
            iaddr += (b1*16+b2);
        }
        return address(iaddr);
    }

    function strCompare(string _a, string _b) internal returns (int) {
        bytes memory a = bytes(_a);
        bytes memory b = bytes(_b);
        uint minLength = a.length;
        if (b.length < minLength) minLength = b.length;
        for (uint i = 0; i < minLength; i ++)
            if (a[i] < b[i])
                return -1;
            else if (a[i] > b[i])
                return 1;
        if (a.length < b.length)
            return -1;
        else if (a.length > b.length)
            return 1;
        else
            return 0;
    }

    function indexOf(string _haystack, string _needle) internal returns (int) {
        bytes memory h = bytes(_haystack);
        bytes memory n = bytes(_needle);
        if(h.length < 1 || n.length < 1 || (n.length > h.length))
            return -1;
        else if(h.length > (2**128 -1))
            return -1;
        else
        {
            uint subindex = 0;
            for (uint i = 0; i < h.length; i ++)
            {
                if (h[i] == n[0])
                {
                    subindex = 1;
                    while(subindex < n.length && (i + subindex) < h.length && h[i + subindex] == n[subindex])
                    {
                        subindex++;
                    }
                    if(subindex == n.length)
                        return int(i);
                }
            }
            return -1;
        }
    }

    function strConcat(string _a, string _b, string _c, string _d, string _e) internal returns (string) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory _bc = bytes(_c);
        bytes memory _bd = bytes(_d);
        bytes memory _be = bytes(_e);
        string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);
        bytes memory babcde = bytes(abcde);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
        for (i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
        for (i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
        for (i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
        for (i = 0; i < _be.length; i++) babcde[k++] = _be[i];
        return string(babcde);
    }

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

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

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

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

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

    function uint2str(uint i) internal returns (string){
        if (i == 0) return "0";
        uint j = i;
        uint len;
        while (j != 0){
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (i != 0){
            bstr[k--] = byte(48 + i % 10);
            i /= 10;
        }
        return string(bstr);
    }

    function stra2cbor(string[] arr) internal returns (bytes) {
            uint arrlen = arr.length;

            // get correct cbor output length
            uint outputlen = 0;
            bytes[] memory elemArray = new bytes[](arrlen);
            for (uint i = 0; i < arrlen; i++) {
                elemArray[i] = (bytes(arr[i]));
                outputlen += elemArray[i].length + (elemArray[i].length - 1)/23 + 3; //+3 accounts for paired identifier types
            }
            uint ctr = 0;
            uint cborlen = arrlen + 0x80;
            outputlen += byte(cborlen).length;
            bytes memory res = new bytes(outputlen);

            while (byte(cborlen).length > ctr) {
                res[ctr] = byte(cborlen)[ctr];
                ctr++;
            }
            for (i = 0; i < arrlen; i++) {
                res[ctr] = 0x5F;
                ctr++;
                for (uint x = 0; x < elemArray[i].length; x++) {
                    // if there's a bug with larger strings, this may be the culprit
                    if (x % 23 == 0) {
                        uint elemcborlen = elemArray[i].length - x >= 24 ? 23 : elemArray[i].length - x;
                        elemcborlen += 0x40;
                        uint lctr = ctr;
                        while (byte(elemcborlen).length > ctr - lctr) {
                            res[ctr] = byte(elemcborlen)[ctr - lctr];
                            ctr++;
                        }
                    }
                    res[ctr] = elemArray[i][x];
                    ctr++;
                }
                res[ctr] = 0xFF;
                ctr++;
            }
            return res;
        }

    function ba2cbor(bytes[] arr) internal returns (bytes) {
            uint arrlen = arr.length;

            // get correct cbor output length
            uint outputlen = 0;
            bytes[] memory elemArray = new bytes[](arrlen);
            for (uint i = 0; i < arrlen; i++) {
                elemArray[i] = (bytes(arr[i]));
                outputlen += elemArray[i].length + (elemArray[i].length - 1)/23 + 3; //+3 accounts for paired identifier types
            }
            uint ctr = 0;
            uint cborlen = arrlen + 0x80;
            outputlen += byte(cborlen).length;
            bytes memory res = new bytes(outputlen);

            while (byte(cborlen).length > ctr) {
                res[ctr] = byte(cborlen)[ctr];
                ctr++;
            }
            for (i = 0; i < arrlen; i++) {
                res[ctr] = 0x5F;
                ctr++;
                for (uint x = 0; x < elemArray[i].length; x++) {
                    // if there's a bug with larger strings, this may be the culprit
                    if (x % 23 == 0) {
                        uint elemcborlen = elemArray[i].length - x >= 24 ? 23 : elemArray[i].length - x;
                        elemcborlen += 0x40;
                        uint lctr = ctr;
                        while (byte(elemcborlen).length > ctr - lctr) {
                            res[ctr] = byte(elemcborlen)[ctr - lctr];
                            ctr++;
                        }
                    }
                    res[ctr] = elemArray[i][x];
                    ctr++;
                }
                res[ctr] = 0xFF;
                ctr++;
            }
            return res;
        }


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

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

    function oraclize_newRandomDSQuery(uint _delay, uint _nbytes, uint _customGasLimit) internal returns (bytes32){
        if ((_nbytes == 0)||(_nbytes > 32)) throw;
        bytes memory nbytes = new bytes(1);
        nbytes[0] = byte(_nbytes);
        bytes memory unonce = new bytes(32);
        bytes memory sessionKeyHash = new bytes(32);
        bytes32 sessionKeyHash_bytes32 = oraclize_randomDS_getSessionPubKeyHash();
        assembly {
            mstore(unonce, 0x20)
            mstore(add(unonce, 0x20), xor(blockhash(sub(number, 1)), xor(coinbase, timestamp)))
            mstore(sessionKeyHash, 0x20)
            mstore(add(sessionKeyHash, 0x20), sessionKeyHash_bytes32)
        }
        bytes[3] memory args = [unonce, nbytes, sessionKeyHash];
        bytes32 queryId = oraclize_query(_delay, "random", args, _customGasLimit);
        oraclize_randomDS_setCommitment(queryId, sha3(bytes8(_delay), args[1], sha256(args[0]), args[2]));
        return queryId;
    }

    function oraclize_randomDS_setCommitment(bytes32 queryId, bytes32 commitment) internal {
        oraclize_randomDS_args[queryId] = commitment;
    }

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

    function verifySig(bytes32 tosignh, bytes dersig, bytes pubkey) internal returns (bool){
        bool sigok;
        address signer;

        bytes32 sigr;
        bytes32 sigs;

        bytes memory sigr_ = new bytes(32);
        uint offset = 4+(uint(dersig[3]) - 0x20);
        sigr_ = copyBytes(dersig, offset, 32, sigr_, 0);
        bytes memory sigs_ = new bytes(32);
        offset += 32 + 2;
        sigs_ = copyBytes(dersig, offset+(uint(dersig[offset-1]) - 0x20), 32, sigs_, 0);

        assembly {
            sigr := mload(add(sigr_, 32))
            sigs := mload(add(sigs_, 32))
        }


        (sigok, signer) = safer_ecrecover(tosignh, 27, sigr, sigs);
        if (address(sha3(pubkey)) == signer) return true;
        else {
            (sigok, signer) = safer_ecrecover(tosignh, 28, sigr, sigs);
            return (address(sha3(pubkey)) == signer);
        }
    }

    function oraclize_randomDS_proofVerify__sessionKeyValidity(bytes proof, uint sig2offset) internal returns (bool) {
        bool sigok;

        // Step 6: verify the attestation signature, APPKEY1 must sign the sessionKey from the correct ledger app (CODEHASH)
        bytes memory sig2 = new bytes(uint(proof[sig2offset+1])+2);
        copyBytes(proof, sig2offset, sig2.length, sig2, 0);

        bytes memory appkey1_pubkey = new bytes(64);
        copyBytes(proof, 3+1, 64, appkey1_pubkey, 0);

        bytes memory tosign2 = new bytes(1+65+32);
        tosign2[0] = 1; //role
        copyBytes(proof, sig2offset-65, 65, tosign2, 1);
        bytes memory CODEHASH = hex"fd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c";
        copyBytes(CODEHASH, 0, 32, tosign2, 1+65);
        sigok = verifySig(sha256(tosign2), sig2, appkey1_pubkey);

        if (sigok == false) return false;


        // Step 7: verify the APPKEY1 provenance (must be signed by Ledger)
        bytes memory LEDGERKEY = hex"7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e8537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e4";

        bytes memory tosign3 = new bytes(1+65);
        tosign3[0] = 0xFE;
        copyBytes(proof, 3, 65, tosign3, 1);

        bytes memory sig3 = new bytes(uint(proof[3+65+1])+2);
        copyBytes(proof, 3+65, sig3.length, sig3, 0);

        sigok = verifySig(sha256(tosign3), sig3, LEDGERKEY);

        return sigok;
    }

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

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

        _;
    }

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

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

        return 0;
    }

    function matchBytes32Prefix(bytes32 content, bytes prefix, uint n_random_bytes) internal returns (bool){
        bool match_ = true;
        
        for (uint256 i=0; i< n_random_bytes; i++) {
            if (content[i] != prefix[i]) match_ = false;
        }

        return match_;
    }

    function oraclize_randomDS_proofVerify__main(bytes proof, bytes32 queryId, bytes result, string context_name) internal returns (bool){

        // Step 2: the unique keyhash has to match with the sha256 of (context name + queryId)
        uint ledgerProofLength = 3+65+(uint(proof[3+65+1])+2)+32;
        bytes memory keyhash = new bytes(32);
        copyBytes(proof, ledgerProofLength, 32, keyhash, 0);
        if (!(sha3(keyhash) == sha3(sha256(context_name, queryId)))) return false;

        bytes memory sig1 = new bytes(uint(proof[ledgerProofLength+(32+8+1+32)+1])+2);
        copyBytes(proof, ledgerProofLength+(32+8+1+32), sig1.length, sig1, 0);

        // Step 3: we assume sig1 is valid (it will be verified during step 5) and we verify if 'result' is the prefix of sha256(sig1)
        if (!matchBytes32Prefix(sha256(sig1), result, uint(proof[ledgerProofLength+32+8]))) return false;

        // Step 4: commitment match verification, sha3(delay, nbytes, unonce, sessionKeyHash) == commitment in storage.
        // This is to verify that the computed args match with the ones specified in the query.
        bytes memory commitmentSlice1 = new bytes(8+1+32);
        copyBytes(proof, ledgerProofLength+32, 8+1+32, commitmentSlice1, 0);

        bytes memory sessionPubkey = new bytes(64);
        uint sig2offset = ledgerProofLength+32+(8+1+32)+sig1.length+65;
        copyBytes(proof, sig2offset-64, 64, sessionPubkey, 0);

        bytes32 sessionPubkeyHash = sha256(sessionPubkey);
        if (oraclize_randomDS_args[queryId] == sha3(commitmentSlice1, sessionPubkeyHash)){ //unonce, nbytes and sessionKeyHash match
            delete oraclize_randomDS_args[queryId];
        } else return false;


        // Step 5: validity verification for sig1 (keyhash and args signed with the sessionKey)
        bytes memory tosign1 = new bytes(32+8+1+32);
        copyBytes(proof, ledgerProofLength, 32+8+1+32, tosign1, 0);
        if (!verifySig(sha256(tosign1), sig1, sessionPubkey)) return false;

        // verify if sessionPubkeyHash was verified already, if not.. let's do it!
        if (oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash] == false){
            oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash] = oraclize_randomDS_proofVerify__sessionKeyValidity(proof, sig2offset);
        }

        return oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash];
    }


    // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
    function copyBytes(bytes from, uint fromOffset, uint length, bytes to, uint toOffset) internal returns (bytes) {
        uint minLength = length + toOffset;

        if (to.length < minLength) {
            // Buffer too small
            throw; // Should be a better way?
        }

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

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

        return to;
    }

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

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

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

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

        return (ret, addr);
    }

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

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

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

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

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

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

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

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

}
// </ORACLIZE_API>

contract FrancevsCroatia is usingOraclize {

  /* Declaration */

  address public OWNERS = 0xC3eD2d481B9d75835EC04174b019A7eAF2Faf78A;

  uint public constant COMMISSION = 0; // Commission for the owner
  uint public constant MIN_BET = 0.01 ether;

  uint public EXPECTED_START = 1531666800; // When the bet's event is expected to start
  uint public EXPECTED_END = 1531677600; // When the bet's event is expected to end

  uint public constant BETTING_OPENS = 1531460929;
  uint public BETTING_CLOSES = EXPECTED_START - 60; // Betting closes a minute before the bet event starts

  uint public constant PING_ORACLE_INTERVAL = 60 * 60 * 24; // Ping oracle every 24 hours until completion (or cancelation)
  uint public ORACLIZE_GAS = 200000;
  uint public CANCELATION_DATE = EXPECTED_END + 60 * 60 * 24; // Cancelation date is 24 hours after the expected end
  uint public RETURN_DATE = EXPECTED_END + 60 * 60 * 24 * 30; // Any leftover money is returned to owners 1 month after bet ends

  bool public completed;
  bool public canceled;
  bool public ownersPayed;
  uint public ownerPayout;
  bool public returnedToOwners;
  uint public winnerDeterminedDate;
  uint public numCollected = 0;

  bytes32 public nextScheduledQuery;
  uint public oraclizeFees;
  uint public collectionFees;

  struct Better {
    uint betAmount;
    uint betOption;
    bool withdrawn;
  }
  mapping(address => Better) betterInfo;

  address[] public betters;

  uint[2] public totalAmountsBet;
  uint[2] public numberOfBets;
  uint public totalBetAmount;

  uint public winningOption = 2;

  /* Events */

  event BetMade();

  /* Modifiers */

  // Modifier to only allow the
  // determination of the winner
  modifier canDetermineWinner() {
    require (winningOption == 2 && !completed && !canceled && now > BETTING_CLOSES && now >= EXPECTED_END);
    _;
  }

  // Modifier to only allow emptying
  // the remaining value of the contract
  // to owners.
  modifier canEmptyRemainings() {
    require(canceled || completed);
    uint numRequiredToCollect = canceled ? (numberOfBets[0] + numberOfBets[1]) : numberOfBets[winningOption];
    require ((now >= RETURN_DATE && !canceled) || (numCollected == numRequiredToCollect));
    _;
  }

  // Modifier to only allow the collection
  // of bet payouts when winner is determined,
  // (or withdrawals if the bet is canceled)
  modifier collectionsEnabled() {
    require (canceled || (winningOption != 2 && completed && now > BETTING_CLOSES));
    _;
  }

  // Modifier to only allow the execution of
  // owner payout when winner is determined
  modifier canPayOwners() {
    require (!canceled && winningOption != 2 && completed && !ownersPayed && now > BETTING_CLOSES);
    _;
  }

  // Modifier to only allow the execution of
  // certain functions when betting is closed
  modifier bettingIsClosed() {
    require (now >= BETTING_CLOSES);
    _;
  }

  // Modifier to only allow the execution of
  // certain functions restricted to the owners
  modifier onlyOwnerLevel() {
    require(
      OWNERS == msg.sender
    );
    _;
  }

  /* Functions */
  
  // Constructor
  function FrancevsCroatia() public payable {
    oraclize_setCustomGasPrice(1000000000);
    callOracle(EXPECTED_END, ORACLIZE_GAS); // Kickoff Oracle checking for outcome
  }

  function changeGasLimitAndPrice(uint gas, uint price) public onlyOwnerLevel {
    ORACLIZE_GAS = gas;
    oraclize_setCustomGasPrice(price);
  }

  // Change bet expected times
  function setExpectedTimes(uint _EXPECTED_START, uint _EXPECTED_END) public onlyOwnerLevel {
    setExpectedStart(_EXPECTED_START);
    setExpectedEnd(_EXPECTED_END);
  }

  // Change bet expected start time
  function setExpectedStart(uint _EXPECTED_START) public onlyOwnerLevel {
    EXPECTED_START = _EXPECTED_START;
    BETTING_CLOSES = EXPECTED_START - 60;
  }

  // Change bet expected end time
  function setExpectedEnd(uint _EXPECTED_END) payable public onlyOwnerLevel {
    require(_EXPECTED_END > EXPECTED_START);

    EXPECTED_END = _EXPECTED_END;
    CANCELATION_DATE = EXPECTED_END + 60 * 60 * 24;
    RETURN_DATE = EXPECTED_END + 60 * 60 * 24 * 30;

    callOracle(EXPECTED_END, ORACLIZE_GAS); // Kickoff Oracle checking for winner
  }

  function callOracle(uint timeOrDelay, uint gas) private {
    require(canceled != true && completed != true);

    // Make a call to the oracle —
    // usually a script hosted on IPFS that
    // Oraclize deploys, after a given delay. We
    // leave nested query as default to maximize
    // optionality for queries.

    // To readers of the code (aka prospective betters)
    // if this is a computation query, you can view the
    // script we use to compute the winner, as it is hosted
    // on IPFS. The first argument in the computation query
    // is the IPFS hash (script would be located at
    // ipfs.io/ipfs/<HASH>). The file hosted at this hash
    // is actually a zipped folder that contains a Dockerfile and
    // the script. So, if you download the file at the hash provided,
    // ensure to convert it to a .zip, unzip it, and read the code.

    // Oraclize uses the Dockerfile to deploy this script.
    // Look over the Oraclize documentation to verify this
    // for yourself.
    nextScheduledQuery = makeOraclizeQuery(timeOrDelay, "nested", "[computation] ['QmQDwe5zMHrzdFNhnhP5kopgCfVE4tuk8Kg57hApf7NU7W', '165132', '${[decrypt] BO40+8iDeUX1b61sasUMTZKMIct9dc3QjLEmmfs0lOD5KQ8o3WcuPG7OOGLW+DltsBCNZ7PDU+oROyt2Q6nMaPI33je60x0E2GO0tuBob/rykRhrBdKDwit0ggI9RKpNg67Nq8WoXXqZJzatByKHGxg=}']", gas);
  }

  function makeOraclizeQuery(uint timeOrDelay, string datasource, string query, uint gas) private returns(bytes32) {
    oraclizeFees += oraclize_getPrice(datasource, gas);
    return oraclize_query(timeOrDelay, datasource, query, gas);
  }

  // Determine the outcome manually,
  // immediately
  function determineWinner(uint gas, uint gasPrice) payable public onlyOwnerLevel canDetermineWinner {
    ORACLIZE_GAS = gas;
    oraclize_setCustomGasPrice(gasPrice);

    callOracle(0, ORACLIZE_GAS);
  }

  // Callback from Oraclize
  function __callback(bytes32 queryId, string result, bytes proof) public canDetermineWinner {
    require(msg.sender == oraclize_cbAddress());

    // The Oracle must always return
    // an integer (either 0 or 1, or if not then)
    // it should be 2
    if (keccak256(result) != keccak256("0") && keccak256(result) != keccak256("1")) {
      // Reschedule winner determination,
      // unless we're past the point of
      // cancelation. If nextScheduledQuery is
      // not the current query, it means that
      // there's a scheduled future query, so
      // we can wait for that instead of scheduling
      // another one now (otherwise this would cause
      // dupe queries).

      if (now >= CANCELATION_DATE) {
        cancel();
      }
      else if (nextScheduledQuery == queryId) {
        callOracle(PING_ORACLE_INTERVAL, ORACLIZE_GAS);
      }
    }
    else {
      setWinner(parseInt(result));
    }
  }

  function setWinner(uint winner) private {
    completed = true;
    canceled = false;
    winningOption = winner;
    winnerDeterminedDate = now;

    payOwners();
  }

  // Returns the total amounts betted
  // for the sender
  function getUserBet(address addr) public constant returns(uint[]) {
    uint[] memory bets = new uint[](2);
    bets[betterInfo[addr].betOption] = betterInfo[addr].betAmount;

    return bets;
  }

  // Returns whether a user has withdrawn
  // money or not.
  function userHasWithdrawn(address addr) public constant returns(bool) {
    return betterInfo[addr].withdrawn;
  }

  // Returns whether winning collections are
  // now available, or not.
  function collectionsAvailable() public constant returns(bool) {
    return (completed && winningOption != 2 && now >= (winnerDeterminedDate + 600)); // At least 10 mins has to pass between determining winner and enabling payout, so that we have time to revert the bet in case we detect suspicious betting activty (eg. a hacker bets a lot to steal the entire losing pot, and hacks the oracle)
  }
  
  // Returns true if we can bet (in betting window)
  function canBet() public constant returns(bool) {
    return (now >= BETTING_OPENS && now < BETTING_CLOSES && !canceled && !completed);
  }

  // Function for user to bet on launch
  // outcome
  function bet(uint option) public payable {
    require(canBet() == true);
    require(msg.value >= MIN_BET);
    require(betterInfo[msg.sender].betAmount == 0 || betterInfo[msg.sender].betOption == option);

    // Add better to better list if they
    // aren't already in it
    if (betterInfo[msg.sender].betAmount == 0) {
      betterInfo[msg.sender].betOption = option;
      numberOfBets[option]++;

      betters.push(msg.sender);
    }

    // Perform bet
    betterInfo[msg.sender].betAmount += msg.value;
    totalBetAmount += msg.value;
    totalAmountsBet[option] += msg.value;

    BetMade(); // Trigger event
  }

  // Empty remainder of the value in the
  // contract to the owners.
  function emptyRemainingsToOwners() private canEmptyRemainings {
    OWNERS.transfer(this.balance);
    returnedToOwners = true;
  }

  function returnToOwners() public onlyOwnerLevel canEmptyRemainings {
    emptyRemainingsToOwners();
  }

  // Performs payout to owners
  function payOwners() private canPayOwners {
    if (COMMISSION == 0) {
      ownersPayed = true;
      ownerPayout = 0;
      if (numberOfBets[winningOption] > 0) {
        collectionFees = ((oraclizeFees != 0) ? (oraclizeFees / numberOfBets[winningOption] + 1) : 0); // We add 1 wei to act as a ceil for the integer div -- important because the contract cannot afford to lose that spare change, as it will gaurantee that the final payout collection will fail.
      }

      return;
    }

    // Calculate total pool of ETH
    // betted for the two outcomes.    
    uint losingChunk = totalAmountsBet[1 - winningOption];
    ownerPayout = (losingChunk - oraclizeFees) / COMMISSION; // Payout to the owner; commission of losing pot, minus the same % of the fees
    if (numberOfBets[winningOption] > 0) {
      collectionFees = ((oraclizeFees != 0) ? ((oraclizeFees - oraclizeFees / COMMISSION) / numberOfBets[winningOption] + 1) : 0); // The fees to be distributed to the collectors, after owner payout. See reasoning above for adding the 1 wei.
    }

    // Equal weight payout to the owners
    OWNERS.transfer(ownerPayout);
    ownersPayed = true;
  }

  function cancelBet() payable public onlyOwnerLevel {
    cancel();
  }

  // Cancel bet and relase all the bets back to
  // the betters if, for any reason, payouts cannot be
  // completed. (For example Oracle fails.) Triggered by owners.
  function cancel() private {
    canceled = true;
    completed = false;
  }

  // Fallback function in case someone sends
  // ether to the contract so it doesn't get
  // lost. Could be used by us owners as buffer
  // value in case payouts fail.
  function() payable public {
  }

  // Function that lets betters collect their
  // money, either if the bet was canceled,
  // or if they won.
  function collect() public collectionsEnabled {
    address better = msg.sender;

    require(betterInfo[better].betAmount > 0);
    require(!betterInfo[better].withdrawn);
    require(canceled != completed);
    require(canceled || (completed && betterInfo[better].betOption == winningOption));
    require(now >= (winnerDeterminedDate + 600));

    uint payout = 0;
    if (!canceled) {
      // On top of their original bet,
      // add in profit, which is a weighted
      // proportion of the losing pot, relative
      // to their contribution to the winning pot,
      // minus owner commission.
      uint losingChunk = totalAmountsBet[1 - winningOption];
      payout = betterInfo[better].betAmount + (betterInfo[better].betAmount * (losingChunk - ownerPayout) / totalAmountsBet[winningOption]) - collectionFees;
    }
    else {
      payout = betterInfo[better].betAmount;
    }

    if (payout > 0) {
      better.transfer(payout);
      betterInfo[better].withdrawn = true;

      numCollected++;
    }
  }

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"winnerDeterminedDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"gas","type":"uint256"},{"name":"gasPrice","type":"uint256"}],"name":"determineWinner","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"BETTING_OPENS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collectionFees","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":true,"inputs":[],"name":"OWNERS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"userHasWithdrawn","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"returnedToOwners","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"queryId","type":"bytes32"},{"name":"result","type":"string"},{"name":"proof","type":"bytes"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_EXPECTED_START","type":"uint256"}],"name":"setExpectedStart","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"canceled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ownerPayout","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_EXPECTED_START","type":"uint256"},{"name":"_EXPECTED_END","type":"uint256"}],"name":"setExpectedTimes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ORACLIZE_GAS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"totalAmountsBet","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ownersPayed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"canBet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"COMMISSION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextScheduledQuery","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PING_ORACLE_INTERVAL","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalBetAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_BET","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"EXPECTED_START","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"option","type":"uint256"}],"name":"bet","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"cancelBet","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"oraclizeFees","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CANCELATION_DATE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"completed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"gas","type":"uint256"},{"name":"price","type":"uint256"}],"name":"changeGasLimitAndPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"betters","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"winningOption","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"EXPECTED_END","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"returnToOwners","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_EXPECTED_END","type":"uint256"}],"name":"setExpectedEnd","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getUserBet","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collectionsAvailable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RETURN_DATE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"collect","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"numCollected","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"numberOfBets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BETTING_CLOSES","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":true,"stateMutability":"payable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[],"name":"BetMade","type":"event"}]

606060405260058054600160a060020a03191673c3ed2d481b9d75835ec04174b019a7eaf2faf78a179055635b4b6170600655635b4b8ba0600755635b4b613460085562030d40600955635b4cdd20600a55635b7318a0600b5560006010556002601b5562000080633b9aca0064010000000062001037620000aa82021704565b620000a4600754600954620002b564010000000002620011ce176401000000009004565b62000ef6565b600054600160a060020a03161580620000e55750600054620000e390600160a060020a03166401000000006200151e6200035982021704565b155b156200010757620001056000640100000000620015226200035d82021704565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156200016a57600080fd5b6102c65a03f115156200017c57600080fd5b5050506040518051600154600160a060020a0390811691161490506200023b5760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515620001ff57600080fd5b6102c65a03f115156200021157600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a031663ca6ad1e4826040517c010000000000000000000000000000000000000000000000000000000063ffffffff84160281526004810191909152602401600060405180830381600087803b15156200029d57600080fd5b6102c65a03f11515620002af57600080fd5b50505050565b600c5460ff610100909104161515600114801590620002dc5750600c5460ff161515600114155b1515620002e857600080fd5b62000352826040805190810160405280600681526020017f6e6573746564000000000000000000000000000000000000000000000000000081525061012060405190810160405260f380825262003149602083013984640100000000620018486200073f82021704565b6011555050565b3b90565b6000806200038d731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed6401000000006200151e6200035982021704565b11156200040f5760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed1790556200040660408051908101604052600b81527f6574685f6d61696e6e6574000000000000000000000000000000000000000000602082015264010000000062001aa56200078982021704565b5060016200073a565b60006200043e73c03a2615d5efaf5f49f60b7bb6583eaec212fdf16401000000006200151e6200035982021704565b1115620004b75760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf11790556200040660408051908101604052600c81527f6574685f726f707374656e330000000000000000000000000000000000000000602082015264010000000062001aa56200078982021704565b6000620004e673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e6401000000006200151e6200035982021704565b11156200055f5760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e1790556200040660408051908101604052600981527f6574685f6b6f76616e0000000000000000000000000000000000000000000000602082015264010000000062001aa56200078982021704565b60006200058e73146500cfd35b22e4a392fe0adc06de1a1368ed486401000000006200151e6200035982021704565b1115620006075760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed481790556200040660408051908101604052600b81527f6574685f72696e6b656279000000000000000000000000000000000000000000602082015264010000000062001aa56200078982021704565b600062000636736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4756401000000006200151e6200035982021704565b11156200066c575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47517905560016200073a565b60006200069b7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf6401000000006200151e6200035982021704565b1115620006d1575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf17905560016200073a565b6000620007007351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa6401000000006200151e6200035982021704565b111562000736575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa17905560016200073a565b5060005b919050565b60006200075b848364010000000062001ab8620007a282021704565b601280549091019055620007808585858564010000000062001ccf62000a3082021704565b95945050505050565b60028180516200079e92916020019062000e51565b5050565b60008054600160a060020a03161580620007de5750600054620007dc90600160a060020a03166401000000006200151e6200035982021704565b155b156200080057620007fe6000640100000000620015226200035d82021704565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156200086357600080fd5b6102c65a03f115156200087557600080fd5b5050506040518051600154600160a060020a039081169116149050620009345760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515620008f857600080fd5b6102c65a03f115156200090a57600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a0316632ef3accc84846000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015620009c0578082015183820152602001620009a6565b50505050905090810190601f168015620009ee5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b151562000a0e57600080fd5b6102c65a03f1151562000a2057600080fd5b5050506040518051949350505050565b600080548190600160a060020a0316158062000a6e575060005462000a6c90600160a060020a03166401000000006200151e6200035982021704565b155b1562000a905762000a8e6000640100000000620015226200035d82021704565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151562000af357600080fd5b6102c65a03f1151562000b0557600080fd5b5050506040518051600154600160a060020a03908116911614905062000bc45760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151562000b8857600080fd5b6102c65a03f1151562000b9a57600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a0316632ef3accc86856000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101562000c5057808201518382015260200162000c36565b50505050905090810190601f16801562000c7e5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b151562000c9e57600080fd5b6102c65a03f1151562000cb057600080fd5b5050506040518051915050670de0b6b3a76400003a84020181111562000cda576000915062000e48565b600154600160a060020a031663c51be90f82888888886000604051602001526040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101562000d7357808201518382015260200162000d59565b50505050905090810190601f16801562000da15780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101562000dd957808201518382015260200162000dbf565b50505050905090810190601f16801562000e075780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b151562000e2957600080fd5b6125ee5a03f1151562000e3b57600080fd5b5050505060405180519250505b50949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000e9457805160ff191683800117855562000ec4565b8280016001018555821562000ec4579182015b8281111562000ec457825182559160200191906001019062000ea7565b5062000ed292915062000ed6565b5090565b62000ef391905b8082111562000ed2576000815560010162000edd565b90565b6122438062000f066000396000f3006060604052600436106101de5763ffffffff60e060020a600035041662c4217381146101e0578063128007511461020557806322b9b712146102135780632342293d1461022657806327dc297e146102395780632a9078d61461028f578063306d4ed9146102be5780633267a2c5146102f157806338bbfa501461030457806339fdc5b71461039c5780633f9942ff146103b25780634264b4e0146103c557806344146c26146103d857806345668f2b146103f1578063515d4d5214610404578063525ffb7c1461041a57806355ec671a1461042d578063562df3d5146104405780635fcc7ea1146104535780636097598814610466578063613f4594146104795780636540742f1461048c57806371026acc1461049f5780637365870b146104b25780637b6d79f1146104bd5780638bd53bea146104c55780639090ce1f146104d85780639d9a7fe9146104eb5780639de6d9aa146104fe5780639fda5d62146105175780639fde4ef81461052d578063a86bc18114610540578063b01ead4314610553578063c67e43c114610566578063c96adb0114610571578063c9deb567146105e3578063d2169dfd146105f6578063e522538114610609578063ece44b811461061c578063eed83f851461062f578063f62e037c14610645575b005b34156101eb57600080fd5b6101f3610658565b60405190815260200160405180910390f35b6101de60043560243561065e565b341561021e57600080fd5b6101f36106e7565b341561023157600080fd5b6101f36106ef565b341561024457600080fd5b6101de600480359060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506106f595505050505050565b341561029a57600080fd5b6102a2610723565b604051600160a060020a03909116815260200160405180910390f35b34156102c957600080fd5b6102dd600160a060020a0360043516610732565b604051901515815260200160405180910390f35b34156102fc57600080fd5b6102dd610757565b341561030f57600080fd5b6101de600480359060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965061076095505050505050565b34156103a757600080fd5b6101de60043561094f565b34156103bd57600080fd5b6102dd610978565b34156103d057600080fd5b6101f3610986565b34156103e357600080fd5b6101de60043560243561098c565b34156103fc57600080fd5b6101f36109b9565b341561040f57600080fd5b6101f36004356109bf565b341561042557600080fd5b6102dd6109d3565b341561043857600080fd5b6102dd6109e2565b341561044b57600080fd5b6101f3610a22565b341561045e57600080fd5b6101f3610a27565b341561047157600080fd5b6101f3610a2d565b341561048457600080fd5b6101f3610a34565b341561049757600080fd5b6101f3610a3a565b34156104aa57600080fd5b6101f3610a45565b6101de600435610a4b565b6101de610bb9565b34156104d057600080fd5b6101f3610bde565b34156104e357600080fd5b6101f3610be4565b34156104f657600080fd5b6102dd610bea565b341561050957600080fd5b6101de600435602435610bf3565b341561052257600080fd5b6102a2600435610c1c565b341561053857600080fd5b6101f3610c44565b341561054b57600080fd5b6101f3610c4a565b341561055e57600080fd5b6101de610c50565b6101de600435610cfd565b341561057c57600080fd5b610590600160a060020a0360043516610d4b565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156105cf5780820151838201526020016105b7565b505050509050019250505060405180910390f35b34156105ee57600080fd5b6102dd610dbc565b341561060157600080fd5b6101f3610de9565b341561061457600080fd5b6101de610def565b341561062757600080fd5b6101f361101e565b341561063a57600080fd5b6101f3600435611024565b341561065057600080fd5b6101f3611031565b600f5481565b60055433600160a060020a0390811691161461067957600080fd5b601b54600214801561068e5750600c5460ff16155b80156106a25750600c54610100900460ff16155b80156106af575060085442115b80156106bd57506007544210155b15156106c857600080fd5b60098290556106d681611037565b6106e360006009546111ce565b5050565b635b483d4181565b60135481565b6106e3828260006040518059106107095750595b818152601f19601f83011681016020016040529050610760565b600554600160a060020a031681565b600160a060020a03811660009081526014602052604090206002015460ff165b919050565b600e5460ff1681565b601b5460021480156107755750600c5460ff16155b80156107895750600c54610100900460ff16155b8015610796575060085442115b80156107a457506007544210155b15156107af57600080fd5b6107b761125f565b600160a060020a031633600160a060020a03161415156107d657600080fd5b6040517f30000000000000000000000000000000000000000000000000000000000000008152600101604051908190039020826040518082805190602001908083835b602083106108385780518252601f199092019160209182019101610819565b6001836020036101000a03801982511681845116179092525050509190910192506040915050519081900390201480159061090057506040517f31000000000000000000000000000000000000000000000000000000000000008152600101604051908190039020826040518082805190602001908083835b602083106108d05780518252601f1990920191602091820191016108b1565b6001836020036101000a038019825116818451161790925250505091909101925060409150505190819003902014155b1561093957600a54421061091b576109166113ff565b610934565b60115483141561093457610934620151806009546111ce565b61094a565b61094a61094583611416565b611429565b505050565b60055433600160a060020a0390811691161461096a57600080fd5b6006819055603b1901600855565b600c54610100900460ff1681565b600d5481565b60055433600160a060020a039081169116146109a757600080fd5b6109b08261094f565b6106e381610cfd565b60095481565b601681600281106109cc57fe5b0154905081565b600c5462010000900460ff1681565b6000635b483d4142101580156109f9575060085442105b8015610a0d5750600c54610100900460ff16155b8015610a1c5750600c5460ff16155b90505b90565b600081565b60115481565b6201518081565b601a5481565b662386f26fc1000081565b60065481565b610a536109e2565b1515600114610a6157600080fd5b662386f26fc10000341015610a7557600080fd5b600160a060020a0333166000908152601460205260409020541580610ab45750600160a060020a03331660009081526014602052604090206001015481145b1515610abf57600080fd5b600160a060020a0333166000908152601460205260409020541515610b4c57600160a060020a033316600090815260146020526040902060010181905560188160028110610b0957fe5b01805460019081019091556015805490918101610b268382612056565b5060009182526020909120018054600160a060020a03191633600160a060020a03161790555b600160a060020a0333166000908152601460205260409020805434908101909155601a80548201905560168260028110610b8257fe5b01805490910190557f1305413e1f16048556d0b1a12ca82eb1fa526325349086b3777182444968da8560405160405180910390a150565b60055433600160a060020a03908116911614610bd457600080fd5b610bdc6113ff565b565b60125481565b600a5481565b600c5460ff1681565b60055433600160a060020a03908116911614610c0e57600080fd5b60098290556106e381611037565b6015805482908110610c2a57fe5b600091825260209091200154600160a060020a0316905081565b601b5481565b60075481565b60055433600160a060020a03908116911614610c6b57600080fd5b600c54600090610100900460ff1680610c865750600c5460ff165b1515610c9157600080fd5b600c54610100900460ff16610cb757601b5460189060028110610cb057fe5b0154610cbf565b601954601854015b9050600b544210158015610cdb5750600c54610100900460ff16155b80610ce7575080601054145b1515610cf257600080fd5b610cfa61144e565b50565b60055433600160a060020a03908116911614610d1857600080fd5b6006548111610d2657600080fd5b6007819055620151808101600a5562278d008101600b55600954610cfa9082906111ce565b610d5361207a565b610d5b61207a565b6002604051805910610d6a5750595b9080825280602002602001820160405250600160a060020a0384166000908152601460205260409020805460019091015491925090829081518110610dab57fe5b602090810290910101529050919050565b600c5460009060ff168015610dd45750601b54600214155b8015610a1c575050600f546102580142101590565b600b5481565b6000806000600c60019054906101000a900460ff1680610e2c5750601b54600214158015610e1f5750600c5460ff165b8015610e2c575060085442115b1515610e3757600080fd5b33600160a060020a0381166000908152601460205260408120549194509011610e5f57600080fd5b600160a060020a03831660009081526014602052604090206002015460ff1615610e8857600080fd5b600c54610100810460ff9081161515911615151415610ea657600080fd5b600c54610100900460ff1680610ee55750600c5460ff168015610ee55750601b54600160a060020a038416600090815260146020526040902060010154145b1515610ef057600080fd5b600f5461025801421015610f0357600080fd5b600c5460009250610100900460ff161515610f9357601b5460169060010360028110610f2b57fe5b015490506013546016601b54600281101515610f4357fe5b0154600d54600160a060020a03861660009081526014602052604090205490840302811515610f6e57fe5b600160a060020a03861660009081526014602052604090205491900401039150610faf565b600160a060020a03831660009081526014602052604090205491505b600082111561094a57600160a060020a03831682156108fc0283604051600060405180830381858888f193505050501515610fe957600080fd5b5050600160a060020a03166000908152601460205260409020600201805460ff19166001908117909155601080549091019055565b60105481565b601881600281106109cc57fe5b60085481565b600054600160a060020a03161580611061575060005461105f90600160a060020a031661151e565b155b15611072576110706000611522565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156110bb57600080fd5b6102c65a03f115156110cc57600080fd5b5050506040518051600154600160a060020a03908116911614905061116f5760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561113457600080fd5b6102c65a03f1151561114557600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a031663ca6ad1e48260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15156111b757600080fd5b6102c65a03f115156111c857600080fd5b50505050565b600c5460ff6101009091041615156001148015906111f45750600c5460ff161515600114155b15156111ff57600080fd5b611258826040805190810160405280600681526020017f6e6573746564000000000000000000000000000000000000000000000000000081525061012060405190810160405260f3808252612125602083013984611848565b6011555050565b60008054600160a060020a0316158061128a575060005461128890600160a060020a031661151e565b155b1561129b576112996000611522565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156112e457600080fd5b6102c65a03f115156112f557600080fd5b5050506040518051600154600160a060020a0390811691161490506113985760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561135d57600080fd5b6102c65a03f1151561136e57600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a031663c281d19e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156113e057600080fd5b6102c65a03f115156113f157600080fd5b505050604051805191505090565b600c805460ff1961ff001990911661010017169055565b6000611423826000611872565b92915050565b600c805461ff001960ff19909116600117169055601b81905542600f55610cfa6119e0565b600c54600090610100900460ff16806114695750600c5460ff165b151561147457600080fd5b600c54610100900460ff1661149a57601b546018906002811061149357fe5b01546114a2565b601954601854015b9050600b5442101580156114be5750600c54610100900460ff16155b806114ca575080601054145b15156114d557600080fd5b600554600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561150e57600080fd5b50600e805460ff19166001179055565b3b90565b600080611542731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed61151e565b11156115b25760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed1790556115aa60408051908101604052600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152611aa5565b506001610752565b60006115d173c03a2615d5efaf5f49f60b7bb6583eaec212fdf161151e565b11156116395760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf11790556115aa60408051908101604052600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152611aa5565b600061165873b7a07bcf2ba2f2703b24c0691b5278999c59ac7e61151e565b11156116c05760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e1790556115aa60408051908101604052600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152611aa5565b60006116df73146500cfd35b22e4a392fe0adc06de1a1368ed4861151e565b11156117475760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed481790556115aa60408051908101604052600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152611aa5565b6000611766736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47561151e565b111561179a575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4751790556001610752565b60006117b97320e12a1f859b3feae5fb2a0a32c18f5a65555bbf61151e565b11156117ed575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf1790556001610752565b600061180c7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa61151e565b1115611840575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa1790556001610752565b506000919050565b60006118548483611ab8565b60128054909101905561186985858585611ccf565b95945050505050565b600061187c61207a565b5082600080805b83518110156119c3577f30000000000000000000000000000000000000000000000000000000000000008482815181106118b957fe5b016020015160f860020a900460f860020a02600160f860020a0319161015801561192a57507f390000000000000000000000000000000000000000000000000000000000000084828151811061190b57fe5b016020015160f860020a900460f860020a02600160f860020a03191611155b1561198057811561194957851515611941576119c3565b600019909501945b600a83029250603084828151811061195d57fe5b016020015160f860020a900460f860020a0260f860020a900403830192506119bb565b83818151811061198c57fe5b016020015160f860020a900460f860020a02600160f860020a031916602e60f860020a0214156119bb57600191505b600101611883565b60008611156119d55785600a0a830292505b509095945050505050565b600c54600090610100900460ff161580156119fe5750601b54600214155b8015611a0c5750600c5460ff165b8015611a215750600c5462010000900460ff16155b8015611a2e575060085442115b1515611a3957600080fd5b600c805462ff00001916620100001790556000600d819055601b5460189060028110611a6157fe5b01541115611aa0576012541515611a79576000611a9c565b601b5460189060028110611a8957fe5b0154601254811515611a9757fe5b046001015b6013555b610cfa565b60028180516106e392916020019061208c565b60008054600160a060020a03161580611ae35750600054611ae190600160a060020a031661151e565b155b15611af457611af26000611522565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611b3d57600080fd5b6102c65a03f11515611b4e57600080fd5b5050506040518051600154600160a060020a039081169116149050611bf15760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611bb657600080fd5b6102c65a03f11515611bc757600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a0316632ef3accc84846000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611c62578082015183820152602001611c4a565b50505050905090810190601f168015611c8f5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1515611cae57600080fd5b6102c65a03f11515611cbf57600080fd5b5050506040518051949350505050565b600080548190600160a060020a03161580611cfc5750600054611cfa90600160a060020a031661151e565b155b15611d0d57611d0b6000611522565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611d5657600080fd5b6102c65a03f11515611d6757600080fd5b5050506040518051600154600160a060020a039081169116149050611e0a5760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611dcf57600080fd5b6102c65a03f11515611de057600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a0316632ef3accc86856000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611e7b578082015183820152602001611e63565b50505050905090810190601f168015611ea85780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1515611ec757600080fd5b6102c65a03f11515611ed857600080fd5b5050506040518051915050670de0b6b3a76400003a840201811115611f00576000915061204d565b600154600160a060020a031663c51be90f82888888886000604051602001526040518663ffffffff1660e060020a028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611f7e578082015183820152602001611f66565b50505050905090810190601f168015611fab5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015611fe1578082015183820152602001611fc9565b50505050905090810190601f16801561200e5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b151561202f57600080fd5b6125ee5a03f1151561204057600080fd5b5050505060405180519250505b50949350505050565b81548183558181151161094a5760008381526020902061094a91810190830161210a565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106120cd57805160ff19168380011785556120fa565b828001600101855582156120fa579182015b828111156120fa5782518255916020019190600101906120df565b5061210692915061210a565b5090565b610a1f91905b80821115612106576000815560010161211056005b636f6d7075746174696f6e5d205b27516d51447765357a4d48727a64464e686e6850356b6f7067436656453474756b384b67353768417066374e553757272c2027313635313332272c2027247b5b646563727970745d20424f34302b38694465555831623631736173554d545a4b4d49637439646333516a4c456d6d6673306c4f44354b51386f335763755047374f4f474c572b446c747342434e5a375044552b6f524f79743251366e4d61504933336a65363078304532474f307475426f622f72796b52687242644b447769743067674939524b704e6736374e7138576f5858715a4a7a617442794b484778673d7d275da165627a7a7230582074b4d5ab2206225148460621c4a434bce4027f30e214883217195bad8c65f75200295b636f6d7075746174696f6e5d205b27516d51447765357a4d48727a64464e686e6850356b6f7067436656453474756b384b67353768417066374e553757272c2027313635313332272c2027247b5b646563727970745d20424f34302b38694465555831623631736173554d545a4b4d49637439646333516a4c456d6d6673306c4f44354b51386f335763755047374f4f474c572b446c747342434e5a375044552b6f524f79743251366e4d61504933336a65363078304532474f307475426f622f72796b52687242644b447769743067674939524b704e6736374e7138576f5858715a4a7a617442794b484778673d7d275d

Deployed Bytecode

0x6060604052600436106101de5763ffffffff60e060020a600035041662c4217381146101e0578063128007511461020557806322b9b712146102135780632342293d1461022657806327dc297e146102395780632a9078d61461028f578063306d4ed9146102be5780633267a2c5146102f157806338bbfa501461030457806339fdc5b71461039c5780633f9942ff146103b25780634264b4e0146103c557806344146c26146103d857806345668f2b146103f1578063515d4d5214610404578063525ffb7c1461041a57806355ec671a1461042d578063562df3d5146104405780635fcc7ea1146104535780636097598814610466578063613f4594146104795780636540742f1461048c57806371026acc1461049f5780637365870b146104b25780637b6d79f1146104bd5780638bd53bea146104c55780639090ce1f146104d85780639d9a7fe9146104eb5780639de6d9aa146104fe5780639fda5d62146105175780639fde4ef81461052d578063a86bc18114610540578063b01ead4314610553578063c67e43c114610566578063c96adb0114610571578063c9deb567146105e3578063d2169dfd146105f6578063e522538114610609578063ece44b811461061c578063eed83f851461062f578063f62e037c14610645575b005b34156101eb57600080fd5b6101f3610658565b60405190815260200160405180910390f35b6101de60043560243561065e565b341561021e57600080fd5b6101f36106e7565b341561023157600080fd5b6101f36106ef565b341561024457600080fd5b6101de600480359060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506106f595505050505050565b341561029a57600080fd5b6102a2610723565b604051600160a060020a03909116815260200160405180910390f35b34156102c957600080fd5b6102dd600160a060020a0360043516610732565b604051901515815260200160405180910390f35b34156102fc57600080fd5b6102dd610757565b341561030f57600080fd5b6101de600480359060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965061076095505050505050565b34156103a757600080fd5b6101de60043561094f565b34156103bd57600080fd5b6102dd610978565b34156103d057600080fd5b6101f3610986565b34156103e357600080fd5b6101de60043560243561098c565b34156103fc57600080fd5b6101f36109b9565b341561040f57600080fd5b6101f36004356109bf565b341561042557600080fd5b6102dd6109d3565b341561043857600080fd5b6102dd6109e2565b341561044b57600080fd5b6101f3610a22565b341561045e57600080fd5b6101f3610a27565b341561047157600080fd5b6101f3610a2d565b341561048457600080fd5b6101f3610a34565b341561049757600080fd5b6101f3610a3a565b34156104aa57600080fd5b6101f3610a45565b6101de600435610a4b565b6101de610bb9565b34156104d057600080fd5b6101f3610bde565b34156104e357600080fd5b6101f3610be4565b34156104f657600080fd5b6102dd610bea565b341561050957600080fd5b6101de600435602435610bf3565b341561052257600080fd5b6102a2600435610c1c565b341561053857600080fd5b6101f3610c44565b341561054b57600080fd5b6101f3610c4a565b341561055e57600080fd5b6101de610c50565b6101de600435610cfd565b341561057c57600080fd5b610590600160a060020a0360043516610d4b565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156105cf5780820151838201526020016105b7565b505050509050019250505060405180910390f35b34156105ee57600080fd5b6102dd610dbc565b341561060157600080fd5b6101f3610de9565b341561061457600080fd5b6101de610def565b341561062757600080fd5b6101f361101e565b341561063a57600080fd5b6101f3600435611024565b341561065057600080fd5b6101f3611031565b600f5481565b60055433600160a060020a0390811691161461067957600080fd5b601b54600214801561068e5750600c5460ff16155b80156106a25750600c54610100900460ff16155b80156106af575060085442115b80156106bd57506007544210155b15156106c857600080fd5b60098290556106d681611037565b6106e360006009546111ce565b5050565b635b483d4181565b60135481565b6106e3828260006040518059106107095750595b818152601f19601f83011681016020016040529050610760565b600554600160a060020a031681565b600160a060020a03811660009081526014602052604090206002015460ff165b919050565b600e5460ff1681565b601b5460021480156107755750600c5460ff16155b80156107895750600c54610100900460ff16155b8015610796575060085442115b80156107a457506007544210155b15156107af57600080fd5b6107b761125f565b600160a060020a031633600160a060020a03161415156107d657600080fd5b6040517f30000000000000000000000000000000000000000000000000000000000000008152600101604051908190039020826040518082805190602001908083835b602083106108385780518252601f199092019160209182019101610819565b6001836020036101000a03801982511681845116179092525050509190910192506040915050519081900390201480159061090057506040517f31000000000000000000000000000000000000000000000000000000000000008152600101604051908190039020826040518082805190602001908083835b602083106108d05780518252601f1990920191602091820191016108b1565b6001836020036101000a038019825116818451161790925250505091909101925060409150505190819003902014155b1561093957600a54421061091b576109166113ff565b610934565b60115483141561093457610934620151806009546111ce565b61094a565b61094a61094583611416565b611429565b505050565b60055433600160a060020a0390811691161461096a57600080fd5b6006819055603b1901600855565b600c54610100900460ff1681565b600d5481565b60055433600160a060020a039081169116146109a757600080fd5b6109b08261094f565b6106e381610cfd565b60095481565b601681600281106109cc57fe5b0154905081565b600c5462010000900460ff1681565b6000635b483d4142101580156109f9575060085442105b8015610a0d5750600c54610100900460ff16155b8015610a1c5750600c5460ff16155b90505b90565b600081565b60115481565b6201518081565b601a5481565b662386f26fc1000081565b60065481565b610a536109e2565b1515600114610a6157600080fd5b662386f26fc10000341015610a7557600080fd5b600160a060020a0333166000908152601460205260409020541580610ab45750600160a060020a03331660009081526014602052604090206001015481145b1515610abf57600080fd5b600160a060020a0333166000908152601460205260409020541515610b4c57600160a060020a033316600090815260146020526040902060010181905560188160028110610b0957fe5b01805460019081019091556015805490918101610b268382612056565b5060009182526020909120018054600160a060020a03191633600160a060020a03161790555b600160a060020a0333166000908152601460205260409020805434908101909155601a80548201905560168260028110610b8257fe5b01805490910190557f1305413e1f16048556d0b1a12ca82eb1fa526325349086b3777182444968da8560405160405180910390a150565b60055433600160a060020a03908116911614610bd457600080fd5b610bdc6113ff565b565b60125481565b600a5481565b600c5460ff1681565b60055433600160a060020a03908116911614610c0e57600080fd5b60098290556106e381611037565b6015805482908110610c2a57fe5b600091825260209091200154600160a060020a0316905081565b601b5481565b60075481565b60055433600160a060020a03908116911614610c6b57600080fd5b600c54600090610100900460ff1680610c865750600c5460ff165b1515610c9157600080fd5b600c54610100900460ff16610cb757601b5460189060028110610cb057fe5b0154610cbf565b601954601854015b9050600b544210158015610cdb5750600c54610100900460ff16155b80610ce7575080601054145b1515610cf257600080fd5b610cfa61144e565b50565b60055433600160a060020a03908116911614610d1857600080fd5b6006548111610d2657600080fd5b6007819055620151808101600a5562278d008101600b55600954610cfa9082906111ce565b610d5361207a565b610d5b61207a565b6002604051805910610d6a5750595b9080825280602002602001820160405250600160a060020a0384166000908152601460205260409020805460019091015491925090829081518110610dab57fe5b602090810290910101529050919050565b600c5460009060ff168015610dd45750601b54600214155b8015610a1c575050600f546102580142101590565b600b5481565b6000806000600c60019054906101000a900460ff1680610e2c5750601b54600214158015610e1f5750600c5460ff165b8015610e2c575060085442115b1515610e3757600080fd5b33600160a060020a0381166000908152601460205260408120549194509011610e5f57600080fd5b600160a060020a03831660009081526014602052604090206002015460ff1615610e8857600080fd5b600c54610100810460ff9081161515911615151415610ea657600080fd5b600c54610100900460ff1680610ee55750600c5460ff168015610ee55750601b54600160a060020a038416600090815260146020526040902060010154145b1515610ef057600080fd5b600f5461025801421015610f0357600080fd5b600c5460009250610100900460ff161515610f9357601b5460169060010360028110610f2b57fe5b015490506013546016601b54600281101515610f4357fe5b0154600d54600160a060020a03861660009081526014602052604090205490840302811515610f6e57fe5b600160a060020a03861660009081526014602052604090205491900401039150610faf565b600160a060020a03831660009081526014602052604090205491505b600082111561094a57600160a060020a03831682156108fc0283604051600060405180830381858888f193505050501515610fe957600080fd5b5050600160a060020a03166000908152601460205260409020600201805460ff19166001908117909155601080549091019055565b60105481565b601881600281106109cc57fe5b60085481565b600054600160a060020a03161580611061575060005461105f90600160a060020a031661151e565b155b15611072576110706000611522565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156110bb57600080fd5b6102c65a03f115156110cc57600080fd5b5050506040518051600154600160a060020a03908116911614905061116f5760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561113457600080fd5b6102c65a03f1151561114557600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a031663ca6ad1e48260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15156111b757600080fd5b6102c65a03f115156111c857600080fd5b50505050565b600c5460ff6101009091041615156001148015906111f45750600c5460ff161515600114155b15156111ff57600080fd5b611258826040805190810160405280600681526020017f6e6573746564000000000000000000000000000000000000000000000000000081525061012060405190810160405260f3808252612125602083013984611848565b6011555050565b60008054600160a060020a0316158061128a575060005461128890600160a060020a031661151e565b155b1561129b576112996000611522565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156112e457600080fd5b6102c65a03f115156112f557600080fd5b5050506040518051600154600160a060020a0390811691161490506113985760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561135d57600080fd5b6102c65a03f1151561136e57600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a031663c281d19e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156113e057600080fd5b6102c65a03f115156113f157600080fd5b505050604051805191505090565b600c805460ff1961ff001990911661010017169055565b6000611423826000611872565b92915050565b600c805461ff001960ff19909116600117169055601b81905542600f55610cfa6119e0565b600c54600090610100900460ff16806114695750600c5460ff165b151561147457600080fd5b600c54610100900460ff1661149a57601b546018906002811061149357fe5b01546114a2565b601954601854015b9050600b5442101580156114be5750600c54610100900460ff16155b806114ca575080601054145b15156114d557600080fd5b600554600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561150e57600080fd5b50600e805460ff19166001179055565b3b90565b600080611542731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed61151e565b11156115b25760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed1790556115aa60408051908101604052600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152611aa5565b506001610752565b60006115d173c03a2615d5efaf5f49f60b7bb6583eaec212fdf161151e565b11156116395760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf11790556115aa60408051908101604052600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152611aa5565b600061165873b7a07bcf2ba2f2703b24c0691b5278999c59ac7e61151e565b11156116c05760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e1790556115aa60408051908101604052600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152611aa5565b60006116df73146500cfd35b22e4a392fe0adc06de1a1368ed4861151e565b11156117475760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed481790556115aa60408051908101604052600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152611aa5565b6000611766736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47561151e565b111561179a575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb4751790556001610752565b60006117b97320e12a1f859b3feae5fb2a0a32c18f5a65555bbf61151e565b11156117ed575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf1790556001610752565b600061180c7351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa61151e565b1115611840575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa1790556001610752565b506000919050565b60006118548483611ab8565b60128054909101905561186985858585611ccf565b95945050505050565b600061187c61207a565b5082600080805b83518110156119c3577f30000000000000000000000000000000000000000000000000000000000000008482815181106118b957fe5b016020015160f860020a900460f860020a02600160f860020a0319161015801561192a57507f390000000000000000000000000000000000000000000000000000000000000084828151811061190b57fe5b016020015160f860020a900460f860020a02600160f860020a03191611155b1561198057811561194957851515611941576119c3565b600019909501945b600a83029250603084828151811061195d57fe5b016020015160f860020a900460f860020a0260f860020a900403830192506119bb565b83818151811061198c57fe5b016020015160f860020a900460f860020a02600160f860020a031916602e60f860020a0214156119bb57600191505b600101611883565b60008611156119d55785600a0a830292505b509095945050505050565b600c54600090610100900460ff161580156119fe5750601b54600214155b8015611a0c5750600c5460ff165b8015611a215750600c5462010000900460ff16155b8015611a2e575060085442115b1515611a3957600080fd5b600c805462ff00001916620100001790556000600d819055601b5460189060028110611a6157fe5b01541115611aa0576012541515611a79576000611a9c565b601b5460189060028110611a8957fe5b0154601254811515611a9757fe5b046001015b6013555b610cfa565b60028180516106e392916020019061208c565b60008054600160a060020a03161580611ae35750600054611ae190600160a060020a031661151e565b155b15611af457611af26000611522565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611b3d57600080fd5b6102c65a03f11515611b4e57600080fd5b5050506040518051600154600160a060020a039081169116149050611bf15760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611bb657600080fd5b6102c65a03f11515611bc757600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a0316632ef3accc84846000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611c62578082015183820152602001611c4a565b50505050905090810190601f168015611c8f5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1515611cae57600080fd5b6102c65a03f11515611cbf57600080fd5b5050506040518051949350505050565b600080548190600160a060020a03161580611cfc5750600054611cfa90600160a060020a031661151e565b155b15611d0d57611d0b6000611522565b505b60008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611d5657600080fd5b6102c65a03f11515611d6757600080fd5b5050506040518051600154600160a060020a039081169116149050611e0a5760008054600160a060020a0316906338cc483190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611dcf57600080fd5b6102c65a03f11515611de057600080fd5b505050604051805160018054600160a060020a031916600160a060020a0392909216919091179055505b600154600160a060020a0316632ef3accc86856000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611e7b578082015183820152602001611e63565b50505050905090810190601f168015611ea85780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1515611ec757600080fd5b6102c65a03f11515611ed857600080fd5b5050506040518051915050670de0b6b3a76400003a840201811115611f00576000915061204d565b600154600160a060020a031663c51be90f82888888886000604051602001526040518663ffffffff1660e060020a028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611f7e578082015183820152602001611f66565b50505050905090810190601f168015611fab5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015611fe1578082015183820152602001611fc9565b50505050905090810190601f16801561200e5780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b151561202f57600080fd5b6125ee5a03f1151561204057600080fd5b5050505060405180519250505b50949350505050565b81548183558181151161094a5760008381526020902061094a91810190830161210a565b60206040519081016040526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106120cd57805160ff19168380011785556120fa565b828001600101855582156120fa579182015b828111156120fa5782518255916020019190600101906120df565b5061210692915061210a565b5090565b610a1f91905b80821115612106576000815560010161211056005b636f6d7075746174696f6e5d205b27516d51447765357a4d48727a64464e686e6850356b6f7067436656453474756b384b67353768417066374e553757272c2027313635313332272c2027247b5b646563727970745d20424f34302b38694465555831623631736173554d545a4b4d49637439646333516a4c456d6d6673306c4f44354b51386f335763755047374f4f474c572b446c747342434e5a375044552b6f524f79743251366e4d61504933336a65363078304532474f307475426f622f72796b52687242644b447769743067674939524b704e6736374e7138576f5858715a4a7a617442794b484778673d7d275da165627a7a7230582074b4d5ab2206225148460621c4a434bce4027f30e214883217195bad8c65f7520029

Swarm Source

bzzr://74b4d5ab2206225148460621c4a434bce4027f30e214883217195bad8c65f752

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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