Latest 4 txns

TxHash Age From To Value [TxFee]
0x5368c4b6e6c4615d074720f12fe3066d7cb9caec37df1bc76ac94f08676dc6697 days 15 hrs ago0x4688666adefa124286a09d1a5a8d9972ad0f8b56  IN   0x5301ba25b5e1ffff81e36534e4f365f2e755832c1 Ether0.00578765
0x01037476b7cd36de5714394c1960a63bc950b2c6d94080d9317c405ba69cc3367 days 15 hrs ago0x4688666adefa124286a09d1a5a8d9972ad0f8b56  IN   0x5301ba25b5e1ffff81e36534e4f365f2e755832c1 Ether0.00042092
0xf09d87b41ac30d1e8b2d954716c9e9df493957daa209d425b8ce95b1769d1c007 days 15 hrs ago0x9482bd3e22dbb1af625ceea05c1cf27ff2d1ae97  IN   0x5301ba25b5e1ffff81e36534e4f365f2e755832c5 Ether0.00042092
0x8f7f3ddde0156db8808195401944da0c78c49f4f66b7197b405cabb37c7db4c57 days 15 hrs ago0x9482bd3e22dbb1af625ceea05c1cf27ff2d1ae97  IN    Contract Creation0 Ether0.03330445
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Source Code Verified (Exact Match)
Contract Name: TomoRoll
Compiler Text: v0.4.25+commit.59dbf8f1
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.25;

contract TomoRoll{
    address public admin;
    address[] public players;
    uint8[] public luckynumbers;
    uint256 sizebet;
    uint256 win;
    uint256 _seed = now;
    event BetResult(
    address from,
    uint256 betvalue,
    uint256 prediction,
    uint8 luckynumber,
    bool win,
    uint256 wonamount
    );
    
    event LuckyDrop(
    address from,
    uint256 betvalue,
    uint256 prediction,
    uint8 luckynumber,
    string congratulation
    );
    
    event Shake(
    address from,
    bytes32 make_chaos
    );
    
    constructor() public{
        admin = 0x1E1C1Fa8Ee39151ba082daE2F24E906882F4681C;
    }
    
    function random() private view returns (uint8) {
        return uint8(uint256(keccak256(block.timestamp, block.difficulty, _seed))%100); // random 0-99
    }

    function bet(uint8 under) public payable{
        require(msg.value >= .001 ether);
        require(msg.value*98/under < address(this).balance);
        require(under > 0 && under < 96);
        sizebet = msg.value;
        win = uint256 (sizebet*98/under);
        uint8 _random = random();
        luckynumbers.push(_random);
        
        if (_random < under) {
                msg.sender.transfer(win);
                emit BetResult(msg.sender, msg.value, under, _random, true, win);
        } else {
            emit BetResult(msg.sender, msg.value, under, _random, false, 0x0);
        }
    }
    

    modifier onlyAdmin() {
        // Ensure the participant awarding the ether is the admin
        require(msg.sender == admin);
        _;
    }
    
    function withdrawEth(address to, uint256 balance) onlyAdmin {
        if (balance == uint256(0x0)) {
            to.transfer(address(this).balance);
        } else {
        to.transfer(balance);
    }
  }

    function getLuckynumber() public view returns(uint8[]) {
        // Return list of luckynumbers
        return luckynumbers;
    }
    function shake(uint256 choose_a_number_to_chaos_the_algo) public {
        _seed = uint256(keccak256(choose_a_number_to_chaos_the_algo));
        emit Shake(msg.sender, "You changed the algo");
    }
    
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"getLuckynumber","outputs":[{"name":"","type":"uint8[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"balance","type":"uint256"}],"name":"withdrawEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"choose_a_number_to_chaos_the_algo","type":"uint256"}],"name":"shake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"luckynumbers","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"under","type":"uint8"}],"name":"bet","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"players","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"betvalue","type":"uint256"},{"indexed":false,"name":"prediction","type":"uint256"},{"indexed":false,"name":"luckynumber","type":"uint8"},{"indexed":false,"name":"win","type":"bool"},{"indexed":false,"name":"wonamount","type":"uint256"}],"name":"BetResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"betvalue","type":"uint256"},{"indexed":false,"name":"prediction","type":"uint256"},{"indexed":false,"name":"luckynumber","type":"uint8"},{"indexed":false,"name":"congratulation","type":"string"}],"name":"LuckyDrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"make_chaos","type":"bytes32"}],"name":"Shake","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60806040524260055534801561001457600080fd5b50731e1c1fa8ee39151ba082dae2f24e906882f4681c6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610853806100786000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063170e6d4c146100885780631b9a91a4146100f45780638c09bfdc14610141578063abe858141461016e578063d0821b0e146101b5578063f71d96cb146101d8578063f851a44014610245575b600080fd5b34801561009457600080fd5b5061009d61029c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156100e05780820151818401526020810190506100c5565b505050509050019250505060405180910390f35b34801561010057600080fd5b5061013f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061031a565b005b34801561014d57600080fd5b5061016c6004803603810190808035906020019092919050505061042d565b005b34801561017a57600080fd5b50610199600480360381019080803590602001909291905050506104db565b604051808260ff1660ff16815260200191505060405180910390f35b6101d6600480360381019080803560ff16906020019092919050505061050e565b005b3480156101e457600080fd5b5061020360048036038101908080359060200190929190505050610785565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025157600080fd5b5061025a6107c3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6060600280548060200260200160405190810160405280929190818152602001828054801561031057602002820191906000526020600020906000905b82829054906101000a900460ff1660ff16815260200190600101906020826000010492830192600103820291508084116102d95790505b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561037557600080fd5b60008114156103e1578173ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501580156103db573d6000803e3d6000fd5b50610429565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610427573d6000803e3d6000fd5b505b5050565b80604051808281526020019150506040518091039020600190046005819055507f5ed2b2992a2633c1456042707330a3da37186a6b6417caadb185a33303254e3a33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001807f596f75206368616e6765642074686520616c676f00000000000000000000000081525060200191505060405180910390a150565b6002818154811015156104ea57fe5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b600066038d7ea4c68000341015151561052657600080fd5b3073ffffffffffffffffffffffffffffffffffffffff16318260ff166062340281151561054f57fe5b0410151561055c57600080fd5b60008260ff16118015610572575060608260ff16105b151561057d57600080fd5b346003819055508160ff1660626003540281151561059757fe5b046004819055506105a66107e8565b9050600281908060018154018082558091505090600182039060005260206000209060209182820401919006909192909190916101000a81548160ff021916908360ff160217905550508160ff168160ff1610156106e7573373ffffffffffffffffffffffffffffffffffffffff166108fc6004549081150290604051600060405180830381858888f19350505050158015610646573d6000803e3d6000fd5b507f3a4ee11766391d434a57a1a8bd6fd5c545e6db8e7a13ebb165f4a3c63f0a6239333484846001600454604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018560ff1681526020018460ff1660ff16815260200183151515158152602001828152602001965050505050505060405180910390a1610781565b7f3a4ee11766391d434a57a1a8bd6fd5c545e6db8e7a13ebb165f4a3c63f0a623933348484600080604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018560ff1681526020018460ff1660ff16815260200183151515158152602001828152602001965050505050505060405180910390a15b5050565b60018181548110151561079457fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006064424460055460405180848152602001838152602001828152602001935050505060405180910390206001900481151561082157fe5b069050905600a165627a7a723058207693a68b9989f3435b36e5af88939f5e7f5ac790929ca949a2842c8dfb68f90d0029

   Swarm Source:
bzzr://7693a68b9989f3435b36e5af88939f5e7f5ac790929ca949a2842c8dfb68f90d

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward