Contract Overview
Balance: 0.095631361661705271 Ether
Ether Value: $8.40 (@ $87.79/ETH)
Transactions: 241 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xf0ea6ce7d210ee58e83a463af13989b5c2dbe108at txn 0x11f27351db147bddfbbbe08d71d0359791e805317a3ca995aa64c51477781deb
Token Balance:
 Latest 25 transactions from a total of 241 transactions

TxHash Age From To Value [TxFee]
0x8eb377db070a0b6b8f3f4dcb0fd301ebe3502ae44eebd3a8abf28acec01ae0a11 day 14 hrs ago0x7078959553b98aa71400a9755adeb6ffdc6b1985  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.00042184
0x0eb838d97378fc56e63edb7f5a0ffcace2fdb343ef83f547d39d9b4c703e2fa72 days 5 hrs ago0xdb88f36a85742a03ebc185933881dca1e83e6a80  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.02 Ether0.000436899
0x9df0fa6ca5cc93829e4133eaefe44e7ca9f34311f7aad22a09236580f4cead242 days 19 hrs ago0xdb88f36a85742a03ebc185933881dca1e83e6a80  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.01 Ether0.000750138
0xb6ac1703eb4d9a5c3fa2f0f36719a4d9d946c8dc721607c3eb6e5f71e2bd3c3c2 days 19 hrs ago0xdb88f36a85742a03ebc185933881dca1e83e6a80  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000130644
0xd970ec2da161e6503c9f128ba6d124318759767754558019870c9163ff518ebc2 days 19 hrs ago0xdb88f36a85742a03ebc185933881dca1e83e6a80  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000168736
0x1df67baf6e0b5f7b56bc101bc677571b065605cbb090751330dab274e47d66e02 days 19 hrs ago0xdb88f36a85742a03ebc185933881dca1e83e6a80  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.01 Ether0.001480184
0x3e326c92d597830a1a7215f32232eacd717f4d01d003b5ac52bcafbf303733dd2 days 19 hrs ago0xdb88f36a85742a03ebc185933881dca1e83e6a80  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000179976
0x37ac34f88f2b0fcfd9e86222af7a579345390894ef5e7794fa2a53245b696c292 days 21 hrs ago0xdb88f36a85742a03ebc185933881dca1e83e6a80  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000775008
0x48fa5af4351264b3381c6147563e3683e5b778d3529b626fdc294ba41e1c86942 days 21 hrs ago0xdb88f36a85742a03ebc185933881dca1e83e6a80  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000174702
0xc062fc48c0a98f5c8cbe9f3525c7e740751bb8d53e8b594adb8f4a29fa8d8a137 days 1 hr ago0x8948e4b00deb0a5adb909f4dc5789d20d0851d71  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.01 Ether0.000350875
0x5b535dda455ccc63af75330babeadf76603fc808ea185330c224ef8bee7a8ae69 days 17 hrs ago0xcd2caaae37354b7549ac7c526edc432681821bbb  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.01 Ether0.000250625
0x5b4da0604ca26f6dab52af710685f3c4fa73feab6246d296a9d7232df86280fb12 days 3 hrs ago0xdb856e59b077f9d2548719a71e549a7b61cb78e3  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000126552
0x52326f0c2f80ad53a9653e77b68f66e075f94ea7c2ec7049c1dd674868c8066b13 days 2 hrs ago0x7205be74bdecd803b87aae2ab42a35d9d3d87483  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.0002009073
0x8a3887fae8b75b0e313e5fe6c585074207cbeff6eb1b9328e47e394f40f693a215 days 7 hrs ago0x7078959553b98aa71400a9755adeb6ffdc6b1985  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000145585
0xf88c15ea5404712701289a037b3333dbebe4d27ed46affb6e16f1f7cd73bf70115 days 20 hrs ago0xce3b6800b4dcd375d3881384471d7f65d6c8cb01  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.0002181
0xbf903017a047f23b3d377cb3dc802d898669c61308d7d6e6bd3b9e0630c6554616 days 16 hrs ago0x7078959553b98aa71400a9755adeb6ffdc6b1985  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.02 Ether0.00160633
0x640af0d2914d53f71ab5051a305abab44a060687a993c5670744afcd6855dc8617 days 4 hrs ago0xce3b6800b4dcd375d3881384471d7f65d6c8cb01  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.01 Ether0.000925115
0x8413d4383c766517971806d3bba066310214a19478d7f35049de8dce18eb9cb117 days 4 hrs ago0xce3b6800b4dcd375d3881384471d7f65d6c8cb01  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000316425
0x45d2c39942ce490be818ddebe6671eba3efd74e89453f269c1533dbbd1153f7521 days 9 hrs ago0x7078959553b98aa71400a9755adeb6ffdc6b1985  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000685008
0x8faabb5f91b1f53a5092db8c62a0012ba03c26903bbc3d7381f3b0db484bacc021 days 10 hrs ago0x9d3f10f5d553dda3f36e09ab0c3c757ba99e8894  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.00010905
0xefa903d0850e30ab1f0fe28c7d64b84c0ebe4117733305b30c0af6ba7d55545b21 days 12 hrs ago0x9d3f10f5d553dda3f36e09ab0c3c757ba99e8894  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.02 Ether0.000481899
0xcb426344deb3c0d508cb48cb01dc4f3cd7359204082e4549b1b1ae3d85c8700322 days 10 hrs ago0x7078959553b98aa71400a9755adeb6ffdc6b1985  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0.01 Ether0.001534815
0xb89cec47270c8ca912f48a81719171493cf2024693241a84f057e9764a5c4c4822 days 10 hrs ago0x7078959553b98aa71400a9755adeb6ffdc6b1985  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000145585
0x1af5fb27a2886f38af3979f4c89a57b7920238891f0194ee257189a1d78d40a624 days 17 hrs ago0xce3b6800b4dcd375d3881384471d7f65d6c8cb01  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.000116468
0xd91fb3a6e2500f6fb9c4cc687e4848e8a876bbf3ef2f2d4300bc429f27f12a6734 days 10 hrs ago0x9d3f10f5d553dda3f36e09ab0c3c757ba99e8894  IN   0xe448c94856b36ffb701fb5a578452d32f52788ea0 Ether0.0000524106
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0x8eb377db070a0b6b8f3f4dcb0fd301ebe3502ae44eebd3a8abf28acec01ae0a168854001 day 14 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0x7078959553b98aa71400a9755adeb6ffdc6b19850.026527233670897539 Ether
0x0eb838d97378fc56e63edb7f5a0ffcace2fdb343ef83f547d39d9b4c703e2fa768815042 days 5 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.008 Ether
0x9df0fa6ca5cc93829e4133eaefe44e7ca9f34311f7aad22a09236580f4cead2468780052 days 19 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.004 Ether
0xd970ec2da161e6503c9f128ba6d124318759767754558019870c9163ff518ebc68780002 days 19 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xdb88f36a85742a03ebc185933881dca1e83e6a800.000268270337119494 Ether
0x1df67baf6e0b5f7b56bc101bc677571b065605cbb090751330dab274e47d66e068780002 days 19 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.004 Ether
0x37ac34f88f2b0fcfd9e86222af7a579345390894ef5e7794fa2a53245b696c2968776512 days 21 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0xe448c94856b36ffb701fb5a578452d32f52788ea0.008827033711949469 Ether
0x5b4da0604ca26f6dab52af710685f3c4fa73feab6246d296a9d7232df86280fb682161512 days 3 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xdb856e59b077f9d2548719a71e549a7b61cb78e30.030145483520937121 Ether
0xbf903017a047f23b3d377cb3dc802d898669c61308d7d6e6bd3b9e0630c65546679399516 days 16 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.008 Ether
0x640af0d2914d53f71ab5051a305abab44a060687a993c5670744afcd6855dc86679107417 days 4 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.004 Ether
0x45d2c39942ce490be818ddebe6671eba3efd74e89453f269c1533dbbd1153f75676538121 days 9 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0xe448c94856b36ffb701fb5a578452d32f52788ea0.001423278967833826 Ether
0xefa903d0850e30ab1f0fe28c7d64b84c0ebe4117733305b30c0af6ba7d55545b676467621 days 12 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.008 Ether
0xcb426344deb3c0d508cb48cb01dc4f3cd7359204082e4549b1b1ae3d85c87003675902922 days 10 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.004 Ether
0xcb426344deb3c0d508cb48cb01dc4f3cd7359204082e4549b1b1ae3d85c87003675902922 days 10 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0xe448c94856b36ffb701fb5a578452d32f52788ea0.019077818062821775 Ether
0x4d75733a1b3ae5a04e48e816009ad01df251f2192b1b0cfc21d28973b988a44d661961545 days 7 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.004 Ether
0x58f309816ab257659988a4fdf80cc562f225e883cb5065c47f17f5d3d54eadc5661507346 days 1 hr ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.004 Ether
0x717c75c092c12ff94a33e1f3b2267bd0b27f78d378b0be42e12a8ab7e38e3466660199348 days 4 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0x58e90f6e19563ce82c4a0010cece699b3e1a67230.191705296756004449 Ether
0xf96f6f87ddf99e1ac7cd3a4c0107fc24f97362b65f7cadffee673a6cf6a8e260660196148 days 4 hrs ago0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0xe448c94856b36ffb701fb5a578452d32f52788ea0.0008081738814755 Ether
0x6184d4d780c2a06dbe092f765dfd207dffe25c265a1d26c7f7290c584d47252a660130948 days 7 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.008 Ether
0x8b656482832473fce1b2d1b542657190b924061e38b63ba4a63f5b4c0b954af6660126148 days 7 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.02 Ether
0x96549637ca5e12ea5795984f617100754d5d2f2f642d00f5eb461e4e096b41fb660078948 days 9 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.02 Ether
0x6edb552140707e1d94cf7e461fb9b74eca882ef635ac64576ba3f69d7f66c1af660072948 days 9 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.02 Ether
0x55e6354192958632bc8f3d28348666a79a82324349180c8fcb7f68aa947593a1660052048 days 10 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.008 Ether
0x57488ba54fa2f66648e9d93a02f28f4980a54aaa902edda82102e98a0490f0d8660042348 days 11 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.04 Ether
0x8df3d998ce72be9605e60b4766ae55c5f0839ff39c1ac1de061c7feb55099694660037948 days 11 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.004 Ether
0xcbe3fe333d8d82b30b43e99ed738d42b82ca30043642b5d2b5fa5a0d04c9ca11660023448 days 11 hrs ago0xe448c94856b36ffb701fb5a578452d32f52788ea0xb3775fb83f7d12a36e0475abdd1fca35c091efbe0.004 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact Match)
Contract Name: P3Daily
Compiler Text: v0.4.25+commit.59dbf8f1
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.25;

contract P3Daily {
    
    using SafeMath for uint256;
    
    struct Round {
        uint256 pot;
        uint256 ticketsSold;
        uint256 blockNumber;
        uint256 startTime;
        mapping(uint256 => address) tickets;
        mapping(address => uint256) ticketsPerAddress;
    }
    
    HourglassInterface constant p3dContract = HourglassInterface(0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe);
    address constant sacMasternode = address(0x4fac33dAbFd83d160717dFee4175d9cAaA249CA5);
    address constant dev = address(0xF0EA6CE7d210Ee58e83a463Af13989B5c2DbE108);
    
    uint256 constant public PRICE_PER_TICKET = 0.01 ether;
    uint256 constant public ROUND_LENGTH = 24 hours;
    
    mapping(uint256 => Round) public rounds;
    mapping(address => uint256) private vault;
    
    uint256 public currentRoundNumber;
    
    event TicketsPurchased(address indexed player, uint256 indexed amount);
    event LotteryWinner(address indexed winner, uint256 indexed winnings, uint256 indexed ticket);
    event WithdrawVault(address indexed player, uint256 indexed amaount);
    event Validator(address indexed validator, uint256 indexed reward);
    
    modifier isValidPurchase(uint256 _howMany)
    {
        require(_howMany > 0);
        require(msg.value == _howMany.mul(PRICE_PER_TICKET));
        _;
    }
    
    modifier canPayFromVault(uint256 _howMany)
    {
        require(_howMany > 0);
        require(vault[msg.sender] >= _howMany.mul(PRICE_PER_TICKET));
        _;
    }
    
    modifier positiveVaultBalance()
    {
        require(vault[msg.sender] > 0);
        _;
    }
    
    constructor()
        public
    {
        currentRoundNumber = 0;
        rounds[currentRoundNumber] = Round(0, 0, 0, now);
    }
    
    function() external payable {}
       
    function isRoundOver()
        public
        view
        returns(bool)
    {
        return now >= rounds[currentRoundNumber].startTime.add(ROUND_LENGTH);
    }
    
    function potentialWinner()
        external
        view
        returns(address)
    {
        if(isRoundOver() &&
        rounds[currentRoundNumber].blockNumber != 0 &&
        block.number - 256 <= rounds[currentRoundNumber].blockNumber &&
        rounds[currentRoundNumber].blockNumber != block.number) {
            uint256 potentialwinningTicket = uint256(blockhash(rounds[currentRoundNumber].blockNumber)) % rounds[currentRoundNumber].ticketsSold;
            return rounds[currentRoundNumber].tickets[potentialwinningTicket];
        }
        
        return address(0);
    }
    
    function blocksUntilNewPotentialWinner()
        external
        view
        returns (uint256)
    {
        if(isRoundOver() &&
        rounds[currentRoundNumber].blockNumber != 0 &&
        block.number - 256 <= rounds[currentRoundNumber].blockNumber &&
        rounds[currentRoundNumber].blockNumber != block.number) {
           return 256 - (block.number - rounds[currentRoundNumber].blockNumber);
        }
        
        return 0;
    }
    
    function getTicketOwner(uint256 _number)
        external
        view
        returns(address)
    {
        return rounds[currentRoundNumber].tickets[_number];
    }
    
     function ticketsPurchased()
        external
        view
        returns(uint256)
    {
        return rounds[currentRoundNumber].ticketsSold;
    }
    
    function timeLeft()
        external
        view
        returns(uint256)
    {
        if(isRoundOver()) {
            return 0;
        }
        
        return ROUND_LENGTH.sub(now.sub(rounds[currentRoundNumber].startTime));
    }
    
    function jackpotSize()
        external
        view
        returns(uint256)
    {
        return rounds[currentRoundNumber].pot.add(p3dContract.myDividends(true)).mul(97) / 100;
    }
    
    function validatorReward()
        external
        view
        returns(uint256)
    {
        return rounds[currentRoundNumber].pot.add(p3dContract.myDividends(true)) / 100;
    }
    
    function myVault()
        external
        view
        returns(uint256)
    {
        return vault[msg.sender];
    }
    
    function myTickets()
        external
        view
        returns(uint256)
    {
        return rounds[currentRoundNumber].ticketsPerAddress[msg.sender];
    }
    
    function purchaseTicket(uint256 _howMany)
        external
        payable
        isValidPurchase(_howMany)
    {
        if(!isRoundOver() || onRoundEnd()) {
            acceptPurchase(_howMany, msg.value);
        } else {
            vault[msg.sender] = vault[msg.sender].add(msg.value);
        }
    }
    
    function purchaseFromVault(uint256 _howMany)
        external
        canPayFromVault(_howMany)
    {
        if(!isRoundOver() || onRoundEnd()) {
            uint256 value = _howMany.mul(PRICE_PER_TICKET);
            vault[msg.sender] -= value;
            acceptPurchase(_howMany, value);
        }
    }
    
    function validate()
        external
    {
        require(isRoundOver());
        
        onRoundEnd();
    }
    
    function withdrawFromVault()
        external
        positiveVaultBalance
    {
        uint256 amount = vault[msg.sender];
        vault[msg.sender] = 0;
        
        emit WithdrawVault(msg.sender, amount);
        
        msg.sender.transfer(amount);
    }
    
    function onRoundEnd()
        private
        returns(bool newRound)
    {
        //no tickets sold => create new round
        if(rounds[currentRoundNumber].ticketsSold == 0) {
            currentRoundNumber++;
            rounds[currentRoundNumber] = Round(0, 0, 0, now);
            return true;
        }
        
        //blocknumber has not been chosen or is too old => set new one
        if(rounds[currentRoundNumber].blockNumber == 0 || block.number - 256 > rounds[currentRoundNumber].blockNumber) {
            rounds[currentRoundNumber].blockNumber = block.number;
            return false;
        }
        
        //can't determine hash of current block
        if(block.number == rounds[currentRoundNumber].blockNumber) {return false;}
        
        //determine winner
        uint256 winningTicket = uint256(blockhash(rounds[currentRoundNumber].blockNumber)) % rounds[currentRoundNumber].ticketsSold;
        address winner = rounds[currentRoundNumber].tickets[winningTicket];
        
        uint256 totalWinnings = rounds[currentRoundNumber].pot;
        
        uint256 dividends = p3dContract.myDividends(true);
        if(dividends > 0) {
            p3dContract.withdraw();
            totalWinnings = totalWinnings.add(dividends);
        }
        
        //winner reward
        uint256 winnings = totalWinnings.mul(97) / 100;
        vault[winner] = vault[winner].add(winnings);
        emit LotteryWinner(winner, winnings, winningTicket);
        
        //validator reward
        vault[msg.sender] = vault[msg.sender].add(totalWinnings / 100);
        emit Validator(msg.sender, totalWinnings / 100);
        
        //dev fee
        vault[dev] = vault[dev].add(totalWinnings.mul(2) / 100);
        
        currentRoundNumber++;
        rounds[currentRoundNumber] = Round(0, 0, 0, now);
        return true;
    }
    
    function acceptPurchase(uint256 _howMany, uint256 value)
        private
    {
        uint256 ticketsSold = rounds[currentRoundNumber].ticketsSold;
        uint256 boundary = _howMany.add(ticketsSold);
        
        for(uint256 i = ticketsSold; i < boundary; i++) {
            rounds[currentRoundNumber].tickets[i] = msg.sender;
        }
        
        rounds[currentRoundNumber].ticketsSold = boundary;
        rounds[currentRoundNumber].pot = rounds[currentRoundNumber].pot.add(value.mul(60) / 100);
        rounds[currentRoundNumber].ticketsPerAddress[msg.sender] = rounds[currentRoundNumber].ticketsPerAddress[msg.sender].add(_howMany);
        
        emit TicketsPurchased(msg.sender, _howMany);
        
        p3dContract.buy.value(value.mul(40) / 100)(sacMasternode);
    }
}

interface HourglassInterface {
    function buy(address _playerAddress) payable external returns(uint256);
    function withdraw() external;
    function myDividends(bool _includeReferralBonus) external view returns(uint256);
}

library SafeMath {

  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b);

    return c;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a);
    uint256 c = a - b;

    return c;
  }

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

    return c;
  }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"myTickets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFromVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"timeLeft","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isRoundOver","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"potentialWinner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"jackpotSize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"validate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"PRICE_PER_TICKET","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"validatorReward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"rounds","outputs":[{"name":"pot","type":"uint256"},{"name":"ticketsSold","type":"uint256"},{"name":"blockNumber","type":"uint256"},{"name":"startTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ticketsPurchased","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentRoundNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ROUND_LENGTH","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"myVault","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_number","type":"uint256"}],"name":"getTicketOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_howMany","type":"uint256"}],"name":"purchaseTicket","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"blocksUntilNewPotentialWinner","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_howMany","type":"uint256"}],"name":"purchaseFromVault","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":"amount","type":"uint256"}],"name":"TicketsPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"winner","type":"address"},{"indexed":true,"name":"winnings","type":"uint256"},{"indexed":true,"name":"ticket","type":"uint256"}],"name":"LotteryWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"player","type":"address"},{"indexed":true,"name":"amaount","type":"uint256"}],"name":"WithdrawVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"validator","type":"address"},{"indexed":true,"name":"reward","type":"uint256"}],"name":"Validator","type":"event"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b506000600281905560408051608081018252828152602080820184815292820184815242606084019081528580529490915290517fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb55590517fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb655517fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb755517fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb855610fa2806100df6000396000f3006080604052600436106100e15763ffffffff60e060020a600035041662ea873781146100e3578063091dffca1461010a5780631300a6d11461011f578063305876a7146101345780635049b2381461015d57806357246d231461018e5780636901f668146101a35780636de652b7146101b857806375b94133146101cd5780638c65c81f146101e257806390a7ba5b146102205780639c4780d8146102355780639e817c031461024a5780639f5f05201461025f578063ad09340914610274578063b948348c1461028c578063f86c8ed314610297578063fe2545dc146102ac575b005b3480156100ef57600080fd5b506100f86102c4565b60408051918252519081900360200190f35b34801561011657600080fd5b506100e16102e6565b34801561012b57600080fd5b506100f8610375565b34801561014057600080fd5b506101496103cb565b604080519115158252519081900360200190f35b34801561016957600080fd5b506101726103fb565b60408051600160a060020a039092168252519081900360200190f35b34801561019a57600080fd5b506100f86104cc565b3480156101af57600080fd5b506100e161059f565b3480156101c457600080fd5b506100f86105bd565b3480156101d957600080fd5b506100f86105c8565b3480156101ee57600080fd5b506101fa60043561063f565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561022c57600080fd5b506100f8610666565b34801561024157600080fd5b506100f861067e565b34801561025657600080fd5b506100f8610684565b34801561026b57600080fd5b506100f861068b565b34801561028057600080fd5b5061017260043561069e565b6100e16004356106c8565b3480156102a357600080fd5b506100f8610757565b3480156102b857600080fd5b506100e16004356107ec565b6002546000908152602081815260408083203384526005019091529020545b90565b33600090815260016020526040812054811061030157600080fd5b503360008181526001602052604080822080549083905590519092839290917f781b06ede92edf4c49c9ae27f17beea169c6638a088cc245c6ebfe1011a770cf9190a3604051339082156108fc029083906000818181858888f19350505050158015610371573d6000803e3d6000fd5b5050565b600061037f6103cb565b1561038c575060006102e3565b6002546000908152602081905260409020600301546103c6906103b690429063ffffffff61088716565b620151809063ffffffff61088716565b905090565b6002546000908152602081905260408120600301546103f3906201518063ffffffff6108a516565b421015905090565b6000806104066103cb565b80156104245750600280546000908152602081905260409020015415155b80156104475750600280546000908152602081905260409020015460ff19430111155b8015610466575060028054600090815260208190526040902001544314155b156104c35760028054600090815260208190526040902060018101549101544081151561048f57fe5b60025460009081526020818152604080832094909306808352600490940190522054600160a060020a0316925090506104c8565b600091505b5090565b60006064610590606161058473b3775fb83f7d12a36e0475abdd1fca35c091efbe600160a060020a031663688abbf760016040518263ffffffff1660e060020a0281526004018082151515158152602001915050602060405180830381600087803b15801561053a57600080fd5b505af115801561054e573d6000803e3d6000fd5b505050506040513d602081101561056457600080fd5b50516002546000908152602081905260409020549063ffffffff6108a516565b9063ffffffff6108be16565b81151561059957fe5b04905090565b6105a76103cb565b15156105b257600080fd5b6105ba6108ec565b50565b662386f26fc1000081565b604080517f688abbf70000000000000000000000000000000000000000000000000000000081526001600482015290516000916064916105909173b3775fb83f7d12a36e0475abdd1fca35c091efbe9163688abbf79160248082019260209290919082900301818987803b15801561053a57600080fd5b60006020819052908152604090208054600182015460028301546003909301549192909184565b60025460009081526020819052604090206001015490565b60025481565b6201518081565b3360009081526001602052604090205490565b600254600090815260208181526040808320938352600490930190522054600160a060020a031690565b80600081116106d657600080fd5b6106ed81662386f26fc1000063ffffffff6108be16565b34146106f857600080fd5b6107006103cb565b158061070f575061070f6108ec565b156107235761071e8234610d59565b610371565b33600090815260016020526040902054610743903463ffffffff6108a516565b336000908152600160205260409020555050565b60006107616103cb565b801561077f5750600280546000908152602081905260409020015415155b80156107a25750600280546000908152602081905260409020015460ff19430111155b80156107c1575060028054600090815260208190526040902001544314155b156107e6575060028054600090815260208190526040902001544303610100036102e3565b50600090565b6000818181116107fb57600080fd5b61081281662386f26fc1000063ffffffff6108be16565b33600090815260016020526040902054101561082d57600080fd5b6108356103cb565b158061084457506108446108ec565b156108825761086083662386f26fc1000063ffffffff6108be16565b3360009081526001602052604090208054829003905591506108828383610d59565b505050565b6000808383111561089757600080fd5b5050808203805b5092915050565b6000828201838110156108b757600080fd5b9392505050565b6000808315156108d1576000915061089e565b508282028284828115156108e157fe5b04146108b757600080fd5b600080600080600080600080600254815260200190815260200160002060010154600014156109755760028054600190810180835560408051608081018252600080825260208083018281528385018381524260608601908152968452918390529390912091518255915181850155905193810193909355516003909201919091559550610d51565b600280546000908152602081905260409020015415806109ab5750600280546000908152602081905260409020015460ff194301115b156109d057600280546000908152602081905260408120439201919091559550610d51565b60028054600090815260208190526040902001544314156109f45760009550610d51565b600280546000908152602081905260409020600181015491015440811515610a1857fe5b600254600081815260208181526040808320959094068083526004808701835285842054948452838352955485517f688abbf70000000000000000000000000000000000000000000000000000000081526001978101979097529451909a50600160a060020a03909316985092965073b3775fb83f7d12a36e0475abdd1fca35c091efbe9363688abbf793602480830194919391928390030190829087803b158015610ac357600080fd5b505af1158015610ad7573d6000803e3d6000fd5b505050506040513d6020811015610aed57600080fd5b505191506000821115610b7a5773b3775fb83f7d12a36e0475abdd1fca35c091efbe600160a060020a0316633ccfd60b6040518163ffffffff1660e060020a028152600401600060405180830381600087803b158015610b4c57600080fd5b505af1158015610b60573d6000803e3d6000fd5b50505050610b7782846108a590919063ffffffff16565b92505b6064610b8d84606163ffffffff6108be16565b811515610b9657fe5b600160a060020a0386166000908152600160205260409020549190049150610bc4908263ffffffff6108a516565b600160a060020a03851660008181526001602052604080822093909355915187928492917fff8ab71428121b903312f0811ef90ea93038df4601bb6c494a2f185b39c3eb3d9190a433600090815260016020526040902054610c2990606485046108a5565b3360008181526001602052604080822093909355915160648604927fbb205d8c6f31700f5a63510747931dab00a04fc866a0aa206da4bd1e6bd1580291a3610cd36064610c7d85600263ffffffff6108be16565b811515610c8657fe5b73f0ea6ce7d210ee58e83a463af13989b5c2dbe10860005260016020527f5eb8dbda94f21420a2724b33a34a9cf6a622e79d32940abc635fa4df803bb2585491900463ffffffff6108a516565b7f5eb8dbda94f21420a2724b33a34a9cf6a622e79d32940abc635fa4df803bb25855600280546001908101808355604080516080810182526000808252602082810182815283850183815242606086019081529684529183905293909120915182559151818501559051938101939093555160039092019190915595505b505050505090565b6002546000908152602081905260408120600101549080610d80858463ffffffff6108a516565b91508290505b81811015610dd0576002546000908152602081815260408083208484526004019091529020805473ffffffffffffffffffffffffffffffffffffffff191633179055600101610d86565b6002546000908152602081905260409020600101829055610e266064610dfd86603c63ffffffff6108be16565b811515610e0657fe5b60025460009081526020819052604090205491900463ffffffff6108a516565b6002805460009081526020818152604080832094909455915481528281203382526005019091522054610e5f908663ffffffff6108a516565b6002546000908152602081815260408083203380855260059091019092528083209390935591518792917fe11731cb4f1eb3ec3dd09bdc96809bb07365f4c881cda3192b397a4bc0b6da4091a373b3775fb83f7d12a36e0475abdd1fca35c091efbe63f088d5476064610ed987602863ffffffff6108be16565b811515610ee257fe5b04734fac33dabfd83d160717dfee4175d9caaa249ca56040518363ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a031681526020019150506020604051808303818588803b158015610f4257600080fd5b505af1158015610f56573d6000803e3d6000fd5b50505050506040513d6020811015610f6d57600080fd5b505050505050505600a165627a7a7230582064439cba06fda756fb68520fabd9c5440b76b6f73cc4e2c5d0fc04ad1c4fe9490029

   Swarm Source:
bzzr://64439cba06fda756fb68520fabd9c5440b76b6f73cc4e2c5d0fc04ad1c4fe949

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.