Contract 0xba3bB2eb6Ec54FC62BEF844F8bAD8044724d801B

Contract Overview

Balance:
1.84 Ether
Txn Hash
Method
Block
From
To
Value
0x2c7d65bb49875dc1334bc7b78597d9226e9497ba5d81cc14795452288088a9d9Bet123158552022-05-30 0:32:1281 days 22 hrs ago0xde3cfb2bdfd8cf83a3b34c1b3d942c00c384d12f IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.1 Ether0.00014286 6
0x896ce32977db771cfa596f679df6d66e918d3189403251bf8456d0a05f6cd36aBet123158522022-05-30 0:30:3881 days 23 hrs ago0xde3cfb2bdfd8cf83a3b34c1b3d942c00c384d12f IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.001 Ether0.00002381 1
0x762cd566443dada16c8e9ca83b0d7273b1c62a597f5cc474b38336f7c6279a5eAdd Ether107583252021-08-02 13:31:11382 days 10 hrs ago0xa5deba8e2b0883df24be605bb56ccf4599745314 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000042521.99999999
0x0ef5946bf8d6367404aa066086c6b2adb12a79967249ed3fabf5d8efd4c79cf8Transfer107128792021-07-26 18:29:01389 days 5 hrs ago0xd35db6f09267e10dfacd1684e4d01f2d0b399ee7 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b2 Ether0.00002311.1
0xddaae922a2f13f7f5318faf73288573ac37a41e6646293951cbbec41dd8cf914Spin Wheel105616422021-07-03 15:56:44412 days 7 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0 Ether0.000100372
0x65f8b7a2e7ec506b2dba19a45fd75deb45625cc9db9ec68ea77fcbd00ef81889Bet105615842021-07-03 15:44:29412 days 7 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132342
0xdf5f7e594b97c0a77b24a0e8d6b2946acf03eb848bfb67b4bdc3650fa5e2ae2fBet105615842021-07-03 15:44:29412 days 7 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132342
0xe99c271704044f687f957b57c0fd7a64a4ee603accb54d8943a8fd0fb6492e49Bet105615612021-07-03 15:35:17412 days 7 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000200742
0x2d5f96143af4d5eea1c1c78b3ba16f470428a390c54005e09ea130de814b0c8dSpin Wheel105439762021-07-01 0:32:57414 days 22 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0 Ether0.000197735
0xda37e7c697c64c7260e33bf922f5eb674c3153ee3234670f3a7967c0085114a3Bet105439752021-07-01 0:31:02414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.00050135
0x5f6893974306a60568d6bb4f24fd458997bde5098ac85030cb55a82fd5e2e7acCash Out105439342021-07-01 0:04:36414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0 Ether0.00005752
0x73b143d7204550545de2355ec12e9d05fdfe88946150c1289a9da62df0343e40Spin Wheel105439332021-07-01 0:04:10414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0 Ether0.000201592
0x71d439a0fc3b848baadebaa01e3efc453aec6310ec041bf3b369e5a1004d7cfcBet105439332021-07-01 0:04:10414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132122
0xa82cc5b351d426d649c26f79ae1f24be248022b82200a295d71fb36739f42966Bet105439332021-07-01 0:04:10414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132122
0x2f19527f03ae58e80b8f24831305ebefac1d164219c211164fa29c3c3342cd8cBet105439322021-07-01 0:02:55414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132122
0x7206b7cb348f0d6225493eca140bfcea8b4174203c6d0a6df26d8bf3ea8c2717Bet105439322021-07-01 0:02:55414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132122
0x992b15114356d7749ef78247c1f6f8d11847f390862c9d46245b3df1d8765fedBet105439322021-07-01 0:02:55414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132122
0xefddb5fa911b48529eaeeb019f099fb3caaf6f8495a0fa9d29eb0acaab59536eBet105439322021-07-01 0:02:55414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132122
0x3f520fa8fcd8ef11f9b4a5ea371cc2a7d87f719df0c78fdf957fd97695207feeBet105439322021-07-01 0:02:55414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000200522
0x65f84b3571915d6c6bc39e861363b64cb756d6e4f4d2f4290d452f787788e6b1Cash Out105439312021-07-01 0:01:21414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0 Ether0.00005752
0x05c538670a57a0a452c3fe3580d0b62b7bfc9a43262aa615696f38dae7f65fa5Spin Wheel105439302021-07-01 0:00:32414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0 Ether0.000142072
0x7508bf94517efba79f015d2f7ac3f59d55a4884542effafa1980864c0241cc69Bet105439292021-06-30 23:59:38414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132122
0xfaa99bf776bb6fb60eb847567c43935a47bd838f2df243dc2cdedeee3f45a0f9Bet105439292021-06-30 23:59:38414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000132122
0x3a2e4124f8c016a2fbcdddfc7b272cd01bf1abd280fc8155ed367df1f82f7f8bBet105439292021-06-30 23:59:38414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0.01 Ether0.000200522
0x652e948033a48d21d1a19c96c0c412150ed368ad971e611566042eca752888e8Spin Wheel105439282021-06-30 23:58:04414 days 23 hrs ago0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc8 IN  0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0 Ether0.000109352
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x5f6893974306a60568d6bb4f24fd458997bde5098ac85030cb55a82fd5e2e7ac105439342021-07-01 0:04:36414 days 23 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc80.14 Ether
0x65f84b3571915d6c6bc39e861363b64cb756d6e4f4d2f4290d452f787788e6b1105439312021-07-01 0:01:21414 days 23 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc80.14 Ether
0x05c538670a57a0a452c3fe3580d0b62b7bfc9a43262aa615696f38dae7f65fa5105439302021-07-01 0:00:32414 days 23 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.03 Ether
0x652e948033a48d21d1a19c96c0c412150ed368ad971e611566042eca752888e8105439282021-06-30 23:58:04414 days 23 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.02 Ether
0x17f360c1a6655276683c77123b9613d0a264bf8211241bc60d72ec7a458e542a105439272021-06-30 23:56:17414 days 23 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.02 Ether
0x87881e40e14835169b8b5c8b2c293e2aa2accbe30f5f6b4c6df3a36989e8f96e105439262021-06-30 23:56:01414 days 23 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x8b210dbfd9da72ba70d4f70c0c9f75d9df376fc80.02 Ether
0xb30ab98f243b626d61d117420e784a98a4f47ad90ab8c5f84e101a3278149d25105439242021-06-30 23:53:42414 days 23 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.01 Ether
0xbdbaddf1e8247642c6a1b9531ceac8b71f13a33330cf9d4d80034e0450895b09105439232021-06-30 23:51:53414 days 23 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.02 Ether
0x2d21c90ef4e9a05887070457d900df4ed349d3fda7769ea13f5fdd629547f8f6105438782021-06-30 23:17:41415 days 14 mins ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.03 Ether
0x9b3ae062d334a70c59010ea1093a2658deb9905afbf39771fbb4ab291d0a7030105438752021-06-30 23:15:55415 days 15 mins ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.04 Ether
0x5adb5345fd9f562b965e7319de7373b11167677eaa56814661a8c63c0909b74896697642021-02-15 20:11:05550 days 3 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11461.01 Ether
0xe3f62da5820415f173d575d5cd2ffc22607d402676a75cf8493dbc9c6791310596690772021-02-15 17:30:36550 days 6 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0xb848b7f2fd142005e5b4606c99842a60f6a844f80.02 Ether
0xf5c1fe3e7d8bb5d131f72efd53b56a13089338e00e6dc1a67f02aa89f5d05f3f96690712021-02-15 17:29:12550 days 6 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.06 Ether
0xc904bd455ba0697f922e84a197a462af69d7c433a5268339e52d9e51dde1228f96690542021-02-15 17:25:06550 days 6 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.02 Ether
0x473e359851266bd265ee782481e9e4fe2c579506d26eee99f661ce5facbffaa596690012021-02-15 17:12:26550 days 6 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11460.02 Ether
0x59f6ef3c605d80e6ffffb8261277fc5272329e46954164bff38891b771e6e7af96689292021-02-15 16:56:18550 days 6 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x17d9ed6a909513b81f14958ef9d16436e83a11461.38 Ether
0x281d81f5a1d9f04a7151ddbb38f9cb052a7041ff41fde170637a741d2b2edf7593991132021-01-04 22:13:27592 days 1 hr ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0xcfa18f67abe2a2e304be1b1e79bf42269dfe233c0.08 Ether
0x2e7923433f4bae0e9d1fe292bdcec763665cc1456064208d45ab91ac1210dc3693986932021-01-04 18:18:58592 days 5 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0xcfa18f67abe2a2e304be1b1e79bf42269dfe233c0.06 Ether
0xc6526291e4ef748347e943076123235eaa0a4f03662f346ab7e444916c134acd84449362020-08-06 12:16:16743 days 11 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x0dfcb464f1d15279f95d58beb864d764c145b3a30.02 Ether
0x094e84733a2a3b65f5181f52002d4bbe4ad4596cb814d1eeea4cad900ade323749713112019-02-07 10:07:501289 days 13 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0xf6fe01ce37dbc72656ff67a83609ab0b1a72cdbc0.03 Ether
0xd7f10964e81b94b5b67768a3b2e654d5a142ef14a0ef1b73d4cf9430c51ce3ac48386062019-01-16 15:33:191311 days 7 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x6c22824cc98baf320fa8e7aca07e1b60f01122f40.02 Ether
0x03dc560b822b5b624880c4d4b8e78450757338324e37afd069d1e9c6128acc6a48386002019-01-16 15:31:361311 days 8 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x6c22824cc98baf320fa8e7aca07e1b60f01122f40.04 Ether
0x4c76efb08170b7d60239619e8ad497d9e09bd88113e3300a89fbef2d1136f5a347995082019-01-10 15:08:081317 days 8 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x76484824ba7355fa3c402ef6775332e99526dcc60.04 Ether
0x47f7b929d7e511157c0d130728ba4f66aea2a434dcdd245256444b219a924eb245182092018-11-27 22:21:441361 days 1 hr ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x08d0c9a119626dab7d01330ca7e9789dc71e41580.02 Ether
0x93ff7571d461755852e484ea8407da8c6d616c60442fab8e6683a7a73dec571638787272018-08-21 3:12:091459 days 20 hrs ago 0xba3bb2eb6ec54fc62bef844f8bad8044724d801b0x456aea34e7558b2ad1dbb8a1f136d98fb8ef882b0.1 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Roulette

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-05-23
*/

pragma solidity ^0.4.22;

contract Roulette {
  
  uint betAmount;
  uint necessaryBalance;
  uint nextRoundTimestamp;
  address creator;
  uint256 maxAmountAllowedInTheBank;
  mapping (address => uint256) winnings;
  uint8[] payouts;
  uint8[] numberRange;
  
  /*
    BetTypes are as follow:
      0: color
      1: column
      2: dozen
      3: eighteen
      4: modulus
      5: number
      
    Depending on the BetType, number will be:
      color: 0 for black, 1 for red
      column: 0 for left, 1 for middle, 2 for right
      dozen: 0 for first, 1 for second, 2 for third
      eighteen: 0 for low, 1 for high
      modulus: 0 for even, 1 for odd
      number: number
  */
  
  struct Bet {
    address player;
    uint8 betType;
    uint8 number;
  }
  Bet[] public bets;
  
  constructor() public payable {
    creator = msg.sender;
    necessaryBalance = 0;
    nextRoundTimestamp = now;
    payouts = [2,3,3,2,2,36];
    numberRange = [1,2,2,1,1,36];
    betAmount = 10000000000000000; /* 0.01 ether */
    maxAmountAllowedInTheBank = 2000000000000000000; /* 2 ether */
  }

  event RandomNumber(uint256 number);
  
  function getStatus() public view returns(uint, uint, uint, uint, uint) {
    return (
      bets.length,             // number of active bets
      bets.length * betAmount, // value of active bets
      nextRoundTimestamp,      // when can we play again
      address(this).balance,   // roulette balance
      winnings[msg.sender]     // winnings of player
    ); 
  }
    
  function addEther() payable public {}

  function bet(uint8 number, uint8 betType) payable public {
    /* 
       A bet is valid when:
       1 - the value of the bet is correct (=betAmount)
       2 - betType is known (between 0 and 5)
       3 - the option betted is valid (don't bet on 37!)
       4 - the bank has sufficient funds to pay the bet
    */
    require(msg.value == betAmount);                               // 1
    require(betType >= 0 && betType <= 5);                         // 2
    require(number >= 0 && number <= numberRange[betType]);        // 3
    uint payoutForThisBet = payouts[betType] * msg.value;
    uint provisionalBalance = necessaryBalance + payoutForThisBet;
    require(provisionalBalance < address(this).balance);           // 4
    /* we are good to go */
    necessaryBalance += payoutForThisBet;
    bets.push(Bet({
      betType: betType,
      player: msg.sender,
      number: number
    }));
  }

  function spinWheel() public {
    /* are there any bets? */
    require(bets.length > 0);
    /* are we allowed to spin the wheel? */
    require(now > nextRoundTimestamp);
    /* next time we are allowed to spin the wheel again */
    nextRoundTimestamp = now;
    /* calculate 'random' number */
    uint diff = block.difficulty;
    bytes32 hash = blockhash(block.number-1);
    Bet memory lb = bets[bets.length-1];
    uint number = uint(keccak256(abi.encodePacked(now, diff, hash, lb.betType, lb.player, lb.number))) % 37;
    /* check every bet for this number */
    for (uint i = 0; i < bets.length; i++) {
      bool won = false;
      Bet memory b = bets[i];
      if (number == 0) {
        won = (b.betType == 5 && b.number == 0);                   /* bet on 0 */
      } else {
        if (b.betType == 5) { 
          won = (b.number == number);                              /* bet on number */
        } else if (b.betType == 4) {
          if (b.number == 0) won = (number % 2 == 0);              /* bet on even */
          if (b.number == 1) won = (number % 2 == 1);              /* bet on odd */
        } else if (b.betType == 3) {            
          if (b.number == 0) won = (number <= 18);                 /* bet on low 18s */
          if (b.number == 1) won = (number >= 19);                 /* bet on high 18s */
        } else if (b.betType == 2) {                               
          if (b.number == 0) won = (number <= 12);                 /* bet on 1st dozen */
          if (b.number == 1) won = (number > 12 && number <= 24);  /* bet on 2nd dozen */
          if (b.number == 2) won = (number > 24);                  /* bet on 3rd dozen */
        } else if (b.betType == 1) {               
          if (b.number == 0) won = (number % 3 == 1);              /* bet on left column */
          if (b.number == 1) won = (number % 3 == 2);              /* bet on middle column */
          if (b.number == 2) won = (number % 3 == 0);              /* bet on right column */
        } else if (b.betType == 0) {
          if (b.number == 0) {                                     /* bet on black */
            if (number <= 10 || (number >= 20 && number <= 28)) {
              won = (number % 2 == 0);
            } else {
              won = (number % 2 == 1);
            }
          } else {                                                 /* bet on red */
            if (number <= 10 || (number >= 20 && number <= 28)) {
              won = (number % 2 == 1);
            } else {
              won = (number % 2 == 0);
            }
          }
        }
      }
      /* if winning bet, add to player winnings balance */
      if (won) {
        winnings[b.player] += betAmount * payouts[b.betType];
      }
    }
    /* delete all bets */
    bets.length = 0;
    /* reset necessaryBalance */
    necessaryBalance = 0;
    /* check if to much money in the bank */
    if (address(this).balance > maxAmountAllowedInTheBank) takeProfits();
    /* returns 'random' number to UI */
    emit RandomNumber(number);
  }
  
  function cashOut() public {
    address player = msg.sender;
    uint256 amount = winnings[player];
    require(amount > 0);
    require(amount <= address(this).balance);
    winnings[player] = 0;
    player.transfer(amount);
  }
  
  function takeProfits() internal {
    uint amount = address(this).balance - maxAmountAllowedInTheBank;
    if (amount > 0) creator.transfer(amount);
  }
  
  function creatorKill() public {
    require(msg.sender == creator);
    selfdestruct(creator);
  }
 
}

Contract ABI

[{"constant":false,"inputs":[],"name":"spinWheel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bets","outputs":[{"name":"player","type":"address"},{"name":"betType","type":"uint8"},{"name":"number","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getStatus","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"cashOut","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"addEther","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"creatorKill","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"number","type":"uint8"},{"name":"betType","type":"uint8"}],"name":"bet","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":true,"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"number","type":"uint256"}],"name":"RandomNumber","type":"event"}]

608060405233600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006001819055504260028190555060c060405190810160405280600260ff168152602001600360ff168152602001600360ff168152602001600260ff168152602001600260ff168152602001602460ff1681525060069060066100aa929190610124565b5060c060405190810160405280600160ff168152602001600260ff168152602001600260ff168152602001600160ff168152602001600160ff168152602001602460ff168152506007906006610101929190610124565b50662386f26fc10000600081905550671bc16d674ec800006004819055506101fb565b82805482825590600052602060002090601f016020900481019282156101ba5791602002820160005b8382111561018b57835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030261014d565b80156101b85782816101000a81549060ff021916905560010160208160000104928301926001030261018b565b505b5090506101c791906101cb565b5090565b6101f891905b808211156101f457600081816101000a81549060ff0219169055506001016101d1565b5090565b90565b610eef8061020a6000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806315ecef921461008857806322af00fa1461009f5780634e69d56014610126578063793cd71e1461016d5780638894dd2b146101845780638c0e554f1461018e578063d773f46e146101a5575b600080fd5b34801561009457600080fd5b5061009d6101d5565b005b3480156100ab57600080fd5b506100ca600480360381019080803590602001909291905050506108c8565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018360ff1660ff1681526020018260ff1660ff168152602001935050505060405180910390f35b34801561013257600080fd5b5061013b610937565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b34801561017957600080fd5b506101826109bb565b005b61018c610ac8565b005b34801561019a57600080fd5b506101a3610aca565b005b6101d3600480360381019080803560ff169060200190929190803560ff169060200190929190505050610b61565b005b6000806101e0610deb565b60008060006101ed610deb565b600060088054905011151561020157600080fd5b6002544211151561021157600080fd5b4260028190555044965060014303409550600860016008805490500381548110151561023957fe5b90600052602060002001606060405190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900460ff1660ff1660ff1681526020016000820160159054906101000a900460ff1660ff1660ff168152505094506025428888886020015189600001518a604001516040516020018087815260200186815260200185600019166000191681526020018460ff1660ff167f01000000000000000000000000000000000000000000000000000000000000000281526001018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018260ff1660ff167f010000000000000000000000000000000000000000000000000000000000000002815260010196505050505050506040516020818303038152906040526040518082805190602001908083835b6020831015156103ff57805182526020820191506020810190506020830392506103da565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206001900481151561043957fe5b069350600092505b600880549050831015610846576000915060088381548110151561046157fe5b90600052602060002001606060405190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900460ff1660ff1660ff1681526020016000820160159054906101000a900460ff1660ff1660ff168152505090506000841415610537576005816020015160ff1614801561053057506000816040015160ff16145b91506107a5565b6005816020015160ff1614156105585783816040015160ff161491506107a4565b6004816020015160ff1614156105b3576000816040015160ff16141561058b57600060028581151561058657fe5b061491505b6001816040015160ff1614156105ae5760016002858115156105a957fe5b061491505b6107a3565b6003816020015160ff1614156105f8576000816040015160ff1614156105db57601284111591505b6001816040015160ff1614156105f357601384101591505b6107a2565b6002816020015160ff161415610660576000816040015160ff16141561062057600c84111591505b6001816040015160ff16141561064457600c84118015610641575060188411155b91505b6002816040015160ff16141561065b576018841191505b6107a1565b6001816020015160ff1614156106de576000816040015160ff16141561069357600160038581151561068e57fe5b061491505b6001816040015160ff1614156106b65760026003858115156106b157fe5b061491505b6002816040015160ff1614156106d95760006003858115156106d457fe5b061491505b6107a0565b6000816020015160ff16141561079f576000816040015160ff16141561075057600a8411158061071c57506014841015801561071b5750601c8411155b5b1561073857600060028581151561072f57fe5b0614915061074b565b600160028581151561074657fe5b061491505b61079e565b600a8411158061076e57506014841015801561076d5750601c8411155b5b1561078a57600160028581151561078157fe5b0614915061079d565b600060028581151561079857fe5b061491505b5b5b5b5b5b5b5b5b8115610839576006816020015160ff168154811015156107c157fe5b90600052602060002090602091828204019190069054906101000a900460ff1660ff166000540260056000836000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8280600101935050610441565b60006008816108559190610e29565b5060006001819055506004543073ffffffffffffffffffffffffffffffffffffffff1631111561088857610887610d55565b5b7fec6cdc8e735e4069f6e89062582f3e5532a8e71373e7ef2962fa916cf2af21f2846040518082815260200191505060405180910390a150505050505050565b6008818154811015156108d757fe5b906000526020600020016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16908060000160159054906101000a900460ff16905083565b6000806000806000600880549050600054600880549050026002543073ffffffffffffffffffffffffffffffffffffffff1631600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054945094509450945094509091929394565b600080339150600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081111515610a1257600080fd5b3073ffffffffffffffffffffffffffffffffffffffff16318111151515610a3857600080fd5b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610ac3573d6000803e3d6000fd5b505050565b565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b2657600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b60008060005434141515610b7457600080fd5b60008360ff1610158015610b8c575060058360ff1611155b1515610b9757600080fd5b60008460ff1610158015610be2575060078360ff16815481101515610bb857fe5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff1611155b1515610bed57600080fd5b3460068460ff16815481101515610c0057fe5b90600052602060002090602091828204019190069054906101000a900460ff1660ff16029150816001540190503073ffffffffffffffffffffffffffffffffffffffff163181101515610c5257600080fd5b8160016000828254019250508190555060086060604051908101604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018560ff1681526020018660ff1681525090806001815401808255809150509060018203906000526020600020016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff021916908360ff16021790555060408201518160000160156101000a81548160ff021916908360ff16021790555050505050505050565b60006004543073ffffffffffffffffffffffffffffffffffffffff16310390506000811115610de857600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610de6573d6000803e3d6000fd5b505b50565b606060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600060ff168152602001600060ff1681525090565b815481835581811115610e5057818360005260206000209182019101610e4f9190610e55565b5b505050565b610ec091905b80821115610ebc57600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a81549060ff02191690556000820160156101000a81549060ff021916905550600101610e5b565b5090565b905600a165627a7a72305820d4817ee5a5c00a6ccea2433620b943e28396555aca2d8a6afb33d35234a8530a0029

Swarm Source

bzzr://d4817ee5a5c00a6ccea2433620b943e28396555aca2d8a6afb33d35234a8530a
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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.