Contract 0xe64d5f33E28387855d33980719f27f0d579392aF

 

TxHash Block Age From To Value [TxFee]
0xaf3d9162f00ed201f00ce5fe1593c4a1cf6fe0f334713eae812e40eeb0ae2b6d5650597272 days 18 mins ago0x99ac9fbdb90aadd7a8971494a665df2a74c5715a  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000565718
0x7fdc532268a1a13f7e4eeb59c4cec1ee9a86b936adcc15c9cb0a892e5150678b5559114288 days 53 mins ago0x281474f04836ea033fe7d235604acace70b5e253  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000045094
0x9191934895553d69072cb747e0c19a193ff45b8afbd0ef82fde77963d6a57b8f5548720289 days 20 hrs ago0x8556e133535f8fad807fd63ecab2a59024a01c09  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000067641
0x40a92f25467252d582cc94d6f750903355c18247676899123aed89e67e642ff95547729290 days 58 mins ago0x18a45804f53dce2e22514c073f29e33f9e2e2d82  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000836769
0x1f60e7623134baba231ab148cc0aeff73d78eee5c207b944d6528e1d5879995f5537127291 days 21 hrs ago0xf4b1a7ebe2f92828aab10a25032db529343b9098  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000489816
0x9f70e201d1b4f4b226c37e4610cf32f2d8edd852523ff38fa1b1d76a072b95515487330300 days 13 hrs ago0x4bb2e46c986b9e699a54804aeb0d92253c62e2ef  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000022547
0x11ef6c06f3571319a0cb470e098cf9c94983e549e1c790182e0aa6ae5dd2c0fa5487303300 days 13 hrs ago0x4bb2e46c986b9e699a54804aeb0d92253c62e2ef  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000022547
0xbffd756a05e4ab449fb67a2415cf2e5841849aec11967e1d343dd834d60a098c5487288300 days 13 hrs ago0x4bb2e46c986b9e699a54804aeb0d92253c62e2ef  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000020409
0xc85b0f46a3ed9b72a6881eadab14e2242bcb19dc37e2f1f36ed0ffb94cdde9f15481588301 days 12 hrs ago0x20b5075e6bf9e0012ece7ba28e26f04b95541121  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000836769
0xd1549b5afddb69b1ae48bbd1ba2b5f900a4ff1d711564f8ef9b39b42aa8bbe085446715307 days 12 hrs ago0x39144a4325150c64a6db12ec2b2b7ffad519b44b  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000040818
0xeb5acbe3d6cbe3ffcec22b98d8cd0d3782e2a5c60c9a6bc0442c1b8a8d2887d45438576308 days 20 hrs ago0xf3b10a7341085927427ca2890b54d107caeff566  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000020409
0xfe104e710e53b2b1a62c98fba7a4082bfdcc729148e9d63d99d9622143182ef05434820309 days 12 hrs ago0xb64168a15f9a39dd6983abec36c623ec7dfaac8b  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000022547
0x1740cc3a15cebe566a5e046c1ebd0bce815cb1320ec39a0bbb2fcb3ede4acb265434798309 days 12 hrs ago0x001e53531401e2259f8ff470730352c197a900cb  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000836769
0xa702a3784c2dc1aaf487e338e933d77fedec73ccb2abd46880d4113b29730cd85429782310 days 8 hrs ago0xa5d386ba179ac37fc33a43666247132cf347e28e  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000020409
0x67bf696ab5882b1735f79ceba81c838b44a7652d9c52c8c72e359253ffe8524e5427703310 days 17 hrs ago0xd387a6e4e84a6c86bd90c158c6028a58cc8ac459  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000102045
0xa0568d627b981ceda1f3e36a9547506ff9db194e12fce3cb460557eec9f2c5f05420968311 days 20 hrs ago0xf263ca454d5f18b43e83c4876d30173f6f6ed3a9  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000090188
0x3900bc88702ae5708d646fbbc76590dbd5776473d4216a5dd3f6461ff1c443545416512312 days 14 hrs ago0x1b19dd8fe36dc22af896d7961d0605238a6beedc  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.0000248017
0x9d554af1e558be9a4c6e48e98567f18bdecde59ca5b4439ca1ad50a6550385875416498312 days 14 hrs ago0x1b19dd8fe36dc22af896d7961d0605238a6beedc  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000022547
0xd60fa68b0158af23114c87ef0f36af97821b5d1c148546a42a8a4e8e66e1f95d5410616313 days 13 hrs ago0x1b19dd8fe36dc22af896d7961d0605238a6beedc  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000022547
0x27b207a6addbc1be938220a7aa4d6ec1d872acf443894835957423a6e11e057b5410607313 days 13 hrs ago0x1b19dd8fe36dc22af896d7961d0605238a6beedc  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000020409
0x88b30f03a8b3c45c4863c1b3d1752865307368d9f31b0c74d30a337bff5d37015409343313 days 18 hrs ago0x2da0617c46386128c7dbd7643182a6228d741424  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000020409
0x870e35575fd77891d7fd43a1aa9b4b2ff457646de9455e2b085dc7322eb8c99d5396954315 days 19 hrs ago0x8d826e8634873038d9a6e1bf795663248b7623b8  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000020409
0x9db2e8db1f6e7eec6c04b3712ecd44bbfc28bef3d20aa1e4dab784753ac9fded5368629320 days 12 hrs ago0x1c59902da9b31ecc56adf94894dc0256c7b3328f  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.000020409
0x5b2e0bf0e766c9d7dcc9a354036f3ee0e50fcb78fda4d7eee73725f9e61b138d5365295321 days 1 hr ago0x0b26f72dff7e38f1f1ba20279e7e517fbf03e9f7  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.002212599954
0x820ff36209b6145ff52e2c12b1e344a7bfeba6aa536c01b4b8fddca366db241f5365291321 days 1 hr ago0x0b26f72dff7e38f1f1ba20279e7e517fbf03e9f7  IN   0xe64d5f33e28387855d33980719f27f0d579392af0 Ether0.00044252
[ Download CSV Export 

Latest 25 Internal Transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xaf3d9162f00ed201f00ce5fe1593c4a1cf6fe0f334713eae812e40eeb0ae2b6d5650597272 days 18 mins ago0xe64d5f33e28387855d33980719f27f0d579392af0x99ac9fbdb90aadd7a8971494a665df2a74c5715a8.6151759163439892 Ether
0x40a92f25467252d582cc94d6f750903355c18247676899123aed89e67e642ff95547729290 days 58 mins ago0xe64d5f33e28387855d33980719f27f0d579392af0x18a45804f53dce2e22514c073f29e33f9e2e2d820.08 Ether
0x1f60e7623134baba231ab148cc0aeff73d78eee5c207b944d6528e1d5879995f5537127291 days 21 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xf4b1a7ebe2f92828aab10a25032db529343b90980.0848 Ether
0xbffd756a05e4ab449fb67a2415cf2e5841849aec11967e1d343dd834d60a098c5487288300 days 13 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x4bb2e46c986b9e699a54804aeb0d92253c62e2ef0.144 Ether
0xc85b0f46a3ed9b72a6881eadab14e2242bcb19dc37e2f1f36ed0ffb94cdde9f15481588301 days 12 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x20b5075e6bf9e0012ece7ba28e26f04b955411210.4072 Ether
0xd1549b5afddb69b1ae48bbd1ba2b5f900a4ff1d711564f8ef9b39b42aa8bbe085446715307 days 12 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x39144a4325150c64a6db12ec2b2b7ffad519b44b0.00856 Ether
0xeb5acbe3d6cbe3ffcec22b98d8cd0d3782e2a5c60c9a6bc0442c1b8a8d2887d45438576308 days 20 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xf3b10a7341085927427ca2890b54d107caeff5660.08 Ether
0x1740cc3a15cebe566a5e046c1ebd0bce815cb1320ec39a0bbb2fcb3ede4acb265434798309 days 12 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x001e53531401e2259f8ff470730352c197a900cb0.060418048 Ether
0xa702a3784c2dc1aaf487e338e933d77fedec73ccb2abd46880d4113b29730cd85429782310 days 8 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xa5d386ba179ac37fc33a43666247132cf347e28e0.64 Ether
0x67bf696ab5882b1735f79ceba81c838b44a7652d9c52c8c72e359253ffe8524e5427703310 days 17 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xd387a6e4e84a6c86bd90c158c6028a58cc8ac4590.08 Ether
0x27b207a6addbc1be938220a7aa4d6ec1d872acf443894835957423a6e11e057b5410607313 days 13 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x1b19dd8fe36dc22af896d7961d0605238a6beedc0.08056 Ether
0x88b30f03a8b3c45c4863c1b3d1752865307368d9f31b0c74d30a337bff5d37015409343313 days 18 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x2da0617c46386128c7dbd7643182a6228d7414240.02 Ether
0x870e35575fd77891d7fd43a1aa9b4b2ff457646de9455e2b085dc7322eb8c99d5396954315 days 19 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x8d826e8634873038d9a6e1bf795663248b7623b80.0112 Ether
0x9db2e8db1f6e7eec6c04b3712ecd44bbfc28bef3d20aa1e4dab784753ac9fded5368629320 days 12 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x1c59902da9b31ecc56adf94894dc0256c7b3328f0.08 Ether
0x9173d11b25226de5b5effd9e7e0bbc333844c6017d008b1aff344e62d15b2b5b5363209321 days 10 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xa830f438f4e9d7fc325f200d6bf2676f0ffedcf80.0352 Ether
0x68d112550784c9774f8d86797d89e94b869ab3b79a5a2a44dbc67e585d571c1e5357392322 days 9 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xacecf17158d479154c28492525350978ea5195fb0.108 Ether
0x9a7ce2875c21743e54ad19d3292356e1618da3f7245f3d03baf32c1281c2420b5350658323 days 11 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xa5d68c04f24006741ddbe4283474af4dde64ff8b0.008895456 Ether
0x531d49c69df0bc4e3436ed747de3aaf9a0e6958cdc5eb0de6571d42b0503302a5346983324 days 2 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xa3b61695e46432e5cccd0427ad956fa146379d080.032 Ether
0x71d59d8f2c555a1c9f39f187066cd051c34465034117b1e02be4d1ec5cc580e95345739324 days 7 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x87fd5108a0124f1eeab26666c8fa7f5d8e1cd9a20.048 Ether
0xb13ace85b32cd392d5c549d16564d31b23c1ff2309f14d0997ad4bbca0a8253d5334765326 days 4 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x95e3785bc63975cb8a705b607f03bfc9667198620.08 Ether
0x5f83513c923c6c21eb421197db460ea70a792097ad7f67d01c546bd910f66a665320159328 days 14 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xefce62431cc66fac8b445f742e0064f2dc968aac4.52 Ether
0x07a50ea76d9a6b25aadf52f359011cc4a127eded41b15f8be8129c3c0aaf8dae5318767328 days 20 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0x15a909a12e291e08efddb4ea7061d6d0feb862550.0846573808 Ether
0xb78cfdf040783c910a4beb305d5dc30a6d325590c3297e7a413a90e5d922d4b25317497329 days 1 hr ago0xe64d5f33e28387855d33980719f27f0d579392af0xc062788d80124013c769a7593c33c1bf90c7b2520.32 Ether
0xdfe5bbe6970d205601540697ae1014d7b2c07d609980cdb3966f4a45caf8ce285312169329 days 22 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xd160d3394ec946a21f870bdd5b4093d5451e96000.8 Ether
0xe0de33c3fd2d5b9b0377321ce24c6768faa47779621a93636e4a18dd4b80c59b5307979330 days 15 hrs ago0xe64d5f33e28387855d33980719f27f0d579392af0xb2583993bd09572fbebd74b67b876e44c22a407b0.024 Ether
[ Download CSV Export 
Contract Self Destruct called at TxHash 0xaf3d9162f00ed201f00ce5fe1593c4a1cf6fe0f334713eae812e40eeb0ae2b6d

Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: Jackpot
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
//  Copyright (c) 2017, 2018 EtherJack.io. All rights reserved.
//  This code is disclosed only to be used for inspection and audit purposes.
//  Code modification and use for any purpose other than security audit
//  is prohibited. Creation of derived works or unauthorized deployment
//  of the code or any its portion to a blockchain is prohibited.

pragma solidity ^0.4.19;


contract HouseOwned {
    address house;

    modifier onlyHouse {
        require(msg.sender == house);
        _;
    }

    /// @dev Contract constructor
    function HouseOwned() public {
        house = msg.sender;
    }
}


// SafeMath is a part of Zeppelin Solidity library
// licensed under MIT License
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/LICENSE

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        assert(c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
    }
}

// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// ----------------------------------------------------------------------------
contract ERC20Interface {
    function totalSupply() public constant returns (uint);
    function balanceOf(address _owner) public constant returns (uint balance);
    function allowance(address _owner, address _spender) public constant returns (uint remaining);
    function transfer(address _to, uint _value) public returns (bool success);
    function approve(address _spender, uint _value) public returns (bool success);
    function transferFrom(address _from, address _to, uint _value) public returns (bool success);

    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed tokenOwner, address indexed spender, uint value);
}

contract Token is HouseOwned, ERC20Interface {
    using SafeMath for uint;

    // Public variables of the token
    string public name;
    string public symbol;
    uint8 public constant decimals = 0;
    uint256 public supply;

    // Trusted addresses
    Jackpot public jackpot;
    address public croupier;

    // All users' balances
    mapping (address => uint256) internal balances;
    // Users' deposits with Croupier
    mapping (address => uint256) public depositOf;
    // Total amount of deposits
    uint256 public totalDeposit;
    // Total amount of "Frozen Deposit Pool" -- the tokens for sale at Croupier
    uint256 public frozenPool;
    // Allowance mapping
    mapping (address => mapping (address => uint256)) internal allowed;

    //////
    /// @title Modifiers
    //

    /// @dev Only Croupier
    modifier onlyCroupier {
        require(msg.sender == croupier);
        _;
    }

    /// @dev Only Jackpot
    modifier onlyJackpot {
        require(msg.sender == address(jackpot));
        _;
    }

    /// @dev Protection from short address attack
    modifier onlyPayloadSize(uint size) {
        assert(msg.data.length == size + 4);
        _;
    }

    //////
    /// @title Events
    //

    /// @dev Fired when a token is burned (bet made)
    event Burn(address indexed from, uint256 value);

    /// @dev Fired when a deposit is made or withdrawn
    ///       direction == 0: deposit
    ///       direction == 1: withdrawal
    event Deposit(address indexed from, uint256 value, uint8 direction, uint256 newDeposit);

    /// @dev Fired when a deposit with Croupier is frozen (set for sale)
    event DepositFrozen(address indexed from, uint256 value);

    /// @dev Fired when a deposit with Croupier is unfrozen (removed from sale)
    //       Value is the resulting deposit, NOT the unfrozen amount
    event DepositUnfrozen(address indexed from, uint256 value);

    //////
    /// @title Constructor and Initialization
    //

    /// @dev Initializes contract with initial supply tokens to the creator of the contract
    function Token() HouseOwned() public {
        name = "JACK Token";
        symbol = "JACK";
        supply = 1000000;
    }

    /// @dev Function to set address of Jackpot contract once after creation
    /// @param _jackpot Address of the Jackpot contract
    function setJackpot(address _jackpot) onlyHouse public {
        require(address(jackpot) == 0x0);
        require(_jackpot != address(this)); // Protection from admin's mistake

        jackpot = Jackpot(_jackpot);

        uint256 bountyPortion = supply / 40;           // 2.5% is the bounty portion for marketing expenses
        balances[house] = bountyPortion;               // House receives the bounty tokens
        balances[jackpot] = supply - bountyPortion;    // Jackpot gets the rest

        croupier = jackpot.croupier();
    }

    //////
    /// @title Public Methods
    //


    /// @dev Croupier invokes this method to return deposits to players
    /// @param _to The address of the recipient
    /// @param _extra Additional off-chain credit (AirDrop support), so that croupier can return more than the user has actually deposited
    function returnDeposit(address _to, uint256 _extra) onlyCroupier public {
        require(depositOf[_to] > 0 || _extra > 0);
        uint256 amount = depositOf[_to];
        depositOf[_to] = 0;
        totalDeposit = totalDeposit.sub(amount);

        _transfer(croupier, _to, amount.add(_extra));

        Deposit(_to, amount, 1, 0);
    }

    /// @dev Gets the balance of the specified address.
    /// @param _owner The address
    function balanceOf(address _owner) public view returns (uint256 balance) {
        return balances[_owner];
    }
    
    function totalSupply() public view returns (uint256) {
        return supply;
    }

    /// @dev Send `_value` tokens to `_to`
    /// @param _to The address of the recipient
    /// @param _value the amount to send
    function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) {
        require(address(jackpot) != 0x0);
        require(croupier != 0x0);

        if (_to == address(jackpot)) {
            // It is a token bet. Ignoring _value, only using 1 token
            _burnFromAccount(msg.sender, 1);
            jackpot.betToken(msg.sender);
            return true;
        }

        if (_to == croupier && msg.sender != house) {
            // It's a deposit to Croupier. In addition to transferring the token,
            // mark it in the deposits table

            // House can't make deposits. If House is transferring something to
            // Croupier, it's just a transfer, nothing more

            depositOf[msg.sender] += _value;
            totalDeposit = totalDeposit.add(_value);

            Deposit(msg.sender, _value, 0, depositOf[msg.sender]);
        }

        // In all cases but Jackpot transfer (which is terminated by a return), actually
        // do perform the transfer
        return _transfer(msg.sender, _to, _value);
    }

    /// @dev Transfer tokens from one address to another
    /// @param _from address The address which you want to send tokens from
    /// @param _to address The address which you want to transfer to
    /// @param _value uint256 the amount of tokens to be transferred
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
        require(_to != address(0));
        require(_value <= balances[_from]);
        require(_value <= allowed[_from][msg.sender]);

        balances[_from] = balances[_from].sub(_value);
        balances[_to] = balances[_to].add(_value);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        Transfer(_from, _to, _value);
        return true;
    }

    /// @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
    /// @param _spender The address which will spend the funds.
    /// @param _value The amount of tokens to be spent.
    function approve(address _spender, uint256 _value) public returns (bool) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    /// @dev Function to check the amount of tokens that an owner allowed to a spender.
    /// @param _owner address The address which owns the funds.
    /// @param _spender address The address which will spend the funds.
    /// @return A uint256 specifying the amount of tokens still available for the spender.
    function allowance(address _owner, address _spender) public view returns (uint256) {
        return allowed[_owner][_spender];
    }

    /// @dev Increase the amount of tokens that an owner allowed to a spender.
    /// @param _spender The address which will spend the funds.
    /// @param _addedValue The amount of tokens to increase the allowance by.
    function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
        allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
        Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    /// @dev Decrease the amount of tokens that an owner allowed to a spender.
    /// @param _spender The address which will spend the funds.
    /// @param _subtractedValue The amount of tokens to decrease the allowance by.
    function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
        uint oldValue = allowed[msg.sender][_spender];
        if (_subtractedValue > oldValue) {
            allowed[msg.sender][_spender] = 0;
        } else {
            allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
        }
        Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    /// @dev Croupier uses this method to set deposited credits of a player for sale
    /// @param _user The address of the user
    /// @param _extra Additional off-chain credit (AirDrop support), so that croupier could have frozen more than the user had invested
    function freezeDeposit(address _user, uint256 _extra) onlyCroupier public {
        require(depositOf[_user] > 0 || _extra > 0);

        uint256 deposit = depositOf[_user];
        depositOf[_user] = depositOf[_user].sub(deposit);
        totalDeposit = totalDeposit.sub(deposit);

        uint256 depositWithExtra = deposit.add(_extra);

        frozenPool = frozenPool.add(depositWithExtra);

        DepositFrozen(_user, depositWithExtra);
    }

    /// @dev Croupier uses this method stop selling user's tokens and return them to normal deposit
    /// @param _user The user whose deposit is being unfrozen
    /// @param _value The value to unfreeze according to Croupier's records (off-chain sale data)
    function unfreezeDeposit(address _user, uint256 _value) onlyCroupier public {
        require(_value > 0);
        require(frozenPool >= _value);

        depositOf[_user] = depositOf[_user].add(_value);
        totalDeposit = totalDeposit.add(_value);

        frozenPool = frozenPool.sub(_value);

        DepositUnfrozen(_user, depositOf[_user]);
    }

    /// @dev The Jackpot contract invokes this method when selling tokens from Croupier
    /// @param _to The recipient of the tokens
    /// @param _value The amount
    function transferFromCroupier(address _to, uint256 _value) onlyJackpot public {
        require(_value > 0);
        require(frozenPool >= _value);

        frozenPool = frozenPool.sub(_value);

        _transfer(croupier, _to, _value);
    }

    //////
    /// @title Internal Methods
    //

    /// @dev Internal transfer function
    /// @param _from From address
    /// @param _to To address
    /// @param _value The value to transfer
    /// @return success
    function _transfer(address _from, address _to, uint256 _value) internal returns (bool) {
        require(_to != address(0));                         // Prevent transfer to 0x0 address
        require(balances[_from] >= _value);                 // Check if the sender has enough
        balances[_from] = balances[_from].sub(_value);      // Subtract from the sender
        balances[_to] = balances[_to].add(_value);          // Add the same to the recipient
        Transfer(_from, _to, _value);
        return true;
    }

    /// @dev Internal function for burning tokens
    /// @param _sender The token sender (whose tokens are being burned)
    /// @param _value The amount of tokens to burn
    function _burnFromAccount(address _sender, uint256 _value) internal {
        require(balances[_sender] >= _value);               // Check if the sender has enough
        balances[_sender] = balances[_sender].sub(_value);  // Subtract from the sender
        supply = supply.sub(_value);                        // Updates totalSupply
        Burn(_sender, _value);
    }

}

contract Jackpot is HouseOwned {
    using SafeMath for uint;

    enum Stages {
        InitialOffer,   // ICO stage: forming the jackpot fund
        GameOn,         // The game is running
        GameOver,       // The jackpot is won, paying out the jackpot
        Aborted         // ICO aborted, refunding investments
    }

    uint256 constant initialIcoTokenPrice = 4 finney;
    uint256 constant initialBetAmount = 10 finney;
    uint constant gameStartJackpotThreshold = 333 ether;
    uint constant icoTerminationTimeout = 48 hours;

    // These variables hold the values needed for minor prize checking:
    //  - when they were last won (once the number reaches the corresponding amount, the
    //    minor prize is won, and it should be reset)
    //  - how much ether was bet since it was last won
    // `etherSince*` variables start with value of 1 and always have +1 in their value
    // so that the variables never go 0, for gas consumption consistency
    uint32 public totalBets = 0;
    uint256 public etherSince20 = 1;
    uint256 public etherSince50 = 1;
    uint256 public etherSince100 = 1;
    uint256 public pendingEtherForCroupier = 0;

    // ICO status
    uint32 public icoSoldTokens;
    uint256 public icoEndTime;

    // Jackpot status
    address public lastBetUser;
    uint256 public terminationTime;
    address public winner;
    uint256 public pendingJackpotForHouse;
    uint256 public pendingJackpotForWinner;

    // General configuration and stage
    address public croupier;
    Token public token;
    Stages public stage = Stages.InitialOffer;

    // Price state
    uint256 public currentIcoTokenPrice = initialIcoTokenPrice;
    uint256 public currentBetAmount = initialBetAmount;

    // Investment tracking for emergency ICO termination
    mapping (address => uint256) public investmentOf;
    uint256 public abortTime;

    //////
    /// @title Modifiers
    //

    /// @dev Only Token
    modifier onlyToken {
        require(msg.sender == address(token));
        _;
    }

    /// @dev Only Croupier
    modifier onlyCroupier {
        require(msg.sender == address(croupier));
        _;
    }

    //////
    /// @title Events
    //

    /// @dev Fired when tokens are sold for Ether in ICO
    event EtherIco(address indexed from, uint256 value, uint256 tokens);

    /// @dev Fired when a bid with Ether is made
    event EtherBet(address indexed from, uint256 value, uint256 dividends);

    /// @dev Fired when a bid with a Token is made
    event TokenBet(address indexed from);

    /// @dev Fired when a bidder wins a minor prize
    ///      Type: 1: 20, 2: 50, 3: 100
    event MinorPrizePayout(address indexed from, uint256 value, uint8 prizeType);

    /// @dev Fired when as a result of ether bid, tokens are sold from the Croupier's pool
    ///      The parameters are who bought them, how many tokens, and for how much Ether they were sold
    event SoldTokensFromCroupier(address indexed from, uint256 value, uint256 tokens);

    /// @dev Fired when the jackpot is won
    event JackpotWon(address indexed from, uint256 value);


    //////
    /// @title Constructor and Initialization
    //

    /// @dev The contract constructor
    /// @param _croupier The address of the trusted Croupier bot's account
    function Jackpot(address _croupier)
        HouseOwned()
        public
    {
        require(_croupier != 0x0);
        croupier = _croupier;

        // There are no bets (it even starts in ICO stage), so initialize
        // lastBetUser, just so that value is not zero and is meaningful
        // The game can't end until at least one bid is made, and once
        // a bid is made, this value is permanently overwritten.
        lastBetUser = _croupier;
    }

    /// @dev Function to set address of Token contract once after creation
    /// @param _token Address of the Token contract (JACK Token)
    function setToken(address _token) onlyHouse public {
        require(address(token) == 0x0);
        require(_token != address(this)); // Protection from admin's mistake

        token = Token(_token);
    }


    //////
    /// @title Default Function
    //

    /// @dev The fallback function for receiving ether (bets)
    ///      Action depends on stages:
    ///       - ICO: just sell the tokens
    ///       - Game: accept bets, award tokens, award minor (20, 50, 100) prizes
    ///       - Game Over: pay out jackpot
    ///       - Aborted: fail
    function() payable public {
        require(croupier != 0x0);
        require(address(token) != 0x0);
        require(stage != Stages.Aborted);

        uint256 tokens;

        if (stage == Stages.InitialOffer) {

            // First, check if the ICO is over. If it is, trigger the events and
            // refund sent ether
            bool started = checkGameStart();
            if (started) {
                // Refund ether without failing the transaction
                // (because side-effect is needed)
                msg.sender.transfer(msg.value);
                return;
            }

            require(msg.value >= currentIcoTokenPrice);
        
            // THE PLAN
            // 1. [CHECK + EFFECT] Calculate how much times price, the investment amount is,
            //    calculate how many tokens the investor is going to get
            // 2. [EFFECT] Log and count
            // 3. [EFFECT] Check game start conditions and maybe start the game
            // 4. [INT] Award the tokens
            // 5. [INT] Transfer 20% to house

            // 1. [CHECK + EFFECT] Checking the amount
            tokens = _icoTokensForEther(msg.value);

            // 2. [EFFECT] Log
            // Log the ICO event and count investment
            EtherIco(msg.sender, msg.value, tokens);

            investmentOf[msg.sender] = investmentOf[msg.sender].add(
                msg.value.sub(msg.value / 5)
            );

            // 3. [EFFECT] Game start
            // Check if we have accumulated the jackpot amount required for game start
            if (icoEndTime == 0 && this.balance >= gameStartJackpotThreshold) {
                icoEndTime = now + icoTerminationTimeout;
            }

            // 4. [INT] Awarding tokens
            // Award the deserved tokens (if any)
            if (tokens > 0) {
                token.transfer(msg.sender, tokens);
            }

            // 5. [INT] House
            // House gets 20% of ICO according to the rules
            house.transfer(msg.value / 5);

        } else if (stage == Stages.GameOn) {

            // First, check if the game is over. If it is, trigger the events and
            // refund sent ether
            bool terminated = checkTermination();
            if (terminated) {
                // Refund ether without failing the transaction
                // (because side-effect is needed)
                msg.sender.transfer(msg.value);
                return;
            }

            // Now processing an Ether bid
            require(msg.value >= currentBetAmount);

            // THE PLAN
            // 1. [CHECK] Calculate how much times min-bet, the bet amount is,
            //    calculate how many tokens the player is going to get
            // 2. [CHECK] Check how much is sold from the Croupier's pool, and how much from Jackpot
            // 3. [EFFECT] Deposit 25% to the Croupier (for dividends and house's benefit)
            // 4. [EFFECT] Log and mark bid
            // 6. [INT] Check and reward (if won) minor (20, 100, 1000) prizes
            // 7. [EFFECT] Update bet amount
            // 8. [INT] Award the tokens


            // 1. [CHECK + EFFECT] Checking the bet amount and token reward
            tokens = _betTokensForEther(msg.value);

            // 2. [CHECK] Check how much is sold from the Croupier's pool, and how much from Jackpot
            //    The priority is (1) Croupier, (2) Jackpot
            uint256 sellingFromJackpot = 0;
            uint256 sellingFromCroupier = 0;
            if (tokens > 0) {
                uint256 croupierPool = token.frozenPool();
                uint256 jackpotPool = token.balanceOf(this);

                if (croupierPool == 0) {
                    // Simple case: only Jackpot is selling
                    sellingFromJackpot = tokens;
                    if (sellingFromJackpot > jackpotPool) {
                        sellingFromJackpot = jackpotPool;
                    }
                } else if (jackpotPool == 0 || tokens <= croupierPool) {
                    // Simple case: only Croupier is selling
                    // either because Jackpot has 0, or because Croupier takes over
                    // by priority and has enough tokens in its pool
                    sellingFromCroupier = tokens;
                    if (sellingFromCroupier > croupierPool) {
                        sellingFromCroupier = croupierPool;
                    }
                } else {
                    // Complex case: both are selling now
                    sellingFromCroupier = croupierPool;  // (tokens > croupierPool) is guaranteed at this point
                    sellingFromJackpot = tokens.sub(sellingFromCroupier);
                    if (sellingFromJackpot > jackpotPool) {
                        sellingFromJackpot = jackpotPool;
                    }
                }
            }

            // 3. [EFFECT] Croupier deposit
            // Transfer a portion to the Croupier for dividend payout and house benefit
            // Dividends are a sum of:
            //   + 25% of bet
            //   + 50% of price of tokens sold from Jackpot (or just anything other than the bet and Croupier payment)
            //   + 0%  of price of tokens sold from Croupier
            //          (that goes in SoldTokensFromCroupier instead)
            uint256 tokenValue = msg.value.sub(currentBetAmount);

            uint256 croupierSaleRevenue = 0;
            if (sellingFromCroupier > 0) {
                croupierSaleRevenue = tokenValue.div(
                    sellingFromJackpot.add(sellingFromCroupier)
                ).mul(sellingFromCroupier);
            }
            uint256 jackpotSaleRevenue = tokenValue.sub(croupierSaleRevenue);

            uint256 dividends = (currentBetAmount.div(4)).add(jackpotSaleRevenue.div(2));

            // 100% of money for selling from Croupier still goes to Croupier
            // so that it's later paid out to the selling user
            pendingEtherForCroupier = pendingEtherForCroupier.add(dividends.add(croupierSaleRevenue));

            // 4. [EFFECT] Log and mark bid
            // Log the bet with actual amount charged (value less change)
            EtherBet(msg.sender, msg.value, dividends);
            lastBetUser = msg.sender;
            terminationTime = now + _terminationDuration();

            // If anything was sold from Croupier, log it appropriately
            if (croupierSaleRevenue > 0) {
                SoldTokensFromCroupier(msg.sender, croupierSaleRevenue, sellingFromCroupier);
            }

            // 5. [INT] Minor prizes
            // Check for winning minor prizes
            _checkMinorPrizes(msg.sender, currentBetAmount);

            // 6. [EFFECT] Update bet amount
            _updateBetAmount();

            // 7. [INT] Awarding tokens
            if (sellingFromJackpot > 0) {
                token.transfer(msg.sender, sellingFromJackpot);
            }
            if (sellingFromCroupier > 0) {
                token.transferFromCroupier(msg.sender, sellingFromCroupier);
            }

        } else if (stage == Stages.GameOver) {

            require(msg.sender == winner || msg.sender == house);

            if (msg.sender == winner) {
                require(pendingJackpotForWinner > 0);

                uint256 winnersPay = pendingJackpotForWinner;
                pendingJackpotForWinner = 0;

                msg.sender.transfer(winnersPay);
            } else if (msg.sender == house) {
                require(pendingJackpotForHouse > 0);

                uint256 housePay = pendingJackpotForHouse;
                pendingJackpotForHouse = 0;

                msg.sender.transfer(housePay);
            }
        }
    }

    // Croupier will call this function when the jackpot is won
    // If Croupier fails to call the function for any reason, house and winner
    // still can claim their jackpot portion by sending ether to Jackpot
    function payOutJackpot() onlyCroupier public {
        require(winner != 0x0);
    
        if (pendingJackpotForHouse > 0) {
            uint256 housePay = pendingJackpotForHouse;
            pendingJackpotForHouse = 0;

            house.transfer(housePay);
        }

        if (pendingJackpotForWinner > 0) {
            uint256 winnersPay = pendingJackpotForWinner;
            pendingJackpotForWinner = 0;

            winner.transfer(winnersPay);
        }

    }

    //////
    /// @title Public Functions
    //

    /// @dev View function to check whether the game should be terminated
    ///      Used as internal function by checkTermination, as well as by the
    ///      Croupier bot, to check whether it should call checkTermination
    /// @return Whether the game should be terminated by timeout
    function shouldBeTerminated() public view returns (bool should) {
        return stage == Stages.GameOn && terminationTime != 0 && now > terminationTime;
    }

    /// @dev Check whether the game should be terminated, and if it should, terminate it
    /// @return Whether the game was terminated as the result
    function checkTermination() public returns (bool terminated) {
        if (shouldBeTerminated()) {
            stage = Stages.GameOver;

            winner = lastBetUser;

            // Flush amount due for Croupier immediately
            _flushEtherToCroupier();

            // The rest should be claimed by the winner (except what house gets)
            JackpotWon(winner, this.balance);


            uint256 jackpot = this.balance;
            pendingJackpotForHouse = jackpot.div(5);
            pendingJackpotForWinner = jackpot.sub(pendingJackpotForHouse);

            return true;
        }

        return false;
    }

    /// @dev View function to check whether the game should be started
    ///      Used as internal function by `checkGameStart`, as well as by the
    ///      Croupier bot, to check whether it should call `checkGameStart`
    /// @return Whether the game should be started
    function shouldBeStarted() public view returns (bool should) {
        return stage == Stages.InitialOffer && icoEndTime != 0 && now > icoEndTime;
    }

    /// @dev Check whether the game should be started, and if it should, start it
    /// @return Whether the game was started as the result
    function checkGameStart() public returns (bool started) {
        if (shouldBeStarted()) {
            stage = Stages.GameOn;

            return true;
        }

        return false;
    }

    /// @dev Bet 1 token in the game
    ///      The token has already been burned having passed all checks, so
    ///      just process the bet of 1 token
    function betToken(address _user) onlyToken public {
        // Token bets can only be accepted in the game stage
        require(stage == Stages.GameOn);

        bool terminated = checkTermination();
        if (terminated) {
            return;
        }

        TokenBet(_user);
        lastBetUser = _user;
        terminationTime = now + _terminationDuration();

        // Check for winning minor prizes
        _checkMinorPrizes(_user, 0);
    }

    /// @dev Allows House to terminate ICO as an emergency measure
    function abort() onlyHouse public {
        require(stage == Stages.InitialOffer);

        stage = Stages.Aborted;
        abortTime = now;
    }

    /// @dev In case the ICO is emergency-terminated by House, allows investors
    ///      to pull back the investments
    function claimRefund() public {
        require(stage == Stages.Aborted);
        require(investmentOf[msg.sender] > 0);

        uint256 payment = investmentOf[msg.sender];
        investmentOf[msg.sender] = 0;

        msg.sender.transfer(payment);
    }

    /// @dev In case the ICO was terminated, allows House to kill the contract in 2 months
    ///      after the termination date
    function killAborted() onlyHouse public {
        require(stage == Stages.Aborted);
        require(now > abortTime + 60 days);

        selfdestruct(house);
    }



    //////
    /// @title Internal Functions
    //

    /// @dev Get current bid timer duration
    /// @return duration The duration
    function _terminationDuration() internal view returns (uint256 duration) {
        return (5 + 19200 / (100 + totalBets)) * 1 minutes;
    }

    /// @dev Updates the current ICO price according to the rules
    function _updateIcoPrice() internal {
        uint256 newIcoTokenPrice = currentIcoTokenPrice;

        if (icoSoldTokens < 10000) {
            newIcoTokenPrice = 4 finney;
        } else if (icoSoldTokens < 20000) {
            newIcoTokenPrice = 5 finney;
        } else if (icoSoldTokens < 30000) {
            newIcoTokenPrice = 5.3 finney;
        } else if (icoSoldTokens < 40000) {
            newIcoTokenPrice = 5.7 finney;
        } else {
            newIcoTokenPrice = 6 finney;
        }

        if (newIcoTokenPrice != currentIcoTokenPrice) {
            currentIcoTokenPrice = newIcoTokenPrice;
        }
    }

    /// @dev Updates the current bid price according to the rules
    function _updateBetAmount() internal {
        uint256 newBetAmount = 10 finney + (totalBets / 100) * 6 finney;

        if (newBetAmount != currentBetAmount) {
            currentBetAmount = newBetAmount;
        }
    }

    /// @dev Calculates how many tokens a user should get with a given Ether bid
    /// @param value The bid amount
    /// @return tokens The number of tokens
    function _betTokensForEther(uint256 value) internal view returns (uint256 tokens) {
        // One bet amount is for the bet itself, for the rest we will sell
        // tokens
        tokens = (value / currentBetAmount) - 1;

        if (tokens >= 1000) {
            tokens = tokens + tokens / 4; // +25%
        } else if (tokens >= 300) {
            tokens = tokens + tokens / 5; // +20%
        } else if (tokens >= 100) {
            tokens = tokens + tokens / 7; // ~ +14.3%
        } else if (tokens >= 50) {
            tokens = tokens + tokens / 10; // +10%
        } else if (tokens >= 20) {
            tokens = tokens + tokens / 20; // +5%
        }
    }

    /// @dev Calculates how many tokens a user should get with a given ICO transfer
    /// @param value The transfer amount
    /// @return tokens The number of tokens
    function _icoTokensForEther(uint256 value) internal returns (uint256 tokens) {
        // How many times the input is greater than current token price
        tokens = value / currentIcoTokenPrice;

        if (tokens >= 10000) {
            tokens = tokens + tokens / 4; // +25%
        } else if (tokens >= 5000) {
            tokens = tokens + tokens / 5; // +20%
        } else if (tokens >= 1000) {
            tokens = tokens + tokens / 7; // ~ +14.3%
        } else if (tokens >= 500) {
            tokens = tokens + tokens / 10; // +10%
        } else if (tokens >= 200) {
            tokens = tokens + tokens / 20; // +5%
        }

        // Checking if Jackpot has the tokens in reserve
        if (tokens > token.balanceOf(this)) {
            tokens = token.balanceOf(this);
        }

        icoSoldTokens += (uint32)(tokens);

        _updateIcoPrice();
    }

    /// @dev Flush the currently pending Ether to Croupier
    function _flushEtherToCroupier() internal {
        if (pendingEtherForCroupier > 0) {
            uint256 willTransfer = pendingEtherForCroupier;
            pendingEtherForCroupier = 0;
            
            croupier.transfer(willTransfer);
        }
    }

    /// @dev Count the bid towards minor prize fund, check if the user
    ///      wins a minor prize, and if they did, transfer the prize to them
    /// @param user The user in question
    /// @param value The bid value
    function _checkMinorPrizes(address user, uint256 value) internal {
        // First and foremost, increment the counters and ether counters
        totalBets ++;
        if (value > 0) {
            etherSince20 = etherSince20.add(value);
            etherSince50 = etherSince50.add(value);
            etherSince100 = etherSince100.add(value);
        }

        // Now actually check if the bets won

        uint256 etherPayout;

        if ((totalBets + 30) % 100 == 0) {
            // Won 100th
            etherPayout = (etherSince100 - 1) / 10;
            etherSince100 = 1;

            MinorPrizePayout(user, etherPayout, 3);

            user.transfer(etherPayout);
            return;
        }

        if ((totalBets + 5) % 50 == 0) {
            // Won 100th
            etherPayout = (etherSince50 - 1) / 10;
            etherSince50 = 1;

            MinorPrizePayout(user, etherPayout, 2);

            user.transfer(etherPayout);
            return;
        }

        if (totalBets % 20 == 0) {
            // Won 20th
            etherPayout = (etherSince20 - 1) / 10;
            etherSince20 = 1;

            _flushEtherToCroupier();

            MinorPrizePayout(user, etherPayout, 1);

            user.transfer(etherPayout);
            return;
        }

        return;
    }

}

Contract ABI
[{"constant":false,"inputs":[],"name":"killAborted","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"shouldBeTerminated","outputs":[{"name":"should","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastBetUser","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"setToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentIcoTokenPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"checkTermination","outputs":[{"name":"terminated","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"abort","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"shouldBeStarted","outputs":[{"name":"should","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"icoSoldTokens","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"etherSince20","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingJackpotForWinner","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"abortTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"etherSince100","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"croupier","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"icoEndTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"investmentOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"checkGameStart","outputs":[{"name":"started","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentBetAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimRefund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"payOutJackpot","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalBets","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"etherSince50","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"terminationTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingEtherForCroupier","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingJackpotForHouse","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"winner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_user","type":"address"}],"name":"betToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_croupier","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"EtherIco","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"dividends","type":"uint256"}],"name":"EtherBet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"}],"name":"TokenBet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"prizeType","type":"uint8"}],"name":"MinorPrizePayout","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"SoldTokensFromCroupier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"JackpotWon","type":"event"}]

Contract Creation Code
60606040526000805460a060020a63ffffffff021916815560018080556002819055600355600455600d805460a060020a60ff0219169055660e35fa931a0000600e55662386f26fc10000600f55341561005857600080fd5b6040516020806119ae8339810160405280805160008054600160a060020a03191633600160a060020a039081169190911790915590925082161515905061009e57600080fd5b600c8054600160a060020a03909216600160a060020a03199283168117909155600780549092161790556118d7806100d76000396000f30060606040526004361061015b5763ffffffff60e060020a600035041663042ae62b8114610968578063078b247e1461097d5780630853b015146109a4578063144fa6d7146109d35780632b9ce01e146109f25780633070c38b14610a1757806335a063b414610a2a57806336134a4b14610a3d57806343d4278014610a505780634f868b9414610a7c5780636428fed414610a8f578063696fcc7c14610aa2578063699a3a7f14610ab55780636b5c5f3914610ac85780637e1055b614610adb57806395c08f9214610aee578063abbdc27214610b0d578063b18a78e314610b20578063b5545a3c14610b33578063b7c14d7a14610b46578063befa1e2f14610b59578063c040e6b814610b6c578063c45ad06a14610ba3578063ce4254ce14610bb6578063d77e2f5514610bc9578063d95374ce14610bdc578063dfbf53ae14610bef578063f9c7809714610c02578063fc0c546a14610c21575b6000806000806000806000806000806000806000600c60009054906101000a9004600160a060020a0316600160a060020a031660001415151561019d57600080fd5b600d54600160a060020a031615156101b457600080fd5b6003600d5460a060020a900460ff1660038111156101ce57fe5b14156101d957600080fd5b6000600d5460a060020a900460ff1660038111156101f357fe5b14156103d957610201610c34565b9b508b1561024057600160a060020a0333163480156108fc0290604051600060405180830381858888f19350505050151561023b57600080fd5b610959565b600e5434101561024f57600080fd5b61025834610c76565b9c5033600160a060020a03167f5675527f6952a9948de23f4a0976af0a811d9a89ac9095f173f16da8b07eca10348f60405191825260208201526040908101905180910390a26102d36102ae3460058104610df6565b600160a060020a0333166000908152601060205260409020549063ffffffff610e0816565b600160a060020a03331660009081526010602052604090205560065415801561030f575068120d4da7b0bd14000030600160a060020a03163110155b1561031e57426202a300016006555b60008d11156103a257600d54600160a060020a031663a9059cbb338f60006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561038657600080fd5b6102c65a03f1151561039757600080fd5b505050604051805150505b600054600160a060020a03166005340480156108fc0290604051600060405180830381858888f19350505050151561023b57600080fd5b6001600d5460a060020a900460ff1660038111156103f357fe5b141561083e57610401610e22565b9a508a1561043b57600160a060020a0333163480156108fc0290604051600060405180830381858888f19350505050151561023b57600080fd5b600f5434101561044a57600080fd5b61045334610f2b565b9c50600099506000985060008d11156105a457600d54600160a060020a031663eb44bb046000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156104ae57600080fd5b6102c65a03f115156104bf57600080fd5b5050506040518051600d54909950600160a060020a031690506370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561052557600080fd5b6102c65a03f1151561053657600080fd5b505050604051805197505087151561055c578c9950868a1115610557578699505b6105a4565b8615806105695750878d11155b15610581578c985087891115610557578798506105a4565b96975087966105968d8963ffffffff610df616565b9950868a11156105a4578699505b600f546105b890349063ffffffff610df616565b95506000945060008911156105fa576105f7896105eb6105de8d8363ffffffff610e0816565b899063ffffffff610f9716565b9063ffffffff610fae16565b94505b61060a868663ffffffff610df616565b935061064061062085600263ffffffff610f9716565b600f5461063490600463ffffffff610f9716565b9063ffffffff610e0816565b9250610664610655848763ffffffff610e0816565b6004549063ffffffff610e0816565b600455600160a060020a0333167fa6534b6353deca2132116ca959c1d83a9826f52fac47c826cdfc5ee4c0d32fcb348560405191825260208201526040908101905180910390a26007805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a03161790556106db610fd9565b4201600855600085111561072e5733600160a060020a03167f5ff7ec2f884ead3ce1f0de8b4cc0bb6b62648de9af39c8dbfadb81a094883456868b60405191825260208201526040908101905180910390a25b61073a33600f5461100e565b6107426112b8565b60008a11156107c657600d54600160a060020a031663a9059cbb338c60006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156107aa57600080fd5b6102c65a03f115156107bb57600080fd5b505050604051805150505b600089111561023b57600d54600160a060020a0316631159f39b338b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561082557600080fd5b6102c65a03f1151561083657600080fd5b505050610959565b6002600d5460a060020a900460ff16600381111561085857fe5b14156109595760095433600160a060020a0390811691161480610889575060005433600160a060020a039081169116145b151561089457600080fd5b60095433600160a060020a03908116911614156108f757600b54600090116108bb57600080fd5b600b805460009091559150600160a060020a03331682156108fc0283604051600060405180830381858888f19350505050151561023b57600080fd5b60005433600160a060020a039081169116141561095957600a546000901161091e57600080fd5b50600a80546000909155600160a060020a03331681156108fc0282604051600060405180830381858888f19350505050151561095957600080fd5b50505050505050505050505050005b341561097357600080fd5b61097b611304565b005b341561098857600080fd5b610990611364565b604051901515815260200160405180910390f35b34156109af57600080fd5b6109b76113a0565b604051600160a060020a03909116815260200160405180910390f35b34156109de57600080fd5b61097b600160a060020a03600435166113af565b34156109fd57600080fd5b610a05611430565b60405190815260200160405180910390f35b3415610a2257600080fd5b610990610e22565b3415610a3557600080fd5b61097b611436565b3415610a4857600080fd5b6109906114b0565b3415610a5b57600080fd5b610a636114e9565b60405163ffffffff909116815260200160405180910390f35b3415610a8757600080fd5b610a056114f5565b3415610a9a57600080fd5b610a056114fb565b3415610aad57600080fd5b610a05611501565b3415610ac057600080fd5b610a05611507565b3415610ad357600080fd5b6109b761150d565b3415610ae657600080fd5b610a0561151c565b3415610af957600080fd5b610a05600160a060020a0360043516611522565b3415610b1857600080fd5b610990610c34565b3415610b2b57600080fd5b610a05611534565b3415610b3e57600080fd5b61097b61153a565b3415610b5157600080fd5b61097b6115cc565b3415610b6457600080fd5b610a63611699565b3415610b7757600080fd5b610b7f6116ac565b60405180826003811115610b8f57fe5b60ff16815260200191505060405180910390f35b3415610bae57600080fd5b610a056116bc565b3415610bc157600080fd5b610a056116c2565b3415610bd457600080fd5b610a056116c8565b3415610be757600080fd5b610a056116ce565b3415610bfa57600080fd5b6109b76116d4565b3415610c0d57600080fd5b61097b600160a060020a03600435166116e3565b3415610c2c57600080fd5b6109b76117b0565b6000610c3e6114b0565b15610c6f5750600d805474ff0000000000000000000000000000000000000000191660a060020a1790556001610c73565b5060005b90565b6000600e5482811515610c8557fe5b0490506127108110610c9c576004815b0401610cdd565b6113888110610cad57600581610c95565b6103e88110610cbe57600781610c95565b6101f48110610ccf57600a81610c95565b60c88110610cdd5760148104015b600d54600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610d3657600080fd5b6102c65a03f11515610d4757600080fd5b50505060405180519050811115610dce57600d54600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610db157600080fd5b6102c65a03f11515610dc257600080fd5b50505060405180519150505b6005805463ffffffff80821684011663ffffffff19909116179055610df16117bf565b919050565b600082821115610e0257fe5b50900390565b600082820183811015610e1757fe5b8091505b5092915050565b600080610e2d611364565b15610f2257600d805474ff00000000000000000000000000000000000000001916740200000000000000000000000000000000000000001790556007546009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055610e9e611862565b600954600160a060020a03908116907fbf737c87eff4ef74213cb228c9e25ca0c4519947f5fcc4a41b221ba93d76a4259030163160405190815260200160405180910390a250600160a060020a03301631610f0081600563ffffffff610f9716565b600a819055610f1690829063ffffffff610df616565b600b5560019150610f27565b600091505b5090565b60006001600f5483811515610f3c57fe5b040390506103e88110610f54576004815b0401610df1565b61012c8110610f6557600581610f4d565b60648110610f7557600781610f4d565b60328110610f8557600a81610f4d565b60148110610df1576014810401919050565b6000808284811515610fa557fe5b04949350505050565b600080831515610fc15760009150610e1b565b50828202828482811515610fd157fe5b0414610e1757fe5b60008054606463ffffffff60a060020a90920482160116614b00811515610ffc57fe5b04600501603c0263ffffffff16905090565b60008054600163ffffffff60a060020a808404821692909201160277ffffffff0000000000000000000000000000000000000000199091161781558082111561109457600154611064908363ffffffff610e0816565b60015560025461107a908363ffffffff610e0816565b600255600354611090908363ffffffff610e0816565b6003555b600054606490601e63ffffffff60a060020a909204821601160663ffffffff166000141561114f57600354600a9060001901049050600160038190555082600160a060020a03167fa90e65a3277dde6dd5ea8f835b5c2150550eb6368a2934a0e96ad2e25e12da8082600360405191825260ff1660208201526040908101905180910390a2600160a060020a03831681156108fc0282604051600060405180830381858888f19350505050151561114a57600080fd5b6112b3565b600054603290600563ffffffff60a060020a909204821601160663ffffffff166000141561120557600254600a9060001901049050600160028190555082600160a060020a03167fa90e65a3277dde6dd5ea8f835b5c2150550eb6368a2934a0e96ad2e25e12da8082600260405191825260ff1660208201526040908101905180910390a2600160a060020a03831681156108fc0282604051600060405180830381858888f19350505050151561114a57600080fd5b600054601463ffffffff60a060020a9092048216061615156112b357600154600a90600019016001805504905061123a611862565b82600160a060020a03167fa90e65a3277dde6dd5ea8f835b5c2150550eb6368a2934a0e96ad2e25e12da8082600160405191825260ff1660208201526040908101905180910390a2600160a060020a03831681156108fc0282604051600060405180830381858888f19350505050151561114a57600080fd5b505050565b6000805460649060a060020a900463ffffffff160463ffffffff16661550f7dca7000002662386f26fc100000166ffffffffffffff169050600f548114151561130157600f8190555b50565b60005433600160a060020a0390811691161461131f57600080fd5b6003600d5460a060020a900460ff16600381111561133957fe5b1461134357600080fd5b601154624f1a0001421161135657600080fd5b600054600160a060020a0316ff5b60006001600d5460a060020a900460ff16600381111561138057fe5b14801561138e575060085415155b801561139b575060085442115b905090565b600754600160a060020a031681565b60005433600160a060020a039081169116146113ca57600080fd5b600d54600160a060020a0316156113e057600080fd5b30600160a060020a031681600160a060020a03161415151561140157600080fd5b600d805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600e5481565b60005433600160a060020a0390811691161461145157600080fd5b6000600d5460a060020a900460ff16600381111561146b57fe5b1461147557600080fd5b600d805474ff000000000000000000000000000000000000000019167403000000000000000000000000000000000000000017905542601155565b600080600d5460a060020a900460ff1660038111156114cb57fe5b1480156114d9575060065415155b801561139b575050600654421190565b60055463ffffffff1681565b60015481565b600b5481565b60115481565b60035481565b600c54600160a060020a031681565b60065481565b60106020526000908152604090205481565b600f5481565b60006003600d5460a060020a900460ff16600381111561155657fe5b1461156057600080fd5b600160a060020a0333166000908152601060205260408120541161158357600080fd5b50600160a060020a033316600081815260106020526040808220805492905590919082156108fc0290839051600060405180830381858888f19350505050151561130157600080fd5b600c54600090819033600160a060020a039081169116146115ec57600080fd5b600954600160a060020a0316151561160357600080fd5b6000600a54111561164d57600a80546000918290559054909250600160a060020a031682156108fc0283604051600060405180830381858888f19350505050151561164d57600080fd5b6000600b5411156116955750600b80546000909155600954600160a060020a031681156108fc0282604051600060405180830381858888f19350505050151561169557600080fd5b5050565b60005460a060020a900463ffffffff1681565b600d5460a060020a900460ff1681565b60025481565b60085481565b60045481565b600a5481565b600954600160a060020a031681565b600d5460009033600160a060020a0390811691161461170157600080fd5b6001600d5460a060020a900460ff16600381111561171b57fe5b1461172557600080fd5b61172d610e22565b9050801561173a57611695565b81600160a060020a03167facb2d607912937b96a0f109dcacf81f1854ea43e635576ed0e65c6ed7fdcfe4b60405160405180910390a26007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790556117a0610fd9565b420160085561169582600061100e565b600d54600160a060020a031681565b600e5460055461271063ffffffff90911610156117e45750660e35fa931a0000611854565b600554614e2063ffffffff909116101561180657506611c37937e08000611854565b60055461753063ffffffff909116101561182857506612d452694f4000611854565b600554619c4063ffffffff909116101561184a57506614401eab384000611854565b50661550f7dca700005b600e54811461130157600e55565b60008060045411156113015750600480546000909155600c54600160a060020a031681156108fc0282604051600060405180830381858888f19350505050151561130157600080fd00a165627a7a72305820c77401d6a8b9e6d2cc370238faea788af5a184b79b0e3d9532a6d803b95da1490029000000000000000000000000d3502fcfd30db5819cab83990fd05661851d605d


    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d3502fcfd30db5819cab83990fd05661851d605d

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d3502fcfd30db5819cab83990fd05661851d605d


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