ETH Price: $3,613.49 (+5.60%)

Contract

0x0B588A1d41518991a94590a7884f52B8836df38d
 

Overview

ETH Balance

2.042446896537540631 ETH

Eth Value

$7,380.37 (@ $3,613.49/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw By Rnd ...87122922019-10-10 5:54:271876 days ago1570686867IN
0x0B588A1d...8836df38d
0 ETH0.00005421
Withdraw By Rnd ...69450392018-12-24 15:30:492165 days ago1545665449IN
0x0B588A1d...8836df38d
0 ETH0.000073613
Withdraw By Rnd ...66589762018-11-07 8:03:592213 days ago1541577839IN
0x0B588A1d...8836df38d
0 ETH0.0002453710
Withdraw By Rnd ...66589662018-11-07 8:01:132213 days ago1541577673IN
0x0B588A1d...8836df38d
0 ETH0.0002453710
Withdraw By Rnd ...66589522018-11-07 7:57:412213 days ago1541577461IN
0x0B588A1d...8836df38d
0 ETH0.0003920810
Fee Withdraw65057752018-10-13 6:29:382238 days ago1539412178IN
0x0B588A1d...8836df38d
0 ETH0.000107153
Withdraw By Rnd ...65057462018-10-13 6:23:272238 days ago1539411807IN
0x0B588A1d...8836df38d
0 ETH0.000073613
Withdraw By Rnd ...64991572018-10-12 4:36:072239 days ago1539318967IN
0x0B588A1d...8836df38d
0 ETH0.000271045
Withdraw By Rnd ...64816262018-10-09 8:10:392242 days ago1539072639IN
0x0B588A1d...8836df38d
0 ETH0.000216834
Withdraw By Rnd ...64659812018-10-06 19:34:372244 days ago1538854477IN
0x0B588A1d...8836df38d
0 ETH0.000073613
Withdraw By Rnd ...64659562018-10-06 19:31:102244 days ago1538854270IN
0x0B588A1d...8836df38d
0 ETH0.000117623
Withdraw By Rnd ...64586102018-10-05 14:58:392245 days ago1538751519IN
0x0B588A1d...8836df38d
0 ETH0.000168043.1
Transfer64310762018-10-01 3:12:182250 days ago1538363538IN
0x0B588A1d...8836df38d
0.00075001 ETH0.002040719
Withdraw By Rnd ...64271712018-09-30 11:54:532250 days ago1538308493IN
0x0B588A1d...8836df38d
0 ETH0.0003920810
Withdraw By Rnd ...64255512018-09-30 5:11:492251 days ago1538284309IN
0x0B588A1d...8836df38d
0 ETH0.000395717.3
Withdraw By Rnd ...64191542018-09-29 4:24:352252 days ago1538195075IN
0x0B588A1d...8836df38d
0 ETH0.0004665711.9
Withdraw By Rnd ...64120982018-09-28 0:31:122253 days ago1538094672IN
0x0B588A1d...8836df38d
0 ETH0.000196298
Withdraw By Rnd ...64120982018-09-28 0:31:122253 days ago1538094672IN
0x0B588A1d...8836df38d
0 ETH0.000313668
Withdraw By Rnd ...64120902018-09-28 0:29:352253 days ago1538094575IN
0x0B588A1d...8836df38d
0 ETH0.000196298
Withdraw By Rnd ...64120312018-09-28 0:14:242253 days ago1538093664IN
0x0B588A1d...8836df38d
0 ETH0.000433668
Withdraw By Rnd ...63964932018-09-25 11:01:352255 days ago1537873295IN
0x0B588A1d...8836df38d
0 ETH0.0002453710
Withdraw By Rnd ...63964902018-09-25 11:00:252255 days ago1537873225IN
0x0B588A1d...8836df38d
0 ETH0.0003920810
Withdraw By Rnd ...63906132018-09-24 11:54:092256 days ago1537790049IN
0x0B588A1d...8836df38d
0 ETH0.000196045
Withdraw By Rnd ...63895612018-09-24 7:43:412257 days ago1537775021IN
0x0B588A1d...8836df38d
0 ETH0.00020128.2
Withdraw By Rnd ...63895422018-09-24 7:38:542257 days ago1537774734IN
0x0B588A1d...8836df38d
0 ETH0.000305827.8
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
87122922019-10-10 5:54:271876 days ago1570686867
0x0B588A1d...8836df38d
0.00093878 ETH
66589522018-11-07 7:57:412213 days ago1541577461
0x0B588A1d...8836df38d
0.2190008 ETH
65057752018-10-13 6:29:382238 days ago1539412178
0x0B588A1d...8836df38d
0.02309537 ETH
64991572018-10-12 4:36:072239 days ago1539318967
0x0B588A1d...8836df38d
0.04596255 ETH
64816262018-10-09 8:10:392242 days ago1539072639
0x0B588A1d...8836df38d
0.03964271 ETH
64659562018-10-06 19:31:102244 days ago1538854270
0x0B588A1d...8836df38d
0.0001898 ETH
64586102018-10-05 14:58:392245 days ago1538751519
0x0B588A1d...8836df38d
0.0379191 ETH
64271712018-09-30 11:54:532250 days ago1538308493
0x0B588A1d...8836df38d
0.00462678 ETH
64255512018-09-30 5:11:492251 days ago1538284309
0x0B588A1d...8836df38d
14.36330329 ETH
64191542018-09-29 4:24:352252 days ago1538195075
0x0B588A1d...8836df38d
0.00005075 ETH
64120982018-09-28 0:31:122253 days ago1538094672
0x0B588A1d...8836df38d
0.26257355 ETH
64120312018-09-28 0:14:242253 days ago1538093664
0x0B588A1d...8836df38d
0.10341578 ETH
63964902018-09-25 11:00:252255 days ago1537873225
0x0B588A1d...8836df38d
0.01447465 ETH
63906132018-09-24 11:54:092256 days ago1537790049
0x0B588A1d...8836df38d
0.00292015 ETH
63895422018-09-24 7:38:542257 days ago1537774734
0x0B588A1d...8836df38d
0.00219411 ETH
63894632018-09-24 7:18:232257 days ago1537773503
0x0B588A1d...8836df38d
0.03626981 ETH
63880192018-09-24 1:38:282257 days ago1537753108
0x0B588A1d...8836df38d
0.00101447 ETH
63875692018-09-23 23:56:182257 days ago1537746978
0x0B588A1d...8836df38d
0.0001084 ETH
63849982018-09-23 13:45:492257 days ago1537710349
0x0B588A1d...8836df38d
0.00006054 ETH
63795392018-09-22 16:18:472258 days ago1537633127
0x0B588A1d...8836df38d
0.00681527 ETH
63782132018-09-22 11:05:192258 days ago1537614319
0x0B588A1d...8836df38d
0.07822786 ETH
63781402018-09-22 10:45:382258 days ago1537613138
0x0B588A1d...8836df38d
0.0947059 ETH
63777352018-09-22 9:09:332258 days ago1537607373
0x0B588A1d...8836df38d
99.96239425 ETH
63770452018-09-22 6:17:382259 days ago1537597058
0x0B588A1d...8836df38d
0.29082815 ETH
63523972018-09-18 4:24:562263 days ago1537244696
0x0B588A1d...8836df38d
0.00114904 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FlyToTheMoon

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-07-28
*/

pragma solidity ^0.4.24;

contract FlyToTheMoonEvents {

    // buy keys during first stage
    event onFirStage
    (
        address indexed player,
        uint256 indexed rndNo,
        uint256 keys,
        uint256 eth,
        uint256 timeStamp  
    );

    // become leader during second stage
    event onSecStage
    (
        address indexed player,
        uint256 indexed rndNo,
        uint256 eth,
        uint256 timeStamp  
    );

    // player withdraw
    event onWithdraw
    (
        address indexed player,
        uint256 indexed rndNo,
        uint256 eth,
        uint256 timeStamp
    );

    // award
    event onAward
    (
        address indexed player,
        uint256 indexed rndNo,
        uint256 eth,
        uint256 timeStamp
    );
}

contract FlyToTheMoon is FlyToTheMoonEvents {
    using SafeMath for *;
    using KeysCalc for uint256;

    struct Round {
        uint256 eth;        // total eth
        uint256 keys;       // total keys
        uint256 startTime;  // end time
        uint256 endTime;    // end time
        address leader;     // leader
        uint256 lastPrice;  // The latest price for the second stage
        bool award;         // has been accept
    }

    struct PlayerRound {
        uint256 eth;        // eth player has added to round
        uint256 keys;       // keys
        uint256 withdraw;   // how many eth has been withdraw
    }

    uint256 public rndNo = 1;                                   // current round number
    uint256 public totalEth = 0;                                // total eth in all round

    uint256 constant private rndFirStage_ = 12 hours;           // round timer at first stage
    uint256 constant private rndSecStage_ = 12 hours;           // round timer at second stage

    mapping (uint256 => Round) public round_m;                  // (rndNo => Round)
    mapping (uint256 => mapping (address => PlayerRound)) public playerRound_m;   // (rndNo => addr => PlayerRound)

    address public owner;               // owner address
    uint256 public ownerWithdraw = 0;   // how many eth has been withdraw by owner

    constructor()
        public
    {
        round_m[1].startTime = now;
        round_m[1].endTime = now + rndFirStage_;

        owner = msg.sender;
    }

    /**
     * @dev prevents contracts from interacting
     */
    modifier onlyHuman() 
    {
        address _addr = msg.sender;
        uint256 _codeLength;
        
        assembly {_codeLength := extcodesize(_addr)}
        require(_codeLength == 0, "sorry humans only");
        _;
    }
    
    /**
     * @dev sets boundaries for incoming tx 
     */
    modifier isWithinLimits(uint256 _eth) 
    {
        require(_eth >= 1000000000, "pocket lint: not a valid currency");
        require(_eth <= 100000000000000000000000, "no vitalik, no");
        _;    
    }

    /**
     * @dev only owner
     */
    modifier onlyOwner() 
    {
        require(owner == msg.sender, "only owner can do it");
        _;    
    }

    /**
     * @dev play
     */
    function()
        onlyHuman()
        isWithinLimits(msg.value)
        public
        payable
    {
        uint256 _eth = msg.value;
        uint256 _now = now;
        uint256 _rndNo = rndNo;
        uint256 _ethUse = msg.value;

        // start next round?
        if (_now > round_m[_rndNo].endTime)
        {
            _rndNo = _rndNo.add(1);
            rndNo = _rndNo;
            round_m[_rndNo].startTime = _now;
            round_m[_rndNo].endTime = _now + rndFirStage_;
        }

        // first or second stage
        if (round_m[_rndNo].keys < 10000000000000000000000000)
        {
            // first stage
            uint256 _keys = (round_m[_rndNo].eth).keysRec(_eth);
            // keys number 10,000,000, enter the second stage
            if (_keys.add(round_m[_rndNo].keys) >= 10000000000000000000000000)
            {
                _keys = (10000000000000000000000000).sub(round_m[_rndNo].keys);

                if (round_m[_rndNo].eth >= 8562500000000000000000)
                {
                    _ethUse = 0;
                } else {
                    _ethUse = (8562500000000000000000).sub(round_m[_rndNo].eth);
                }

                if (_eth > _ethUse)
                {
                    // refund
                    msg.sender.transfer(_eth.sub(_ethUse));
                } else {
                    // fix
                    _ethUse = _eth;
                }
            }

            // if they bought at least 1 whole key
            if (_keys >= 1000000000000000000)
            {
                round_m[_rndNo].endTime = _now + rndFirStage_;
                round_m[_rndNo].leader = msg.sender;
            }

            // update playerRound
            playerRound_m[_rndNo][msg.sender].keys = _keys.add(playerRound_m[_rndNo][msg.sender].keys);
            playerRound_m[_rndNo][msg.sender].eth = _ethUse.add(playerRound_m[_rndNo][msg.sender].eth);

            // update round
            round_m[_rndNo].keys = _keys.add(round_m[_rndNo].keys);
            round_m[_rndNo].eth = _ethUse.add(round_m[_rndNo].eth);

            // update global variable
            totalEth = _ethUse.add(totalEth);

            // event
            emit FlyToTheMoonEvents.onFirStage
            (
                msg.sender,
                _rndNo,
                _keys,
                _ethUse,
                _now
            );
        } else {
            // second stage
            // no more keys
            // lastPrice + 0.1Ether <= newPrice <= lastPrice + 10Ether
            uint256 _lastPrice = round_m[_rndNo].lastPrice;
            uint256 _maxPrice = (10000000000000000000).add(_lastPrice);
            // less than (lastPrice + 0.1Ether) ?
            require(_eth >= (100000000000000000).add(_lastPrice), "Need more Ether");
            // more than (lastPrice + 10Ether) ?
            if (_eth > _maxPrice)
            {
                _ethUse = _maxPrice;
                // refund
                msg.sender.transfer(_eth.sub(_ethUse));
            }

            round_m[_rndNo].endTime = _now + rndSecStage_;
            round_m[_rndNo].leader = msg.sender;
            round_m[_rndNo].lastPrice = _ethUse;

            // update playerRound
            playerRound_m[_rndNo][msg.sender].eth = _ethUse.add(playerRound_m[_rndNo][msg.sender].eth);

            // update round
            round_m[_rndNo].eth = _ethUse.add(round_m[_rndNo].eth);

            // update global variable
            totalEth = _ethUse.add(totalEth);

            // event
            emit FlyToTheMoonEvents.onSecStage
            (
                msg.sender,
                _rndNo,
                _ethUse,
                _now
            );
        }
    }

    /**
     * @dev withdraws earnings by rndNo.
     * 0x528ce7de
     * 0x528ce7de0000000000000000000000000000000000000000000000000000000000000001
     */
    function withdrawByRndNo(uint256 _rndNo)
        onlyHuman()
        public
    {
        require(_rndNo <= rndNo, "You're running too fast");
        uint256 _total = (((round_m[_rndNo].eth).mul(playerRound_m[_rndNo][msg.sender].keys)).mul(60) / ((round_m[_rndNo].keys).mul(100)));
        uint256 _withdrawed = playerRound_m[_rndNo][msg.sender].withdraw;
        require(_total > _withdrawed, "No need to withdraw");
        uint256 _ethOut = _total.sub(_withdrawed);
        playerRound_m[_rndNo][msg.sender].withdraw = _total;
        msg.sender.transfer(_ethOut);

        // event
        emit FlyToTheMoonEvents.onWithdraw
        (
            msg.sender,
            _rndNo,
            _ethOut,
            now
        );
    }

    /**
     * @dev Award by rndNo.
     * 0x80ec35ff
     * 0x80ec35ff0000000000000000000000000000000000000000000000000000000000000001
     */
    function awardByRndNo(uint256 _rndNo)
        onlyHuman()
        public
    {
        require(_rndNo <= rndNo, "You're running too fast");
        require(now > round_m[_rndNo].endTime, "Wait patiently");
        require(round_m[_rndNo].leader == msg.sender, "The prize is not yours");
        require(round_m[_rndNo].award == false, "Can't get prizes repeatedly");

        uint256 _ethOut = ((round_m[_rndNo].eth).mul(35) / (100));
        round_m[_rndNo].award = true;
        msg.sender.transfer(_ethOut);

        // event
        emit FlyToTheMoonEvents.onAward
        (
            msg.sender,
            _rndNo,
            _ethOut,
            now
        );
    }

    /**
     * @dev fee withdraw to owner, everyone can do it.
     * 0x6561e6ba
     */
    function feeWithdraw()
        onlyHuman()
        public
    {
        uint256 _total = (totalEth.mul(5) / (100));
        uint256 _withdrawed = ownerWithdraw;
        require(_total > _withdrawed, "No need to withdraw");
        ownerWithdraw = _total;
        owner.transfer(_total.sub(_withdrawed));
    }

    /**
     * @dev change owner.
     */
    function changeOwner(address newOwner)
        onlyOwner()
        public
    {
        owner = newOwner;
    }

    /**
     * @dev returns all current round info needed for front end
     * 0x747dff42
     * @return round id 
     * @return total eth for round
     * @return total keys for round 
     * @return time round started
     * @return time round ends
     * @return current leader
     * @return lastest price
     * @return current key price
     */
    function getCurrentRoundInfo()
        public 
        view 
        returns(uint256, uint256, uint256, uint256, uint256, address, uint256, uint256)
    {

        uint256 _rndNo = rndNo;
        
        return (
            _rndNo,
            round_m[_rndNo].eth,
            round_m[_rndNo].keys,
            round_m[_rndNo].startTime,
            round_m[_rndNo].endTime,
            round_m[_rndNo].leader,
            round_m[_rndNo].lastPrice,
            getBuyPrice()
        );
    }
    
    /**
     * @dev return the price buyer will pay for next 1 individual key during first stage.
     * 0x018a25e8
     * @return price for next key bought (in wei format)
     */
    function getBuyPrice()
        public 
        view 
        returns(uint256)
    {
        uint256 _rndNo = rndNo;
        uint256 _now = now;
        
        // start next round?
        if (_now > round_m[_rndNo].endTime)
        {
            return (75000000000000);
        }
        if (round_m[_rndNo].keys < 10000000000000000000000000)
        {
            return ((round_m[_rndNo].keys.add(1000000000000000000)).ethRec(1000000000000000000));
        }
        //second stage
        return (0);
    }
}

library KeysCalc {
    using SafeMath for *;
    /**
     * @dev calculates number of keys received given X eth 
     * @param _curEth current amount of eth in contract 
     * @param _newEth eth being spent
     * @return amount of ticket purchased
     */
    function keysRec(uint256 _curEth, uint256 _newEth)
        internal
        pure
        returns (uint256)
    {
        return(keys((_curEth).add(_newEth)).sub(keys(_curEth)));
    }
    
    /**
     * @dev calculates amount of eth received if you sold X keys 
     * @param _curKeys current amount of keys that exist 
     * @param _sellKeys amount of keys you wish to sell
     * @return amount of eth received
     */
    function ethRec(uint256 _curKeys, uint256 _sellKeys)
        internal
        pure
        returns (uint256)
    {
        return((eth(_curKeys)).sub(eth(_curKeys.sub(_sellKeys))));
    }

    /**
     * @dev calculates how many keys would exist with given an amount of eth
     * @param _eth eth "in contract"
     * @return number of keys that would exist
     */
    function keys(uint256 _eth) 
        internal
        pure
        returns(uint256)
    {
        return ((((((_eth).mul(1000000000000000000)).mul(312500000000000000000000000)).add(5624988281256103515625000000000000000000000000000000000000000000)).sqrt()).sub(74999921875000000000000000000000)) / (156250000);
    }
    
    /**
     * @dev calculates how much eth would be in contract given a number of keys
     * @param _keys number of keys "in contract" 
     * @return eth that would exists
     */
    function eth(uint256 _keys) 
        internal
        pure
        returns(uint256)  
    {
        return ((78125000).mul(_keys.sq()).add(((149999843750000).mul(_keys.mul(1000000000000000000))) / (2))) / ((1000000000000000000).sq());
    }
}

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 * - added sqrt
 * - added sq
 * - added pwr 
 * - changed asserts to requires with error log outputs
 * - removed div, its useless
 */
library SafeMath {
    
    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b) 
        internal 
        pure 
        returns (uint256 c) 
    {
        if (a == 0) {
            return 0;
        }
        c = a * b;
        require(c / a == b, "SafeMath mul failed");
        return c;
    }

    /**
    * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b)
        internal
        pure
        returns (uint256) 
    {
        require(b <= a, "SafeMath sub failed");
        return a - b;
    }

    /**
    * @dev Adds two numbers, throws on overflow.
    */
    function add(uint256 a, uint256 b)
        internal
        pure
        returns (uint256 c) 
    {
        c = a + b;
        require(c >= a, "SafeMath add failed");
        return c;
    }
    
    /**
     * @dev gives square root of given x.
     */
    function sqrt(uint256 x)
        internal
        pure
        returns (uint256 y) 
    {
        uint256 z = ((add(x,1)) / 2);
        y = x;
        while (z < y) 
        {
            y = z;
            z = ((add((x / z),z)) / 2);
        }
    }
    
    /**
     * @dev gives square. multiplies x by x
     */
    function sq(uint256 x)
        internal
        pure
        returns (uint256)
    {
        return (mul(x,x));
    }
    
    /**
     * @dev x to the power of y 
     */
    function pwr(uint256 x, uint256 y)
        internal 
        pure 
        returns (uint256)
    {
        if (x==0)
            return (0);
        else if (y==0)
            return (1);
        else 
        {
            uint256 z = x;
            for (uint256 i=1; i < y; i++)
                z = mul(z,x);
            return (z);
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"getBuyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rndNo","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ownerWithdraw","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_rndNo","type":"uint256"}],"name":"withdrawByRndNo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"feeWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentRoundInfo","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"address"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"round_m","outputs":[{"name":"eth","type":"uint256"},{"name":"keys","type":"uint256"},{"name":"startTime","type":"uint256"},{"name":"endTime","type":"uint256"},{"name":"leader","type":"address"},{"name":"lastPrice","type":"uint256"},{"name":"award","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_rndNo","type":"uint256"}],"name":"awardByRndNo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"address"}],"name":"playerRound_m","outputs":[{"name":"eth","type":"uint256"},{"name":"keys","type":"uint256"},{"name":"withdraw","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"player","type":"address"},{"indexed":true,"name":"rndNo","type":"uint256"},{"indexed":false,"name":"keys","type":"uint256"},{"indexed":false,"name":"eth","type":"uint256"},{"indexed":false,"name":"timeStamp","type":"uint256"}],"name":"onFirStage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"player","type":"address"},{"indexed":true,"name":"rndNo","type":"uint256"},{"indexed":false,"name":"eth","type":"uint256"},{"indexed":false,"name":"timeStamp","type":"uint256"}],"name":"onSecStage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"player","type":"address"},{"indexed":true,"name":"rndNo","type":"uint256"},{"indexed":false,"name":"eth","type":"uint256"},{"indexed":false,"name":"timeStamp","type":"uint256"}],"name":"onWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"player","type":"address"},{"indexed":true,"name":"rndNo","type":"uint256"},{"indexed":false,"name":"eth","type":"uint256"},{"indexed":false,"name":"timeStamp","type":"uint256"}],"name":"onAward","type":"event"}]

608060405260016000556000600155600060055534801561001f57600080fd5b5060016000526002602052427fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e281905561a8c0017fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e35560048054600160a060020a0319163317905561146c806100966000396000f3006080604052600436106100b95763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663018a25e8811461070c5780633c28308a146107335780633c3c9c23146107485780634311de8f1461075d578063528ce7de146107725780636561e6ba1461078c578063747dff42146107a15780637e8ac5901461080057806380ec35ff1461085b5780638da5cb5b14610873578063a05ce940146108a4578063a6f9dae1146108e6575b600080808080808033803b8015610108576040805160e560020a62461bcd0281526020600482015260116024820152600080516020611421833981519152604482015290519081900360640190fd5b34633b9aca0081101561018b576040805160e560020a62461bcd02815260206004820152602160248201527f706f636b6574206c696e743a206e6f7420612076616c69642063757272656e6360448201527f7900000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b69152d02c7e14af68000008111156101ed576040805160e560020a62461bcd02815260206004820152600e60248201527f6e6f20766974616c696b2c206e6f000000000000000000000000000000000000604482015290519081900360640190fd5b600080548082526002602052604090912060030154349b50429a509098508a975089111561024e5761022688600163ffffffff61090716565b60008181558181526002602081905260409091209081018b905561a8c08b0160039091015597505b6000888152600260205260409020600101546a084595161401484a000000111561051157600088815260026020526040902054610291908b63ffffffff61096816565b6000898152600260205260409020600101549096506a084595161401484a000000906102c490889063ffffffff61090716565b1061039d576000888152600260205260409020600101546102f7906a084595161401484a0000009063ffffffff6109a116565b6000898152600260205260409020549096506901d02c8edfee423a000011610322576000965061034f565b60008881526002602052604090205461034c906901d02c8edfee423a00009063ffffffff6109a116565b96505b868a111561039957336108fc61036b8c8a63ffffffff6109a116565b6040518115909202916000818181858888f19350505050158015610393573d6000803e3d6000fd5b5061039d565b8996505b670de0b6b3a764000086106103e557600088815260026020526040902061a8c08a016003820155600401805473ffffffffffffffffffffffffffffffffffffffff1916331790555b600088815260036020908152604080832033845290915290206001015461041390879063ffffffff61090716565b60008981526003602090815260408083203384529091529020600181019190915554610440908890610907565b60008981526003602090815260408083203384528252808320939093558a825260029052206001015461047a90879063ffffffff61090716565b60008981526002602052604090206001810191909155546104a290889063ffffffff61090716565b6000898152600260205260409020556001546104c590889063ffffffff61090716565b60015560408051878152602081018990528082018b90529051899133917f34bcf67c3ef69ce65c0a8a1a121ab672129441005fea1eb1f65693816fad1d0e9181900360600190a3610700565b600088815260026020526040902060050154945061053d678ac7230489e800008663ffffffff61090716565b935061055767016345785d8a00008663ffffffff61090716565b8a10156105ae576040805160e560020a62461bcd02815260206004820152600f60248201527f4e656564206d6f72652045746865720000000000000000000000000000000000604482015290519081900360640190fd5b838a11156105f9579295508592336108fc6105cf8c8763ffffffff6109a116565b6040518115909202916000818181858888f193505050501580156105f7573d6000803e3d6000fd5b505b600088815260026020908152604080832061a8c08d0160038083019190915560048201805473ffffffffffffffffffffffffffffffffffffffff19163390811790915560059092018c9055835281842090845290915290205461066390889063ffffffff61090716565b60008981526003602090815260408083203384528252808320939093558a825260029052205461069a90889063ffffffff61090716565b6000898152600260205260409020556001546106bd90889063ffffffff61090716565b60015560408051888152602081018b905281518a9233927f267ac6ebc3d6b413782aeb4a2994e39edc25b4725f251588f7ffa8910337e4bf929081900390910190a35b50505050505050505050005b34801561071857600080fd5b50610721610a01565b60408051918252519081900360200190f35b34801561073f57600080fd5b50610721610a9d565b34801561075457600080fd5b50610721610aa3565b34801561076957600080fd5b50610721610aa9565b34801561077e57600080fd5b5061078a600435610aaf565b005b34801561079857600080fd5b5061078a610ce9565b3480156107ad57600080fd5b506107b6610e07565b6040805198895260208901979097528787019590955260608701939093526080860191909152600160a060020a031660a085015260c084015260e083015251908190036101000190f35b34801561080c57600080fd5b50610818600435610e73565b604080519788526020880196909652868601949094526060860192909252600160a060020a0316608085015260a0840152151560c0830152519081900360e00190f35b34801561086757600080fd5b5061078a600435610ebd565b34801561087f57600080fd5b50610888611161565b60408051600160a060020a039092168252519081900360200190f35b3480156108b057600080fd5b506108c8600435600160a060020a0360243516611170565b60408051938452602084019290925282820152519081900360600190f35b3480156108f257600080fd5b5061078a600160a060020a036004351661119c565b81810182811015610962576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b600061099a6109768461122d565b61098e610989868663ffffffff61090716565b61122d565b9063ffffffff6109a116565b9392505050565b6000828211156109fb576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b60008054808252600260205260408220600301544290811115610a2c576544364c5bb0009250610a98565b6000828152600260205260409020600101546a084595161401484a0000001115610a9357600082815260026020526040902060010154610a8c90670de0b6b3a764000090610a80908263ffffffff61090716565b9063ffffffff6112b116565b9250610a98565b600092505b505090565b60005481565b60015481565b60055481565b6000808033803b8015610afa576040805160e560020a62461bcd0281526020600482015260116024820152600080516020611421833981519152604482015290519081900360640190fd5b600054861115610b54576040805160e560020a62461bcd02815260206004820152601760248201527f596f752772652072756e6e696e6720746f6f2066617374000000000000000000604482015290519081900360640190fd5b600086815260026020526040902060010154610b7790606463ffffffff6112d716565b60008781526003602090815260408083203384528252808320600101548a8452600290925290912054610bc291603c91610bb69163ffffffff6112d716565b9063ffffffff6112d716565b811515610bcb57fe5b600088815260036020908152604080832033845290915290206002015491900495509350838511610c46576040805160e560020a62461bcd02815260206004820152601360248201527f4e6f206e65656420746f20776974686472617700000000000000000000000000604482015290519081900360640190fd5b610c56858563ffffffff6109a116565b6000878152600360209081526040808320338085529252808320600201899055519295509185156108fc0291869190818181858888f19350505050158015610ca2573d6000803e3d6000fd5b50604080518481524260208201528151889233927f90ebb005d68efee044927e1e77e1fd0cecc508368aa72c39250a787eed5f0a70929081900390910190a3505050505050565b60008033803b8015610d33576040805160e560020a62461bcd0281526020600482015260116024820152600080516020611421833981519152604482015290519081900360640190fd5b600154606490610d4a90600563ffffffff6112d716565b811515610d5357fe5b04935060055492508284111515610db4576040805160e560020a62461bcd02815260206004820152601360248201527f4e6f206e65656420746f20776974686472617700000000000000000000000000604482015290519081900360640190fd5b6005849055600454600160a060020a03166108fc610dd8868663ffffffff6109a116565b6040518115909202916000818181858888f19350505050158015610e00573d6000803e3d6000fd5b5050505050565b600080548082526002602081905260408320805460018201549282015460038301546004840154600590940154879687968796879687968796879686959394600160a060020a031690610e58610a01565b98509850985098509850985098509850509091929394959697565b6002602081905260009182526040909120805460018201549282015460038301546004840154600585015460069095015493959492939192600160a060020a039091169160ff1687565b600033803b8015610f06576040805160e560020a62461bcd0281526020600482015260116024820152600080516020611421833981519152604482015290519081900360640190fd5b600054841115610f60576040805160e560020a62461bcd02815260206004820152601760248201527f596f752772652072756e6e696e6720746f6f2066617374000000000000000000604482015290519081900360640190fd5b6000848152600260205260409020600301544211610fc8576040805160e560020a62461bcd02815260206004820152600e60248201527f576169742070617469656e746c79000000000000000000000000000000000000604482015290519081900360640190fd5b600084815260026020526040902060040154600160a060020a03163314611039576040805160e560020a62461bcd02815260206004820152601660248201527f546865207072697a65206973206e6f7420796f75727300000000000000000000604482015290519081900360640190fd5b60008481526002602052604090206006015460ff16156110a3576040805160e560020a62461bcd02815260206004820152601b60248201527f43616e277420676574207072697a65732072657065617465646c790000000000604482015290519081900360640190fd5b6000848152600260205260409020546064906110c690602363ffffffff6112d716565b8115156110cf57fe5b600086815260026020526040808220600601805460ff1916600117905551929091049450339185156108fc0291869190818181858888f1935050505015801561111c573d6000803e3d6000fd5b50604080518481524260208201528151869233927f067aa1d7e7bd2c0daf878a68551cbd9e1a4dbaaa1510600154c71bffbe420d86929081900390910190a350505050565b600454600160a060020a031681565b600360209081526000928352604080842090915290825290208054600182015460029092015490919083565b600454600160a060020a031633146111fe576040805160e560020a62461bcd02815260206004820152601460248201527f6f6e6c79206f776e65722063616e20646f206974000000000000000000000000604482015290519081900360640190fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60006309502f906112a16d03b2a1d15167e7c5699bfde0000061098e61129c7a0dac7055469777a6122ee4310dd6c14410500f29048400000000006112906b01027e72f1f1281308800000610bb68a670de0b6b3a764000063ffffffff6112d716565b9063ffffffff61090716565b61134e565b8115156112aa57fe5b0492915050565b600061099a6112ce6112c9858563ffffffff6109a116565b6113a7565b61098e856113a7565b60008215156112e857506000610962565b508181028183828115156112f857fe5b0414610962576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b600080600261135e846001610907565b81151561136757fe5b0490508291505b818110156113a1578091506002611390828581151561138957fe5b0483610907565b81151561139957fe5b04905061136e565b50919050565b60006113ba670de0b6b3a7640000611414565b6112a160026113ed6113da86670de0b6b3a764000063ffffffff6112d716565b65886c8f6730709063ffffffff6112d716565b8115156113f657fe5b0461129061140386611414565b6304a817c89063ffffffff6112d716565b600061096282836112d75600736f7272792068756d616e73206f6e6c79000000000000000000000000000000a165627a7a7230582054ca8c4e33011c9ec47ce0f68687d690a7ba513d570005c0e8e1bac4d62971c00029

Deployed Bytecode

0x6080604052600436106100b95763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663018a25e8811461070c5780633c28308a146107335780633c3c9c23146107485780634311de8f1461075d578063528ce7de146107725780636561e6ba1461078c578063747dff42146107a15780637e8ac5901461080057806380ec35ff1461085b5780638da5cb5b14610873578063a05ce940146108a4578063a6f9dae1146108e6575b600080808080808033803b8015610108576040805160e560020a62461bcd0281526020600482015260116024820152600080516020611421833981519152604482015290519081900360640190fd5b34633b9aca0081101561018b576040805160e560020a62461bcd02815260206004820152602160248201527f706f636b6574206c696e743a206e6f7420612076616c69642063757272656e6360448201527f7900000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b69152d02c7e14af68000008111156101ed576040805160e560020a62461bcd02815260206004820152600e60248201527f6e6f20766974616c696b2c206e6f000000000000000000000000000000000000604482015290519081900360640190fd5b600080548082526002602052604090912060030154349b50429a509098508a975089111561024e5761022688600163ffffffff61090716565b60008181558181526002602081905260409091209081018b905561a8c08b0160039091015597505b6000888152600260205260409020600101546a084595161401484a000000111561051157600088815260026020526040902054610291908b63ffffffff61096816565b6000898152600260205260409020600101549096506a084595161401484a000000906102c490889063ffffffff61090716565b1061039d576000888152600260205260409020600101546102f7906a084595161401484a0000009063ffffffff6109a116565b6000898152600260205260409020549096506901d02c8edfee423a000011610322576000965061034f565b60008881526002602052604090205461034c906901d02c8edfee423a00009063ffffffff6109a116565b96505b868a111561039957336108fc61036b8c8a63ffffffff6109a116565b6040518115909202916000818181858888f19350505050158015610393573d6000803e3d6000fd5b5061039d565b8996505b670de0b6b3a764000086106103e557600088815260026020526040902061a8c08a016003820155600401805473ffffffffffffffffffffffffffffffffffffffff1916331790555b600088815260036020908152604080832033845290915290206001015461041390879063ffffffff61090716565b60008981526003602090815260408083203384529091529020600181019190915554610440908890610907565b60008981526003602090815260408083203384528252808320939093558a825260029052206001015461047a90879063ffffffff61090716565b60008981526002602052604090206001810191909155546104a290889063ffffffff61090716565b6000898152600260205260409020556001546104c590889063ffffffff61090716565b60015560408051878152602081018990528082018b90529051899133917f34bcf67c3ef69ce65c0a8a1a121ab672129441005fea1eb1f65693816fad1d0e9181900360600190a3610700565b600088815260026020526040902060050154945061053d678ac7230489e800008663ffffffff61090716565b935061055767016345785d8a00008663ffffffff61090716565b8a10156105ae576040805160e560020a62461bcd02815260206004820152600f60248201527f4e656564206d6f72652045746865720000000000000000000000000000000000604482015290519081900360640190fd5b838a11156105f9579295508592336108fc6105cf8c8763ffffffff6109a116565b6040518115909202916000818181858888f193505050501580156105f7573d6000803e3d6000fd5b505b600088815260026020908152604080832061a8c08d0160038083019190915560048201805473ffffffffffffffffffffffffffffffffffffffff19163390811790915560059092018c9055835281842090845290915290205461066390889063ffffffff61090716565b60008981526003602090815260408083203384528252808320939093558a825260029052205461069a90889063ffffffff61090716565b6000898152600260205260409020556001546106bd90889063ffffffff61090716565b60015560408051888152602081018b905281518a9233927f267ac6ebc3d6b413782aeb4a2994e39edc25b4725f251588f7ffa8910337e4bf929081900390910190a35b50505050505050505050005b34801561071857600080fd5b50610721610a01565b60408051918252519081900360200190f35b34801561073f57600080fd5b50610721610a9d565b34801561075457600080fd5b50610721610aa3565b34801561076957600080fd5b50610721610aa9565b34801561077e57600080fd5b5061078a600435610aaf565b005b34801561079857600080fd5b5061078a610ce9565b3480156107ad57600080fd5b506107b6610e07565b6040805198895260208901979097528787019590955260608701939093526080860191909152600160a060020a031660a085015260c084015260e083015251908190036101000190f35b34801561080c57600080fd5b50610818600435610e73565b604080519788526020880196909652868601949094526060860192909252600160a060020a0316608085015260a0840152151560c0830152519081900360e00190f35b34801561086757600080fd5b5061078a600435610ebd565b34801561087f57600080fd5b50610888611161565b60408051600160a060020a039092168252519081900360200190f35b3480156108b057600080fd5b506108c8600435600160a060020a0360243516611170565b60408051938452602084019290925282820152519081900360600190f35b3480156108f257600080fd5b5061078a600160a060020a036004351661119c565b81810182811015610962576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b600061099a6109768461122d565b61098e610989868663ffffffff61090716565b61122d565b9063ffffffff6109a116565b9392505050565b6000828211156109fb576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b60008054808252600260205260408220600301544290811115610a2c576544364c5bb0009250610a98565b6000828152600260205260409020600101546a084595161401484a0000001115610a9357600082815260026020526040902060010154610a8c90670de0b6b3a764000090610a80908263ffffffff61090716565b9063ffffffff6112b116565b9250610a98565b600092505b505090565b60005481565b60015481565b60055481565b6000808033803b8015610afa576040805160e560020a62461bcd0281526020600482015260116024820152600080516020611421833981519152604482015290519081900360640190fd5b600054861115610b54576040805160e560020a62461bcd02815260206004820152601760248201527f596f752772652072756e6e696e6720746f6f2066617374000000000000000000604482015290519081900360640190fd5b600086815260026020526040902060010154610b7790606463ffffffff6112d716565b60008781526003602090815260408083203384528252808320600101548a8452600290925290912054610bc291603c91610bb69163ffffffff6112d716565b9063ffffffff6112d716565b811515610bcb57fe5b600088815260036020908152604080832033845290915290206002015491900495509350838511610c46576040805160e560020a62461bcd02815260206004820152601360248201527f4e6f206e65656420746f20776974686472617700000000000000000000000000604482015290519081900360640190fd5b610c56858563ffffffff6109a116565b6000878152600360209081526040808320338085529252808320600201899055519295509185156108fc0291869190818181858888f19350505050158015610ca2573d6000803e3d6000fd5b50604080518481524260208201528151889233927f90ebb005d68efee044927e1e77e1fd0cecc508368aa72c39250a787eed5f0a70929081900390910190a3505050505050565b60008033803b8015610d33576040805160e560020a62461bcd0281526020600482015260116024820152600080516020611421833981519152604482015290519081900360640190fd5b600154606490610d4a90600563ffffffff6112d716565b811515610d5357fe5b04935060055492508284111515610db4576040805160e560020a62461bcd02815260206004820152601360248201527f4e6f206e65656420746f20776974686472617700000000000000000000000000604482015290519081900360640190fd5b6005849055600454600160a060020a03166108fc610dd8868663ffffffff6109a116565b6040518115909202916000818181858888f19350505050158015610e00573d6000803e3d6000fd5b5050505050565b600080548082526002602081905260408320805460018201549282015460038301546004840154600590940154879687968796879687968796879686959394600160a060020a031690610e58610a01565b98509850985098509850985098509850509091929394959697565b6002602081905260009182526040909120805460018201549282015460038301546004840154600585015460069095015493959492939192600160a060020a039091169160ff1687565b600033803b8015610f06576040805160e560020a62461bcd0281526020600482015260116024820152600080516020611421833981519152604482015290519081900360640190fd5b600054841115610f60576040805160e560020a62461bcd02815260206004820152601760248201527f596f752772652072756e6e696e6720746f6f2066617374000000000000000000604482015290519081900360640190fd5b6000848152600260205260409020600301544211610fc8576040805160e560020a62461bcd02815260206004820152600e60248201527f576169742070617469656e746c79000000000000000000000000000000000000604482015290519081900360640190fd5b600084815260026020526040902060040154600160a060020a03163314611039576040805160e560020a62461bcd02815260206004820152601660248201527f546865207072697a65206973206e6f7420796f75727300000000000000000000604482015290519081900360640190fd5b60008481526002602052604090206006015460ff16156110a3576040805160e560020a62461bcd02815260206004820152601b60248201527f43616e277420676574207072697a65732072657065617465646c790000000000604482015290519081900360640190fd5b6000848152600260205260409020546064906110c690602363ffffffff6112d716565b8115156110cf57fe5b600086815260026020526040808220600601805460ff1916600117905551929091049450339185156108fc0291869190818181858888f1935050505015801561111c573d6000803e3d6000fd5b50604080518481524260208201528151869233927f067aa1d7e7bd2c0daf878a68551cbd9e1a4dbaaa1510600154c71bffbe420d86929081900390910190a350505050565b600454600160a060020a031681565b600360209081526000928352604080842090915290825290208054600182015460029092015490919083565b600454600160a060020a031633146111fe576040805160e560020a62461bcd02815260206004820152601460248201527f6f6e6c79206f776e65722063616e20646f206974000000000000000000000000604482015290519081900360640190fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60006309502f906112a16d03b2a1d15167e7c5699bfde0000061098e61129c7a0dac7055469777a6122ee4310dd6c14410500f29048400000000006112906b01027e72f1f1281308800000610bb68a670de0b6b3a764000063ffffffff6112d716565b9063ffffffff61090716565b61134e565b8115156112aa57fe5b0492915050565b600061099a6112ce6112c9858563ffffffff6109a116565b6113a7565b61098e856113a7565b60008215156112e857506000610962565b508181028183828115156112f857fe5b0414610962576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b600080600261135e846001610907565b81151561136757fe5b0490508291505b818110156113a1578091506002611390828581151561138957fe5b0483610907565b81151561139957fe5b04905061136e565b50919050565b60006113ba670de0b6b3a7640000611414565b6112a160026113ed6113da86670de0b6b3a764000063ffffffff6112d716565b65886c8f6730709063ffffffff6112d716565b8115156113f657fe5b0461129061140386611414565b6304a817c89063ffffffff6112d716565b600061096282836112d75600736f7272792068756d616e73206f6e6c79000000000000000000000000000000a165627a7a7230582054ca8c4e33011c9ec47ce0f68687d690a7ba513d570005c0e8e1bac4d62971c00029

Swarm Source

bzzr://54ca8c4e33011c9ec47ce0f68687d690a7ba513d570005c0e8e1bac4d62971c0

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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