Sponsored Link: Join FundYourselfNow ICO – Crypto crowdfunding platform to find talent, raise funding while protecting project fraud
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 3649 txns
  Latest 25 txns from a total Of 3649 transactions View All

TxHash Block Age From To Value [TxFee]
0xb760c14a688f110adcedbd5a77f6871b0466859b199b42daa02f65cdb651ebde2842759190 days 6 hrs ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90 Ether0.00116375
0x289f3155d35f167d819a2bd6231b03d71d03e6ee4f2d2bc3ac37e3854111d47d2796048197 days 23 hrs ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90 Ether0.00191206
0xdefdf0fcfb9fb1969fd07c922dd77f6e1783fb019ad0fcfe77ff70e47b0c69582796030197 days 23 hrs ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90 Ether0.00311256
0x3562e00e56116255da984c83a35b041e591d719babc9a57456b0685db464cbdc2796021197 days 23 hrs ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90 Ether0.00119464
0x156fcc43545eccebd7fb908eabce2c505472f39292e4bdd26e82decc74454ea12795980197 days 23 hrs ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.01 Ether0.00538592
0x8813f48b79a83458540c56638ea60774c22e944340b32fbd67b4920d0f704fdb2795614198 days 48 mins ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90 Ether0.00091208
0x947630443d5f83d609c0d3741a2186fd97b295d96d3d71190a2b98f2e8a465da2795539198 days 1 hr ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90 Ether0.00091208
0xa638834c7c0701354ba2fd2aaaa60bd452adf5aab26ca0d3d7356b76c30be6222795537198 days 1 hr ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90 Ether0.00113561
0x1da16566435ea76f740876a97771e39ee929225d5aac478d61be7c88d73602362795497198 days 1 hr ago0xa1b5f95be71ffa2f86adefcaa0028c46fe825161  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90 Ether0.00355556
0x77f7e6a283e8c65a3a624452215cb74cc517f0dc968e9603ac4277b3af8521db2532442241 days 14 hrs ago0xb39409c96412899b3fef189de1eddb5474ca3024  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.0036
0xbe04292332fbc0855241482bd299adc5e78ef0125fb9ede1d9f5b6eea3c75c622532369241 days 15 hrs ago0xb39409c96412899b3fef189de1eddb5474ca3024  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.00370046
0xa8767d2b5319a2c18b45bc1817238391d3f920f267f606fba6af3ee5631d585c2532266241 days 15 hrs ago0xb39409c96412899b3fef189de1eddb5474ca3024  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.00418806
0x62366bec0f210fa17f094f3d1778c772b1a4dbfdd1d72d7585e24f6fdd1448172532109241 days 16 hrs ago0x1a8195faf27390d66425db85a35ca2116ffc0181  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.0036
0x43e8ac0e4bd1721ed50a709e255657ea79aaba17ca5c66793d935122b996c6142532065241 days 16 hrs ago0xb39409c96412899b3fef189de1eddb5474ca3024  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.0036
0xd9475e63af3cf722517cc99638d3daccebc55bae9d2803cb8b46852e47dc17f02531899241 days 16 hrs ago0xb39409c96412899b3fef189de1eddb5474ca3024  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.0036
0x18bd4a9fb46e98538bfb55b5944c581a8aa14a9f2569da4ef9d1d8928f16f2af2531848241 days 17 hrs ago0x1a8195faf27390d66425db85a35ca2116ffc0181  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.0036
0x923a6fe54773f004d11bcf48e8ca9b8f319f4415f82f06a89646214e89c539f12531555241 days 18 hrs ago0x1a8195faf27390d66425db85a35ca2116ffc0181  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.0036
0xe7e49b2ea2d596f93ec234b44b25e4ba19cf555696fc50ab1eae6e18ee17449e2531555241 days 18 hrs ago0xac75b73394c329376c214663d92156afa864a77f  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.4 Ether0.0045
0x1d92d82f19ed372037b60d2df690ef25aa65aeecaa433baa82f0d50e7080bf352531555241 days 18 hrs ago0xf2e5d4f1668452bb3188b0ddf65ae8762522417e  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.221 Ether0.00468
0x1b4eebada54a4a52fe3523f1228ab93ed976daba6a38996a6d57dd4439b85afa2531528241 days 18 hrs ago0xb39409c96412899b3fef189de1eddb5474ca3024  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.0036
0x8ebb44a24d659a61c1991463b30a0208f1450b6f0c20453fd4b82f4d56a954e72531506241 days 18 hrs ago0xf2e5d4f1668452bb3188b0ddf65ae8762522417e  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.5 Ether0.00468005
0x94d83c6449b353cf616644ff444b48179081771f4b4a5a56e44a79968aa982da2531506241 days 18 hrs ago0xf2e5d4f1668452bb3188b0ddf65ae8762522417e  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.5 Ether0.00468
0x4ade343c9e0b442a3fc9f6029c316df610f7cbee64b7ba3d8dfb0d35f677f1282531499241 days 18 hrs ago0xfb14cb5cae7bb0108976da7aece6d4542182a1d0  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c90.22 Ether0.0036
0x8140d26803c5afdc8f01f89ed744061bcbf85ba2ec7acd4c8e622963252605692531499241 days 18 hrs ago0xf2e5d4f1668452bb3188b0ddf65ae8762522417e  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c91 Ether0.00468023
0x71a765d964e1327d676dacb61538875a4daa28f92ba154e9ad1ed47dde8b0acb2531492241 days 18 hrs ago0xf2e5d4f1668452bb3188b0ddf65ae8762522417e  IN   0x75a931567048edd4f349fa1a1cfbc4b4dca352c91 Ether0.00468

[Download: CSV Export ]    
 Internal Transactions as a result of Contract Execution
  Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0xb760c14a688f110adcedbd5a77f6871b0466859b199b42daa02f65cdb651ebde2842759190 days 6 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa1b5f95be71ffa2f86adefcaa0028c46fe82516144.503514293169165237 Ether
0x6490729e51acf44c3ede59b714afa1070b5f87640705701ae7e5a558f6894dd52287662282 days 5 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa1b5f95be71ffa2f86adefcaa0028c46fe8251610.207035504927289133 Ether
0x6490729e51acf44c3ede59b714afa1070b5f87640705701ae7e5a558f6894dd52287662282 days 5 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x2c48a308ba65a313e1b38282532af5707ea427ea20.496514987801624184 Ether
0x38c0d0339665f2eeeb98c2871235543b3067b03911657bc14e51ac11bb2346292287599282 days 5 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa1b5f95be71ffa2f86adefcaa0028c46fe8251610.001265529595015576 Ether
0x38c0d0339665f2eeeb98c2871235543b3067b03911657bc14e51ac11bb2346292287599282 days 5 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xc63b38cd6eda19d71d23c0decc7f80c4fbaec5441 wei
0x79e99ce385682159d633947afc019b235b725537f26a3fd3dccbaf84c75f92072287595282 days 5 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x001a589dda0d6be37632925eaf1256986b2c6ad00.0068940809968847 Ether
0x7b43ee66fcd7bde04f74b414b29484e91fc503666ad3ec8aaf192e4a08aeafaa2286419282 days 10 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x001a589dda0d6be37632925eaf1256986b2c6ad00.0068940809968847 Ether
0xa01709fd94addcf69385c9ab56b27f76da55ca87b5a4b5cd4a55ee5c64301b1c2266900285 days 16 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa1b5f95be71ffa2f86adefcaa0028c46fe8251610.01 Ether
0xa01709fd94addcf69385c9ab56b27f76da55ca87b5a4b5cd4a55ee5c64301b1c2266900285 days 16 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x897fd032f9bf2a32a61faea7d25e3007e0610fe40.99 Ether
0x7c800e0667fdc587c6e9445db6d62d069d5c1ad623ee8d534bc3667e9e9300d02258115287 days 3 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa1b5f95be71ffa2f86adefcaa0028c46fe8251610.001218321753515301 Ether
0x7c800e0667fdc587c6e9445db6d62d069d5c1ad623ee8d534bc3667e9e9300d02258115287 days 3 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xc4f613c71d41dbe58c80cd6c298d3c4e2babfd4c1 wei
0xe60faa84804b1c32e93d20c71ddd738c33b84751f1bedead9f6d0476208c13c62258110287 days 3 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x001a589dda0d6be37632925eaf1256986b2c6ad00.0071356492969396 Ether
0xb367fbbac6942fbdf6b187d9709bdc92185b619ec33a4d9e3f6f346036d45dd22258056287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xc4f613c71d41dbe58c80cd6c298d3c4e2babfd4c0.469436656079404504 Ether
0xd6abc70ddf776e494443708fd3b471807073b9a2dc976062429d42e143dc9f312258050287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x001a589dda0d6be37632925eaf1256986b2c6ad00.0071356492969396 Ether
0x1fdd82fc6a382dcc73fd25e69d07abc513688ad86a1ed1320d60cb0acfe6dc2a2257968287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xc4f613c71d41dbe58c80cd6c298d3c4e2babfd4c0.456453759468438598 Ether
0x959d06cec01c8a706fb86651e1decd7ba708c2192fd1d0c7df93ba05047976272257962287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x001a589dda0d6be37632925eaf1256986b2c6ad00.00715282392026575 Ether
0x5709fa75a32b16c7d35ac6c7bf018ea5e4e7b8423d580e7653fa7e514042cda22257901287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa1b5f95be71ffa2f86adefcaa0028c46fe8251610.001152235880398671 Ether
0x5709fa75a32b16c7d35ac6c7bf018ea5e4e7b8423d580e7653fa7e514042cda22257901287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa6ec0326ec3b265f9618bd08b86a12c447b550281 wei
0x5702869ab6d349f694349e58a99c62aba30a58a26e3bf7ed5c8d73cbefcb63e92257898287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x001a589dda0d6be37632925eaf1256986b2c6ad00.00715282392026575 Ether
0x06b71a6526aa7114e77de3ad3d44bf5f62400fb1952c930a510dc89422efe65e2257883287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xc4f613c71d41dbe58c80cd6c298d3c4e2babfd4c0.460770159468438598 Ether
0x582696a06ec0b0f77f8d95cae0f2f4ddbe5a281375596700b21cd7b29dfc552c2257875287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x001a589dda0d6be37632925eaf1256986b2c6ad00.00715282392026575 Ether
0x2a0a684d1bd40368baafb5f499480d9f4c8b14454455f0ed363f24f5702af9292257867287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa1b5f95be71ffa2f86adefcaa0028c46fe8251610.001196235880398671 Ether
0x2a0a684d1bd40368baafb5f499480d9f4c8b14454455f0ed363f24f5702af9292257867287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xb844aace5e56cae327aaef2f42bcdc841eee9d491 wei
0x15dfc32f335a20609dc6dbabb1cb926b847068153acff328ca23b55beec84ebf2257860287 days 4 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90x001a589dda0d6be37632925eaf1256986b2c6ad00.00715282392026575 Ether
0x69d934d53be3fab74eb363c76aefc89b40ede059dfcc720c5c52b2ff327a458e2253419287 days 22 hrs ago0x75a931567048edd4f349fa1a1cfbc4b4dca352c90xa1b5f95be71ffa2f86adefcaa0028c46fe8251610.001141355904211395 Ether

[Download: CSV Export ]    
Contract Name: Dice
Compiler Version: v0.3.5-2016-07-01-48238c9
Optimization Enabled: Yes
Online Solidity Editor:  -NA-



  Contract Source Code   Find Similiar Contracts
// <ORACLIZE_API>
/*
Copyright (c) 2015-2016 Oraclize srl, Thomas Bertani



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.
*/

contract OraclizeI {
    address public cbAddress;
    function query(uint _timestamp, string _datasource, string _arg) returns (bytes32 _id);
    function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) returns (bytes32 _id);
    function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) returns (bytes32 _id);
    function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) 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 setCustomGasPrice(uint _gasPrice);
}
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 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 {
        address oraclizeAddr = OAR.getAddress();
        if (oraclizeAddr == 0){
            oraclize_setNetwork(networkID_auto);
            oraclizeAddr = OAR.getAddress();
        }
        oraclize = OraclizeI(oraclizeAddr);
        _
    }
    modifier coupon(string code){
        oraclize = OraclizeI(OAR.getAddress());
        oraclize.useCoupon(code);
        _
    }

    function oraclize_setNetwork(uint8 networkID) internal returns(bool){
        if (getCodeSize(0x1d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed)>0){
            OAR = OraclizeAddrResolverI(0x1d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed);
            return true;
        }
        if (getCodeSize(0x9efbea6358bed926b293d2ce63a730d6d98d43dd)>0){
            OAR = OraclizeAddrResolverI(0x9efbea6358bed926b293d2ce63a730d6d98d43dd);
            return true;
        }
        if (getCodeSize(0x20e12a1f859b3feae5fb2a0a32c18f5a65555bbf)>0){
            OAR = OraclizeAddrResolverI(0x20e12a1f859b3feae5fb2a0a32c18f5a65555bbf);
            return true;
        }
        return false;
    }

    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_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 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 >= 48)&&(b1 <= 57)) b1 -= 48;
            if ((b2 >= 97)&&(b2 <= 102)) b2 -= 87;
            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;
    }


}
// </ORACLIZE_API>

contract Dice is usingOraclize {

    uint public pwin = 5000; //probability of winning (10000 = 100%)
    uint public edge = 200; //edge percentage (10000 = 100%)
    uint public maxWin = 100; //max win (before edge is taken) as percentage of bankroll (10000 = 100%)
    uint public minBet = 1 finney;
    uint public maxInvestors = 5; //maximum number of investors
    uint public houseEdge = 50; //edge percentage (10000 = 100%)
    uint public divestFee = 50; //divest fee percentage (10000 = 100%)
    uint public emergencyWithdrawalRatio = 90; //ratio percentage (100 = 100%)

    uint safeGas = 25000;
    uint constant ORACLIZE_GAS_LIMIT = 125000;
    uint constant INVALID_BET_MARKER = 99999;
    uint constant EMERGENCY_TIMEOUT = 7 days;

    struct Investor {
        address investorAddress;
        uint amountInvested;
        bool votedForEmergencyWithdrawal;
    }

    struct Bet {
        address playerAddress;
        uint amountBetted;
        uint numberRolled;
    }

    struct WithdrawalProposal {
        address toAddress;
        uint atTime;
    }

    //Starting at 1
    mapping(address => uint) public investorIDs;
    mapping(uint => Investor) public investors;
    uint public numInvestors = 0;

    uint public invested = 0;

    address owner;
    address houseAddress;
    bool public isStopped;

    WithdrawalProposal public proposedWithdrawal;

    mapping (bytes32 => Bet) bets;
    bytes32[] betsKeys;

    uint public amountWagered = 0;
    uint public investorsProfit = 0;
    uint public investorsLoses = 0;
    bool profitDistributed;

    event BetWon(address playerAddress, uint numberRolled, uint amountWon);
    event BetLost(address playerAddress, uint numberRolled);
    event EmergencyWithdrawalProposed();
    event EmergencyWithdrawalFailed(address withdrawalAddress);
    event EmergencyWithdrawalSucceeded(address withdrawalAddress, uint amountWithdrawn);
    event FailedSend(address receiver, uint amount);
    event ValueIsTooBig();

    function Dice(uint pwinInitial,
                  uint edgeInitial,
                  uint maxWinInitial,
                  uint minBetInitial,
                  uint maxInvestorsInitial,
                  uint houseEdgeInitial,
                  uint divestFeeInitial,
                  uint emergencyWithdrawalRatioInitial
                  ) {

        oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS);

        pwin = pwinInitial;
        edge = edgeInitial;
        maxWin = maxWinInitial;
        minBet = minBetInitial;
        maxInvestors = maxInvestorsInitial;
        houseEdge = houseEdgeInitial;
        divestFee = divestFeeInitial;
        emergencyWithdrawalRatio = emergencyWithdrawalRatioInitial;
        owner = msg.sender;
        houseAddress = msg.sender;
    }

    //SECTION I: MODIFIERS AND HELPER FUNCTIONS

    //MODIFIERS

    modifier onlyIfNotStopped {
        if (isStopped) throw;
        _
    }

    modifier onlyIfStopped {
        if (!isStopped) throw;
        _
    }

    modifier onlyInvestors {
        if (investorIDs[msg.sender] == 0) throw;
        _
    }

    modifier onlyNotInvestors {
        if (investorIDs[msg.sender] != 0) throw;
        _
    }

    modifier onlyOwner {
        if (owner != msg.sender) throw;
        _
    }

    modifier onlyOraclize {
        if (msg.sender != oraclize_cbAddress()) throw;
        _
    }

    modifier onlyMoreThanMinInvestment {
        if (msg.value <= getMinInvestment()) throw;
        _
    }

    modifier onlyMoreThanZero {
        if (msg.value == 0) throw;
        _
    }

    modifier onlyIfBetSizeIsStillCorrect(bytes32 myid) {
        Bet thisBet = bets[myid];
        if ((((thisBet.amountBetted * ((10000 - edge) - pwin)) / pwin ) <= (maxWin * getBankroll()) / 10000)) {
             _
        }
        else {
            bets[myid].numberRolled = INVALID_BET_MARKER;
            safeSend(thisBet.playerAddress, thisBet.amountBetted);
            return;
        }
    }

    modifier onlyIfValidRoll(bytes32 myid, string result) {
        Bet thisBet = bets[myid];
        uint numberRolled = parseInt(result);
        if ((numberRolled < 1 || numberRolled > 10000) && thisBet.numberRolled == 0) {
            bets[myid].numberRolled = INVALID_BET_MARKER;
            safeSend(thisBet.playerAddress, thisBet.amountBetted);
            return;
        }
        _
    }

    modifier onlyIfInvestorBalanceIsPositive(address currentInvestor) {
        if (getBalance(currentInvestor) >= 0) {
            _
        }
    }

    modifier onlyWinningBets(uint numberRolled) {
        if (numberRolled - 1 < pwin) {
            _
        }
    }

    modifier onlyLosingBets(uint numberRolled) {
        if (numberRolled - 1 >= pwin) {
            _
        }
    }

    modifier onlyAfterProposed {
        if (proposedWithdrawal.toAddress == 0) throw;
        _
    }

    modifier rejectValue {
        if (msg.value != 0) throw;
        _
    }

    modifier onlyIfProfitNotDistributed {
        if (!profitDistributed) {
            _
        }
    }

    modifier onlyIfValidGas(uint newGasLimit) {
        if (newGasLimit < 25000) throw;
        _
    }

    modifier onlyIfNotProcessed(bytes32 myid) {
        Bet thisBet = bets[myid];
        if (thisBet.numberRolled > 0) throw;
        _
    }

    modifier onlyIfEmergencyTimeOutHasPassed {
        if (proposedWithdrawal.atTime + EMERGENCY_TIMEOUT > now) throw;
        _
    }


    //CONSTANT HELPER FUNCTIONS

    function getBankroll() constant returns(uint) {
        return invested + investorsProfit - investorsLoses;
    }

    function getMinInvestment() constant returns(uint) {
        if (numInvestors == maxInvestors) {
            uint investorID = searchSmallestInvestor();
            return getBalance(investors[investorID].investorAddress);
        }
        else {
            return 0;
        }
    }

    function getStatus() constant returns(uint, uint, uint, uint, uint, uint, uint, uint, uint) {

        uint bankroll = getBankroll();

        uint minInvestment = getMinInvestment();

        return (bankroll, pwin, edge, maxWin, minBet, amountWagered, (investorsProfit - investorsLoses), minInvestment, betsKeys.length);
    }

    function getBet(uint id) constant returns(address, uint, uint) {
        if (id < betsKeys.length) {
            bytes32 betKey = betsKeys[id];
            return (bets[betKey].playerAddress, bets[betKey].amountBetted, bets[betKey].numberRolled);
        }
    }

    function numBets() constant returns(uint) {
        return betsKeys.length;
    }

    function getMinBetAmount() constant returns(uint) {
        uint oraclizeFee = OraclizeI(OAR.getAddress()).getPrice("URL", ORACLIZE_GAS_LIMIT + safeGas);
        return oraclizeFee + minBet;
    }

    function getMaxBetAmount() constant returns(uint) {
        uint oraclizeFee = OraclizeI(OAR.getAddress()).getPrice("URL", ORACLIZE_GAS_LIMIT + safeGas);
        uint betValue =  (maxWin * getBankroll()) * pwin / (10000 * (10000 - edge - pwin));
        return betValue + oraclizeFee;
    }

    function getLosesShare(address currentInvestor) constant returns (uint) {
        return investors[investorIDs[currentInvestor]].amountInvested * (investorsLoses) / invested;
    }

    function getProfitShare(address currentInvestor) constant returns (uint) {
        return investors[investorIDs[currentInvestor]].amountInvested * (investorsProfit) / invested;
    }

    function getBalance(address currentInvestor) constant returns (uint) {
        return investors[investorIDs[currentInvestor]].amountInvested + getProfitShare(currentInvestor) - getLosesShare(currentInvestor);
    }

    function searchSmallestInvestor() constant returns(uint) {
        uint investorID = 1;
        for (uint i = 1; i <= numInvestors; i++) {
            if (getBalance(investors[i].investorAddress) < getBalance(investors[investorID].investorAddress)) {
                investorID = i;
            }
        }

        return investorID;
    }

    // PRIVATE HELPERS FUNCTION

    function safeSend(address addr, uint value) private {
        if (this.balance < value) {
            ValueIsTooBig();
            return;
        }

        if (!(addr.call.gas(safeGas).value(value)())) {
            FailedSend(addr, value);
            if (addr != houseAddress) {
                //Forward to house address all change
                if (!(houseAddress.call.gas(safeGas).value(value)())) FailedSend(houseAddress, value);
            }
        }
    }

    function addInvestorAtID(uint id) private {
        investorIDs[msg.sender] = id;
        investors[id].investorAddress = msg.sender;
        investors[id].amountInvested = msg.value;
        invested += msg.value;
    }

    function profitDistribution() private onlyIfProfitNotDistributed {
        uint copyInvested;

        for (uint i = 1; i <= numInvestors; i++) {
            address currentInvestor = investors[i].investorAddress;
            uint profitOfInvestor = getProfitShare(currentInvestor);
            uint losesOfInvestor = getLosesShare(currentInvestor);
            investors[i].amountInvested += profitOfInvestor - losesOfInvestor;
            copyInvested += investors[i].amountInvested;
        }

        delete investorsProfit;
        delete investorsLoses;
        invested = copyInvested;

        profitDistributed = true;
    }

    // SECTION II: BET & BET PROCESSING

    function() {
        bet();
    }

    function bet() onlyIfNotStopped onlyMoreThanZero {
        uint oraclizeFee = OraclizeI(OAR.getAddress()).getPrice("URL", ORACLIZE_GAS_LIMIT + safeGas);
        uint betValue = msg.value - oraclizeFee;
        if ((((betValue * ((10000 - edge) - pwin)) / pwin ) <= (maxWin * getBankroll()) / 10000) && (betValue >= minBet)) {
            // encrypted arg: '\n{"jsonrpc":2.0,"method":"generateSignedIntegers","params":{"apiKey":"YOUR_API_KEY","n":1,"min":1,"max":10000},"id":1}'
            bytes32 myid = oraclize_query("URL", "json(https://api.random.org/json-rpc/1/invoke).result.random.data.0","BEcosMZz8Ae1B5UK80b8W1Lz0TQJiaaOFzYqDf00FtJ3Nqy6C4JgY4KlavaMh+QDQRHJrBDHBznTT+GClNKbeSAv8THZDdyIR58a4GME53+OI1VNoV0SzpKwdVWkVrQnrHr8VyzMFd8XrqicVlN5fcC+39WqzEKaSguPaWotB5XSfgTaj1t/0b6P+V3ma+AIXVbacP7MOeFq/dA4Y80KhYZalvdnau9KUX4YJX9oAw5fSExp++1MhEzmda0RMpU5MPm2OrbdJOnOVD3C3DYxWFXGZXImYBRCzp8f7Fhc6+U=", ORACLIZE_GAS_LIMIT + safeGas);
            bets[myid] = Bet(msg.sender, betValue, 0);
            betsKeys.push(myid);
        }
        else {
            throw;
        }
    }

    function __callback (bytes32 myid, string result, bytes proof)
        onlyOraclize
        onlyIfNotProcessed(myid)
        onlyIfValidRoll(myid, result)
        onlyIfBetSizeIsStillCorrect(myid)  {

        Bet thisBet = bets[myid];
        uint numberRolled = parseInt(result);
        bets[myid].numberRolled = numberRolled;
        isWinningBet(thisBet, numberRolled);
        isLosingBet(thisBet, numberRolled);
        amountWagered += thisBet.amountBetted;
        delete profitDistributed;
    }

    function isWinningBet(Bet thisBet, uint numberRolled) private onlyWinningBets(numberRolled) {
        uint winAmount = (thisBet.amountBetted * (10000 - edge)) / pwin;
        BetWon(thisBet.playerAddress, numberRolled, winAmount);
        safeSend(thisBet.playerAddress, winAmount);
        investorsLoses += (winAmount - thisBet.amountBetted);
    }

    function isLosingBet(Bet thisBet, uint numberRolled) private onlyLosingBets(numberRolled) {
        BetLost(thisBet.playerAddress, numberRolled);
        safeSend(thisBet.playerAddress, 1);
        investorsProfit += (thisBet.amountBetted - 1)*(10000 - houseEdge)/10000;
        uint houseProfit = (thisBet.amountBetted - 1)*(houseEdge)/10000;
        safeSend(houseAddress, houseProfit);
    }

    //SECTION III: INVEST & DIVEST

    function increaseInvestment() onlyIfNotStopped onlyMoreThanZero onlyInvestors  {
        profitDistribution();
        investors[investorIDs[msg.sender]].amountInvested += msg.value;
        invested += msg.value;
    }

    function newInvestor()
        onlyIfNotStopped
        onlyMoreThanZero
        onlyNotInvestors
        onlyMoreThanMinInvestment {

        profitDistribution();

        if (numInvestors == maxInvestors) {
            uint smallestInvestorID = searchSmallestInvestor();
            divest(investors[smallestInvestorID].investorAddress);
        }

        numInvestors++;
        addInvestorAtID(numInvestors);
    }

    function divest() onlyInvestors rejectValue {
        divest(msg.sender);
    }


    function divest(address currentInvestor)
        private
        onlyIfInvestorBalanceIsPositive(currentInvestor) {

        profitDistribution();
        uint currentID = investorIDs[currentInvestor];
        uint amountToReturn = getBalance(currentInvestor);
        invested -= investors[currentID].amountInvested;
        uint divestFeeAmount =  (amountToReturn*divestFee)/10000;
        amountToReturn -= divestFeeAmount;

        delete investors[currentID];
        delete investorIDs[currentInvestor];
        //Reorder investors

        if (currentID != numInvestors) {
            // Get last investor
            Investor lastInvestor = investors[numInvestors];
            //Set last investor ID to investorID of divesting account
            investorIDs[lastInvestor.investorAddress] = currentID;
            //Copy investor at the new position in the mapping
            investors[currentID] = lastInvestor;
            //Delete old position in the mappping
            delete investors[numInvestors];
        }

        numInvestors--;
        safeSend(currentInvestor, amountToReturn);
        safeSend(houseAddress, divestFeeAmount);
    }

    function forceDivestOfAllInvestors() onlyOwner rejectValue {
        uint copyNumInvestors = numInvestors;
        for (uint i = 1; i <= copyNumInvestors; i++) {
            divest(investors[1].investorAddress);
        }
    }

    /*
    The owner can use this function to force the exit of an investor from the
    contract during an emergency withdrawal in the following situations:
        - Unresponsive investor
        - Investor demanding to be paid in other to vote, the facto-blackmailing
        other investors
    */
    function forceDivestOfOneInvestor(address currentInvestor)
        onlyOwner
        onlyIfStopped
        rejectValue {

        divest(currentInvestor);
        //Resets emergency withdrawal proposal. Investors must vote again
        delete proposedWithdrawal;
    }

    //SECTION IV: CONTRACT MANAGEMENT

    function stopContract() onlyOwner rejectValue {
        isStopped = true;
    }

    function resumeContract() onlyOwner rejectValue {
        isStopped = false;
    }

    function changeHouseAddress(address newHouse) onlyOwner rejectValue {
        houseAddress = newHouse;
    }

    function changeOwnerAddress(address newOwner) onlyOwner rejectValue {
        owner = newOwner;
    }

    function changeGasLimitOfSafeSend(uint newGasLimit)
        onlyOwner
        onlyIfValidGas(newGasLimit)
        rejectValue {
        safeGas = newGasLimit;
    }

    //SECTION V: EMERGENCY WITHDRAWAL

    function voteEmergencyWithdrawal(bool vote)
        onlyInvestors
        onlyAfterProposed
        onlyIfStopped
        rejectValue {
        investors[investorIDs[msg.sender]].votedForEmergencyWithdrawal = vote;
    }

    function proposeEmergencyWithdrawal(address withdrawalAddress)
        onlyIfStopped
        onlyOwner
        rejectValue {

        //Resets previous votes
        for (uint i = 1; i <= numInvestors; i++) {
            delete investors[i].votedForEmergencyWithdrawal;
        }

        proposedWithdrawal = WithdrawalProposal(withdrawalAddress, now);
        EmergencyWithdrawalProposed();
    }

    function executeEmergencyWithdrawal()
        onlyOwner
        onlyAfterProposed
        onlyIfStopped
        onlyIfEmergencyTimeOutHasPassed
        rejectValue {

        uint numOfVotesInFavour;
        uint amountToWithdrawal = this.balance;

        for (uint i = 1; i <= numInvestors; i++) {
            if (investors[i].votedForEmergencyWithdrawal == true) {
                numOfVotesInFavour++;
                delete investors[i].votedForEmergencyWithdrawal;
            }
        }

        if (numOfVotesInFavour >= emergencyWithdrawalRatio * numInvestors / 100) {
            if (!proposedWithdrawal.toAddress.send(this.balance)) {
                EmergencyWithdrawalFailed(proposedWithdrawal.toAddress);
            }
            else {
                EmergencyWithdrawalSucceeded(proposedWithdrawal.toAddress, amountToWithdrawal);
            }
        }
        else {
            throw;
        }
    }

}

  Contract ABI  
[{"constant":false,"inputs":[],"name":"divest","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getBet","outputs":[{"name":"","type":"address"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"getBankroll","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"bet","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"currentInvestor","type":"address"}],"name":"getProfitShare","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"stopContract","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"numInvestors","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"maxWin","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"emergencyWithdrawalRatio","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"vote","type":"bool"}],"name":"voteEmergencyWithdrawal","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"newHouse","type":"address"}],"name":"changeHouseAddress","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"forceDivestOfAllInvestors","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"investorsLoses","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"},{"name":"proof","type":"bytes"}],"name":"__callback","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"isStopped","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"investors","outputs":[{"name":"investorAddress","type":"address"},{"name":"amountInvested","type":"uint256"},{"name":"votedForEmergencyWithdrawal","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"searchSmallestInvestor","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"withdrawalAddress","type":"address"}],"name":"proposeEmergencyWithdrawal","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"divestFee","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"getStatus","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"currentInvestor","type":"address"}],"name":"forceDivestOfOneInvestor","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"proposedWithdrawal","outputs":[{"name":"toAddress","type":"address"},{"name":"atTime","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"getMaxBetAmount","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"investorsProfit","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"investorIDs","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"getMinInvestment","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"getMinBetAmount","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwnerAddress","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"minBet","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"increaseInvestment","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"pwin","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"edge","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"maxInvestors","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"resumeContract","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"invested","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"newGasLimit","type":"uint256"}],"name":"changeGasLimitOfSafeSend","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"amountWagered","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"houseEdge","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"numBets","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"currentInvestor","type":"address"}],"name":"getLosesShare","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"executeEmergencyWithdrawal","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"currentInvestor","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"newInvestor","outputs":[],"type":"function"},{"inputs":[{"name":"pwinInitial","type":"uint256"},{"name":"edgeInitial","type":"uint256"},{"name":"maxWinInitial","type":"uint256"},{"name":"minBetInitial","type":"uint256"},{"name":"maxInvestorsInitial","type":"uint256"},{"name":"houseEdgeInitial","type":"uint256"},{"name":"divestFeeInitial","type":"uint256"},{"name":"emergencyWithdrawalRatioInitial","type":"uint256"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"numberRolled","type":"uint256"},{"indexed":false,"name":"amountWon","type":"uint256"}],"name":"BetWon","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"numberRolled","type":"uint256"}],"name":"BetLost","type":"event"},{"anonymous":false,"inputs":[],"name":"EmergencyWithdrawalProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"withdrawalAddress","type":"address"}],"name":"EmergencyWithdrawalFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"withdrawalAddress","type":"address"},{"indexed":false,"name":"amountWithdrawn","type":"uint256"}],"name":"EmergencyWithdrawalSucceeded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"receiver","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"FailedSend","type":"event"},{"anonymous":false,"inputs":[],"name":"ValueIsTooBig","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604081905261138860025560c8600355606460045566038d7ea4c68000600590815560065560326007819055600855605a6009556161a8600a556000600d819055600e81905560158190556016819055601755610100806125f18339610160604052905160805160a05160c05160e05194516101205161014051959694959394929361013a7f1100000000000000000000000000000000000000000000000000000000000000600080547f38cc483100000000000000000000000000000000000000000000000000000000610160908152600160a060020a03909116906338cc4831906101649060209060048187876161da5a03f1156100025750506040515191600160a060020a0383161415905061024d576101dc6000600060006102c9731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed5b3b90565b876002600050819055508660036000508190555085600460005081905550846005600050819055508360066000508190555082600760005081905550816008600050819055508060096000508190555033600f60006101000a815481600160a060020a030219169083021790555033601060006101000a815481600160a060020a0302191690830217905550505050505050505061224f806103a26000396000f35b50600060009054906101000a9004600160a060020a0316600160a060020a03166338cc4831604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f115610002575050604051519150505b60018054600160a060020a031916821790819055604080517f688dcfd7000000000000000000000000000000000000000000000000000000008152600481018590529051600160a060020a03929092169163688dcfd791602481810192600092909190829003018183876161da5a03f115610002575050505050565b11156102fc57508054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17815560015b919050565b600061031b739efbea6358bed926b293d2ce63a730d6d98d43dd610136565b111561034f57508054739efbea6358bed926b293d2ce63a730d6d98d43dd600160a060020a031990911617815560016102f7565b600061036e7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf610136565b11156102f7575080547320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600160a060020a031990911617815560016102f756606060405236156101ed5760e060020a6000350463058aace181146101f8578063061e494f1461021f5780630d1fce421461029f57806311610c25146102b2578063116c6eab146102d657806312253a6c14610314578063132ae5e91461033357806316d190e31461033c57806317c5fed814610345578063187a62d51461034e5780631efb17ee14610378578063232523e81461039a578063333e1a72146103be57806338bbfa50146103c75780633f683b6a146104cc5780633feb5f2b146104df57806340a49a96146105135780634671e65e146105475780634dc6b523146105685780634e69d5601461057157806351404cbe14610592578063518496b2146105b4578063550ed1f0146105cb57806366aee0fc146106b85780636be80de7146106c1578063724ae9d0146106d957806382a5285d146106f657806385eac05f146107d25780639619367d146107f4578063a4beffa7146107fd578063a96a5a5b14610817578063adc2c98a14610820578063bc99cc3714610829578063c4bc5da514610832578063cafb220214610851578063d21d79501461085a578063d4c80edf1461087c578063d667dcd714610885578063df06f9061461088e578063e0e3ba5a14610899578063f4993bbd146108d6578063f8b2cb4f146108fc578063fb099c841461090e575b61092c61092e6102b6565b61092c33600160a060020a03166000908152600b60205260408120541415610d5e57610002565b6109306004356014546000908190819081908510156102975760148054869081101561000257505050507fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec83015490819052601360205260409091208054600182015460029290920154600160a060020a0391909116925b509193909250565b6109595b601754601654600e5401035b90565b61092c5b600060006000601060149054906101000a900460ff1615610a1757610002565b6109596004355b600e54601654600160a060020a0383166000908152600b60209081526040808320548352600c90915290206001015402045b919050565b61092c600f54600160a060020a039081163390911614610d8457610002565b610959600d5481565b61095960045481565b61095960095481565b61092c60043533600160a060020a03166000908152600b60205260408120541415610ded57610002565b61092c600435600f54600160a060020a039081163390911614610e2b57610002565b61092c600f546000908190600160a060020a039081163390911614610e4d57610002565b61095960175481565b60408051602060248035600481810135601f810185900485028601850190965285855261092c9581359591946044949293909201918190840183828082843750506040805160209735808a0135601f81018a90048a0283018a01909352828252969897606497919650602491909101945090925082915084018382808284375094965050505050505060006000610f4460006000600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060405151915050600160a060020a038116821415611d7a57611d226000610c6a565b61096b60105460a060020a900460ff1681565b600c602052600435600090815260409020600181015481546002929092015461097f92600160a060020a0316919060ff1683565b6109595b60006001805b600d548111611296576000828152600c602052604090205461129f90600160a060020a0316610903565b61092c60043560105460009060a060020a900460ff1615156112d257610002565b61095960085481565b6109aa6000600060006000600060006000600060006000600061137f6102a3565b61092c600435600f54600160a060020a0390811633909116146113e057610002565b6011546012546109f191600160a060020a03169082565b610959600060006000600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604080518051600a5460e260020a630bbceb330283526201e848016024830152600482018390526003604483015260ea60020a621554930260648301529151600160a060020a03929092169250632ef3accc916084828101926020929190829003018187876161da5a03f1156100025750506040515160025460035491945061271091820381900390910291506114266102a3565b61095960165481565b610959600435600b6020526000908152604090205481565b6109595b600654600d5460009182911415610d5557611438610517565b61095960006000600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604080518051600a5460e260020a630bbceb330283526201e848016024830152600482018390526003604483015260ea60020a621554930260648301529151600160a060020a03929092169250632ef3accc916084828101926020929190829003018187876161da5a03f11561000257505060405151600554810193509150610d5a9050565b61092c600435600f54600160a060020a03908116339091161461146357610002565b61095960055481565b61092c60105460a060020a900460ff161561148557610002565b61095960025481565b61095960035481565b61095960065481565b61092c600f54600160a060020a03908116339091161461153f57610002565b610959600e5481565b61092c600435600f54600160a060020a03908116339091161461156c57610002565b61095960155481565b61095960075481565b6109596014546102af565b6109596004355b600e54601754600160a060020a0383166000908152600b60209081526040808320548352600c909152902060010154020461030f565b61092c600f5460009081908190600160a060020a03908116339091161461158f57610002565b6109596004355b6000611710826108a0565b61092c60105460009060ff60a060020a909104161561174b57610002565b005b565b60408051600160a060020a03949094168452602084019290925282820152519081900360600190f35b60408051918252519081900360200190f35b604080519115158252519081900360200190f35b60408051600160a060020a039490941684526020840192909252151582820152519081900360600190f35b60408051998a5260208a0198909852888801969096526060880194909452608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b6040518083600160a060020a031681526020018281526020019250505060405180910390f35b3460001415610a2557610002565b600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604080518051600a5460e260020a630bbceb330283526201e848016024830152600482018390526003604483015260ea60020a621554930260648301529151600160a060020a03929092169250632ef3accc91608480830192602092919082900301816000876161da5a03f11561000257505060405151935050348390039150612710610aff6102a3565b6004600050540204600260005054600260005054600360005054612710030384020411158015610b3157506005548210155b15610c8b576040805180820182526003815260ea60020a62155493026020828101919091528251608081018452604381527f6a736f6e2868747470733a2f2f6170692e72616e646f6d2e6f72672f6a736f6e818301527f2d7270632f312f696e766f6b65292e726573756c742e72616e646f6d2e646174818501527f612e30000000000000000000000000000000000000000000000000000000000060608201528351610160810190945261012c808552610c9094919261212390830139600a546201e84801600060006000600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060405151915050600160a060020a0381168214156118835761182b60005b60006000611fa8731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed5b3b90565b610002565b604080516060810182523381526020818101868152600083850181815286825260139093529390932091518254600160a060020a031916178255915160018281019190915591516002919091015560148054918201808255929350918281838015829011610d3d576000839052610d3d907fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec9081019083015b80821115610d5a5760008155600101610d29565b5050506000928352506020909120018190555b505050565b600091505b5090565b34600014610d6b57610002565b61092e335b6000600060006000846000611b0282610903565b34600014610d9157610002565b6010805474ff0000000000000000000000000000000000000000191660a060020a179055565b33600160a060020a03166000908152600b60209081526040808320548352600c9091529020600201805460ff1916821790555b50565b601154600160a060020a031660001415610e0657610002565b60105460a060020a900460ff161515610e1e57610002565b34600014610db757610002565b34600014610e3857610002565b60108054600160a060020a0319168217905550565b34600014610e5a57610002565b5050600d5460015b818111610f12576001600052600c6020527fd421a5181c571bba3f01190c922c3b2a896fc1d84e86c9f17ac10e67ebef8b5c54610f1690600160a060020a0316610d70565b60008281526013602052604090206201869f600291909101558054600182015461128991600160a060020a0316905b8030600160a060020a0316311015611e00576040517f9bc0f7b8676ac8a3d913fc962a472bc40103acaa27e5477c1eadfbb7d4897a0490600090a15b5050565b600101610e62565b6015805460018c01540190556018805460ff1916905550505050505050505b5050505050565b600160a060020a031633600160a060020a0316141515610f6357610002565b600085815260136020526040812060028101548792901115610f8457610002565b6000878152601360205260408120889188919061105a835b6000611df98260006040805160208101909152600090819052828180805b835181101561103c57603060f860020a028482815181101561000257016020015160f860020a9081900402600160f860020a031916108015906110275750603960f860020a028482815181101561000257016020015160f860020a9081900402600160f860020a03191611155b1561208e5781156120ef5785600014156120e6575b600086111561104f57600a86900a909202915b509095945050505050565b9050600181108061106c575061271081115b801561107c575060028201546000145b156110b45760008481526013602052604090206201869f60029190910155815460018301546110cf91600160a060020a031690610ed6565b60008b81526013602052604090208b906127106110da6102a3565b505050505050610f3d565b6004600050540204600260005054600260005054600360005054612710030383600101600050540204111515610ea75760008d815260136020526040902099506111238c610f9c565b60008e815260136020908152604091829020600290810184905582516060810184528e54600160a060020a0316815260018f0154928101929092528d0154918101919091529099506111f3908a600081600260005054600182031015611f0a57604080516002546003548751602089810151600160a060020a03929092168552840186905261271091909103020481830181905291519193507f8f25eec129b997ba51175c8f2583cafbfc0c076ef19e2c455869730f969ec44d919081900360600190a18351611ef89083610ed6565b604080516060810182528b54600160a060020a0316815260018c0154602082015260028c015491810191909152610f1e908a6002546000908290600019820110611f0a57604080518551600160a060020a031681526020810183905281517fcb9c7189736051e86837ee4847c751bad47c86cb506933875ff8fabf9eeda008929181900390910190a18351611f10906001610ed6565b5050505050505050610f3d565b8192505b505090565b6000828152600c60205260409020546112c090600160a060020a0316610903565b10156112ca579050805b60010161051d565b600f54600160a060020a0390811633909116146112ee57610002565b346000146112fb57610002565b5060015b600d548111611329576000818152600c60205260409020600201805460ff191690556001016112ff565b6040805180820182528381524260209190910181905260118054600160a060020a03191685179055601255517ffc136941d6f5a7fa31fea543bdc05be2e77ce86110b5fe83706976590c0d399590600090a15050565b91506113896106dd565b90508160026000505460036000505460046000505460056000505460156000505460176000505460166000505403876014600050805490509a509a509a509a509a509a509a509a509a505050909192939495969798565b60105460a060020a900460ff1615156113f857610002565b3460001461140557610002565b61140e81610d70565b60118054600160a060020a0319169055600060125550565b6004540202048083019350905061129a565b6000818152600c602052604090205490915061145c90600160a060020a0316610903565b9150610d5a565b3460001461147057610002565b600f8054600160a060020a0319168217905550565b346000141561149357610002565b33600160a060020a03166000908152600b602052604081205414156114b757610002565b6115035b601854600090819081908190819060ff161515610f3d57600193505b600d548411611f50576000848152600c6020526040902054600160a060020a03169250611f70836102dd565b33600160a060020a03166000908152600b60209081526040808320548352600c9091529020600101805434908101909155600e80549091019055565b3460001461154c57610002565b6010805474ff000000000000000000000000000000000000000019169055565b806161a881101561157c57610002565b3460001461158957610002565b50600a55565b601154600160a060020a0316600014156115a857610002565b60105460a060020a900460ff1615156115c057610002565b6012544262093a8090910111156115d657610002565b346000146115e357610002565b505030600160a060020a03163160015b600d548111611644576000818152600c602052604090206002015460ff1615156001141561163c576040600090812060020180549183905260ff19919091169055600192909201915b6001016115f3565b600d5460095460649102048310610c8b57604051601154600160a060020a03908116916000913016319082818181858883f1935050505015156116c45760408051601154600160a060020a0316815290517f3b66c41562b841e29923849dc45ac54e17eb64f534c62109ba2cc1e977f8ddaf9181900360200190a161170b565b60408051601154600160a060020a031681526020810184905281517f969fa9d259520e00fd561cbd5c523032e2682528b2be25d2380088b332503814929181900390910190a15b610d50565b611719836102dd565b600160a060020a0384166000908152600b60209081526040808320548352600c9091529020600101540103905061030f565b346000141561175957610002565b33600160a060020a03166000908152600b60205260408120541461177c57610002565b6117846106dd565b341161178f57610002565b6117976114bb565b600d5460065414156117cf576117ab610517565b6000818152600c60205260409020549091506117cf90600160a060020a0316610d70565b600d805460019081019182905533600160a060020a0381166000908152600b60209081526040808320869055948252600c9052929092208054600160a060020a0319169092178255349101819055600e80549091019055610dea565b50600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051519150505b60018054600160a060020a0319168217908190556040805160e260020a630bbceb330281526024810187905260048181019283528a5160448301528a51600160a060020a039490941693632ef3accc938c938a939192839260649290920191602087810192918291859183918691600091601f850104600f02600301f150905090810190601f16801561192a5780820380516001836020036101000a031916815260200191505b5093505050506020604051808303816000876161da5a03f115610002575050604051519250503a8402670de0b6b3a7640000018211156119735750600091505b50949350505050565b600160009054906101000a9004600160a060020a0316600160a060020a03166385dee34c8360008a8a8a8a6040518760e060020a028152600401808681526020018060200180602001806020018581526020018481038452888181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f168015611a1e5780820380516001836020036101000a031916815260200191505b508481038352878181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f168015611a775780820380516001836020036101000a031916815260200191505b508481038252868181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f168015611ad05780820380516001836020036101000a031916815260200191505b509850505050505050505060206040518083038185886185025a03f11561000257505060405151945061196a92505050565b10611d1a57611b0f6114bb565b600160a060020a0386166000908152600b60205260409020549450611b3386610903565b6000868152600c60209081526040808320600181018054600e80549190910390556008548254600160a060020a031916835590859055600291909101805460ff19169055600160a060020a038b168452600b909252822091909155600d54612710918302919091049182900395509093508514611cf057600c6000506000600d600050548152602001908152602001600020600050915084600b60005060008460000160009054906101000a9004600160a060020a0316600160a060020a031681526020019081526020016000206000508190555081600c60005060008781526020019081526020016000206000506000820160009054906101000a9004600160a060020a03168160000160006101000a815481600160a060020a0302191690830217905550600182016000505481600101600050556002820160009054906101000a900460ff168160020160006101000a81548160ff02191690830217905550905050600c6000506000600d60005054815260200190815260200160002060006000820160006101000a815490600160a060020a03021916905560018201600050600090556002820160006101000a81549060ff021916905550505b600d8054600019019055611d048685610ed6565b601054611d1a90600160a060020a031684610ed6565b505050505050565b50600060009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051519150505b60018054600160a060020a031916821790819055604080517fc281d19e0000000000000000000000000000000000000000000000000000000081529051600160a060020a03929092169163c281d19e9160048181019260209290919082900301816000876161da5a03f1156100025750506040515192506102af915050565b905061030f565b604051600a54600160a060020a0384169183906000818181858888f193505050501515610f125760408051600160a060020a03841681526020810183905281517f3d14263aec0db87097e504ee7aca5316e879b2cc7f3b29f9c62d40e9bae04cee929181900390910190a1601054600160a060020a03838116911614610f1257604051601054600a54600160a060020a03919091169183906000818181858888f193505050501515610f125760105460408051600160a060020a039290921682526020820183905280517f3d14263aec0db87097e504ee7aca5316e879b2cc7f3b29f9c62d40e9bae04cee9281900390910190a15050565b60208401516017805491840390910190555b50505050565b600754602085015160168054612710600019939093018484038102849004919091019091556010549202049250611f0a90600160a060020a031683610ed6565b5050600060168190556017555050600e556018805460ff19166001179055565b9150611f7b836108a0565b6000858152600c6020526040902060010180548285030190819055909501949050600193909301926114d7565b1115611fdc575060008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed179055600161030f565b6000611ffb739efbea6358bed926b293d2ce63a730d6d98d43dd610c87565b1115612031575060008054739efbea6358bed926b293d2ce63a730d6d98d43dd600160a060020a0319909116179055600161030f565b60006120507320e12a1f859b3feae5fb2a0a32c18f5a65555bbf610c87565b11156120865750600080547320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600160a060020a0319909116179055600161030f565b50600061030f565b8381815181101561000257016020015160f860020a9081900402600160f860020a0319167f2e0000000000000000000000000000000000000000000000000000000000000014156120de57600191505b600101610fba565b60001995909501945b600a83029250825060308482815181101561000257016020015160f860020a90819004810204909301602f190192506120de564245636f734d5a7a384165314235554b3830623857314c7a3054514a6961614f467a59714466303046744a334e71793643344a6759344b6c6176614d682b51445152484a72424448427a6e54542b47436c4e4b62655341763854485a446479495235386134474d4535332b4f4931564e6f5630537a704b776456576b5672516e7248723856797a4d4664385872716963566c4e356663432b333957717a454b615367755061576f7442355853666754616a31742f306236502b56336d612b4149585662616350374d4f6546712f6441345938304b68595a616c76646e6175394b555834594a58396f41773566534578702b2b314d68457a6d646130524d7055354d506d324f7262644a4f6e4f5644334333445978574658475a58496d594252437a70386637466863362b553d

    Constructor Arguments (ABI-encoded and appended to the ByteCode above)
000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000000be000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000002c68af0bb140000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000050

-----Decoded View---------------
Found 8 constructor arguments :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000be
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [3] : 00000000000000000000000000000000000000000000000002c68af0bb140000
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000050

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.