Contract Overview
ETH Balance: 4.64385 Ether
ETH USD Value: $245.47 (@ $52.86/ETH)
No Of Transactions: 1794 txns + 553 internalTxns
  Latest 25 txns from a total Of 1794 transactions View All

TxHash Block Age From To Value [TxFee]
0xbc8cdeb030c9065906418b95ea922e891879d592658b7f266bc21c8aa40f1ed835656836 days 14 hrs ago0xae8153b27a5097b9e9f2bfb1250aa03dfc400552  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0xfff75fb428f55dadba2146d2c85d37365ef89ee3505217ecd27532ab0653e75135613447 days 8 hrs ago0x582ed2b8fd94492ad3d3236dc29f64d11cfba246  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.00076298
0x9d302b3df67db7e36d373ebea3afdb119aa44d7774c5b02918e70d7afc306d5d35591237 days 18 hrs ago0x4a6a35798fdac3e7ac45d9473d9a4295d5e4d61c  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.0001 Ether0.00338478
0x1284beff19b482edf0e7712a15ddfac509b6ab801633f597d7c974bf55353c2f35572388 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x114b93f9f3191e7d91d6a3c52b6db929d8f8143f41f3556d33b117ba517d941535539778 days 15 hrs ago0xae8153b27a5097b9e9f2bfb1250aa03dfc400552  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00273612
0xf685189a32de4490986e3c67f0858fd5d6cadac7c73eaca4af24b3810485fdf535520928 days 22 hrs ago0xc2edd876a564e0f24ae4a6b1d597be2c8491d154  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.00102512
0xc6e2c40f2a2fcef62389f05011e07ab3333e6f2e742e24c86d5691e61873202035520898 days 22 hrs ago0xc2edd876a564e0f24ae4a6b1d597be2c8491d154  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.0001 Ether0.00307708
0x737b575d20977cdac5d0072caea0fde061a00f3ac056048688347cf1d03c60bc35514989 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.0030758
0x151dce7d5c145873d22f19d34c34dd36da7a52bbd165d0c43d9c8538b4bdbfb435514959 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.0035279
0xe3cbd2b50ae23c0636199075ad040cd457ff2468a9577ae8b5ea0b8ebda7c3b135514939 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.0030758
0x330d8b1a7365c0ad03ca75e9697dc79f5900d79fa8e88291017d9c228daf735035514909 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.0030758
0xedcf296f64ba80b23dc9637f7c8205358638efa8f32999c57fd20dd44647704235514909 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x1a54220a12c74416753a0886138019d61b7b84c7fef193d287fd91608384474435514859 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00311899
0xa855ef0ad8076e7ff369b66d56fc788c9785cfe64dd6fa6d2201433ad08f109d35514839 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00321239
0xa68d8d12d9c56d863e7b796cebb184261cf140d648c9f311554ef193a241e5e635514809 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.00390577
0x5a7cda4325139baceb564c8ea8fdb3b61908d1287f99be256fda2c1c1ba3412735514769 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.0040144
0x9c698cb6c19b7e05f5808a131500e77eabbb462924fa08e0a2deb9a7945e721e35514749 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x6c2024e748dc8fae279d2bc8e5f38a2c4eef6dfa2b48548a77c88cf0a777c94b35514749 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x15013c22443135ae63a01804e7ad337ff64fcdcd46e6e21d1688c9e1db2e22ff35514749 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.00102084
0x50e1ed16cd5d7da9db24fa3e8085bf09ce848685609034181a098eb8a8da996e35514699 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.0036786
0xb961d0a8d15a41b59639428c92d1545b67b74ddc2d26c45e1d5e8c4ef1423af735514669 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x6789315150e5c8bec3c08150aea5729d31a3da39cdc89cbde562efdcb3b9769035514639 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0xe8c0d9e92cd767f76b708588cc3036779c1a74dd9ca1c9e0085e49f8bee052fc35514599 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.0036535
0x487bcb04d610a2fc73e458fea7a5d7026f92c6a84864f492d7bc464a085ee3a635514559 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x26b4f36aa7f98a4f94f98468d69cbf7a086f50c0bd966e2cc3bb821479d8297635514559 days 1 hr ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708

[Download: CSV Export ]    
 Internal Transactions as a result of Contract Execution
  Latest 25 Internal Txns from a total of 553 View All
ParentTxHash Block Age From To Value
0xf685189a32de4490986e3c67f0858fd5d6cadac7c73eaca4af24b3810485fdf535520928 days 22 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xc2edd876a564e0f24ae4a6b1d597be2c8491d1540.0002 Ether
0xa68d8d12d9c56d863e7b796cebb184261cf140d648c9f311554ef193a241e5e635514809 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.015 Ether
0x5a7cda4325139baceb564c8ea8fdb3b61908d1287f99be256fda2c1c1ba3412735514769 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x15013c22443135ae63a01804e7ad337ff64fcdcd46e6e21d1688c9e1db2e22ff35514749 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.02 Ether
0x50e1ed16cd5d7da9db24fa3e8085bf09ce848685609034181a098eb8a8da996e35514699 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0xe8c0d9e92cd767f76b708588cc3036779c1a74dd9ca1c9e0085e49f8bee052fc35514599 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.015 Ether
0x23d749bed8f4d4d0c54c92a6f6b9aa2261d8e4de383a03562ea8a5181d05968135514499 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x15ccc603e99c1064162c7c3fdd5a1f09e7f86102ff472e9f354d17b3fa4a687435514449 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.02 Ether
0xbdf555915003b299540474ca0fb05d50a5ac5865884aab495a3f4329661fb55835514389 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x7e706d43dfcfff6d5564bb1182f566e622fab2ef0e35a1f9d54f0c7fe8d6a73635514369 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0xded0f14433bb555fda85af51eecf67e2af4aad3ebfee04871f76d1a2a82ae4ed35514299 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0xde2df140a1dc03a8b4c9a61a27dd150fb6b396b75530e790b101a79471a70c6635514029 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.02 Ether
0x1e90ccdbaab36cd77fb4360715420c3543ccef12de0fb984b6bedce100203eea35513979 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0xfb3974c00a9bb6851c84dee0b758af6d5ed32589367d026f1f483dab233e7a4335513899 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.02 Ether
0x3b870a0df75b318dccd351cf8a96515bd8d9e46f49f69225d2f861cd603f72e135513879 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.02 Ether
0x8ba8cfde24bd90a8cc3c78890803d23f01e562f9668d6beb0e32d4c274604e1d35513809 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x41d9c4f30c83feb2ff8389ab85fa844665b90a66eac789160ac04b270cce97fa35513759 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x1bffe425b9b9ab1172cac457e8b58ac0fe41d6dd3d85ba35ac5f3ffc1946b10635513629 days 1 hr ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x7e03ef07c6d76245e120d1eb6e955351bcb0b24edda811eb465f858ad455b52735511709 days 2 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0xb698110ef893146a0d821312ae19197fcc32262327b04663bcc5da1376ef218a35511639 days 2 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x2f1df24732a596f970a645c831bdc09c67276b137351e45e62f3665b0cc2cc0d35511619 days 2 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0xf796fa94a7629ff80a48d2c684c5dd0ec6e4e7ba87af63774d8ec2f16439337535511259 days 2 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x36e57ce8a5c48b24b71e01e161c469b59e3f6d876ac27d88f58a24c4ae74c75335510659 days 2 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0x034278ed70f86e7348347ee3b5254eba0f25d33c23bd7bc7f888876d6bb4946e35510299 days 3 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether
0xaa9550df78524c1090b7e82a92d76341af3feee71b09bb6a0f28b76901b2038735510159 days 3 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670x62c6da252a301a252356d5549dc730de4697c6400.01 Ether

[Download: CSV Export ]    
Contract Source Code Verified
Contract Name: blackjack
Compiler Version: v0.4.10+commit.f0d539ae
Optimization Enabled: Yes
Online Solidity Editor:  Click To View



  Contract Source Code   Find Similiar Contracts
/**
 * Early prototype of the Edgeless Black Jack contract. 
 * Allows an user to initialize a round of black jack, withdraw the win in case he won or both on the same time,
 * while verifying the game data.
 * author: Julia Altenried
 **/
pragma solidity ^0.4.10;

contract owned {
  address public owner; 
  modifier onlyOwner {
      if (msg.sender != owner)
          throw;
      _;
  }
  function owned() { owner = msg.sender; }
  function changeOwner(address newOwner) onlyOwner{
    owner = newOwner;
  }
}

contract mortal is owned{
  function close() onlyOwner {
        selfdestruct(owner);
    }
}
contract blackjack is mortal {
  struct Game {
    /** the game id is used to reference the game **/
    uint id;
    /** the hash of the (partial) deck **/
    bytes32 deck;
    /** the hash of the casino seed used for randomness generation and deck-hashing**/
    bytes32 seed;
    /** the player address **/
    address player;
    /** the bet **/
    uint bet;
    /** the timestamp of the start of the game, game ends automatically after certain time interval passed **/
    uint start;
  }

  /** the value of the cards: Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K . Ace can be 1 or 11, of course. 
   *   the value of a card can be determined by looking up cardValues[cardId%13]**/
  uint8[13] cardValues = [11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10];

  /** use the game id to reference the games **/
  mapping(uint => Game) games;
  /** the minimum bet**/
  uint public minimumBet;
  /** the maximum bet **/
  uint public maximumBet;
  /** the address which signs the number of cards dealt **/
  address public signer;
  
  /** notify listeners that a new round of blackjack started **/
  event NewGame(uint indexed id, bytes32 deck, bytes32 srvSeed, bytes32 cSeed, address player, uint bet);
  /** notify listeners of the game outcome **/
  event Result(uint indexed id, address player, uint win);
  /** notify listeners that an error occurred**/
  event Error(uint errorCode);

  /** constructur. initialize the contract with a minimum bet and a signer address. **/
  function blackjack(uint minBet, uint maxBet, address signerAddress) payable{
    minimumBet = minBet;
    maximumBet = maxBet;
    signer = signerAddress;
  }

  /** 
   *   initializes a round of blackjack with an id, the hash of the (partial) deck and the hash of the server seed. 
   *   accepts the bet.
   *   throws an exception if the bet is too low or a game with the given id already exists.
   **/
  function initGame(uint id, bytes32 deck, bytes32 srvSeed, bytes32 cSeed) payable {
    //throw if bet is too low or too high
    if (msg.value < minimumBet || msg.value > maximumBet) throw;
    //throw if user could not be paiud out in case of suited blackjack
    if (msg.value * 3 > address(this).balance) throw;
    _initGame(id, deck, srvSeed, cSeed, msg.value);
  }

  /** 
   * first checks if deck and the player's number of cards are correct, then checks if the player won and if so, sends the win.
   **/
  function stand(uint gameId, uint8[] deck, bytes32 seed, uint8 numCards, uint8 v, bytes32 r, bytes32 s) {
    uint win = _stand(gameId,deck,seed,numCards,v,r,s, true);
  }
  
  /**
  *   first stands, then inits a new game with only one transaction
  **/
  function standAndRebet(uint oldGameId, uint8[] oldDeck, bytes32 oldSeed, uint8 numCards, uint8 v, bytes32 r, bytes32 s, uint newGameId, bytes32 newDeck, bytes32 newSrvSeed, bytes32 newCSeed){
    uint win = _stand(oldGameId,oldDeck,oldSeed,numCards,v,r,s, false);
    uint bet = games[oldGameId].bet;
    if(win >= bet){
      _initGame(newGameId, newDeck, newSrvSeed, newCSeed, bet);
      win-=bet;
    }
    if(win>0 && !msg.sender.send(win)){//pay the rest
      throw;
    }
  }
  
  /** 
   *   internal function to initialize a round of blackjack with an id, the hash of the (partial) deck, 
   *   the hash of the server seed and the bet. 
   **/
  function _initGame(uint id, bytes32 deck, bytes32 srvSeed, bytes32 cSeed, uint bet) internal{
    //throw if game with id already exists. later maybe throw only if game with id is still running
    if (games[id].player != 0x0) throw;
    games[id] = Game(id, deck, srvSeed, msg.sender, bet, now);
    NewGame(id, deck, srvSeed, cSeed, msg.sender, bet);
  }
  
  /**
  * first checks if deck and the player's number of cards are correct, then checks if the player won and if so, calculates the win.
  **/
  function _stand(uint gameId, uint8[] deck, bytes32 seed, uint8 numCards, uint8 v, bytes32 r, bytes32 s, bool payout) internal returns(uint win){
    Game game = games[gameId];
    uint start = game.start;
    game.start = 0; //make sure outcome isn't determined a second time while win payment is still pending -> prevent double payout
    if(msg.sender!=game.player){
      Error(1);
      return 0;
    }
    if(!checkDeck(gameId, deck, seed)){
      Error(2);
      return 0;
    }
    if(!checkNumCards(gameId, numCards, v, r, s)){
      Error(3);
      return 0;
    }
    if(start + 1 hours < now){
      Error(4);
      return 0;
    }
    
    win = determineOutcome(gameId, deck, numCards);
    if (payout && win > 0 && !msg.sender.send(win)){
      Error(5);
      game.start = start;
      return 0;
    }
    Result(gameId, msg.sender, win);
  }
  
  /**
  * check if deck and casino seed are correct.
  **/
  function checkDeck(uint gameId, uint8[] deck, bytes32 seed) constant returns (bool correct){
    if(sha3(seed) != games[gameId].seed) return false;
    if(sha3(convertToBytes(deck), seed) != games[gameId].deck) return false;
    return true;
  }
  
  function convertToBytes(uint8[] byteArray) returns (bytes b){
    b = new bytes(byteArray.length);
    for(uint8 i = 0; i < byteArray.length; i++)
      b[i] = byte(byteArray[i]);
  }
  
  /**
  * check if user and casino agree on the number of cards
  **/
  function checkNumCards(uint gameId, uint8 numCards, uint8 v, bytes32 r, bytes32 s) constant returns (bool correct){
    bytes32 msgHash = sha3(gameId,numCards);
    return ecrecover(msgHash, v, r, s) == signer;
  }

  /**
   * determines the outcome of a game and returns the win. 
   * in case of a loss, win is 0.
   **/
  function determineOutcome(uint gameId, uint8[] cards, uint8 numCards) constant returns(uint win) {
    uint8 playerValue = getPlayerValue(cards, numCards);
    //bust if value > 21
    if (playerValue > 21) return 0;

    var (dealerValue, dealerBJ) = getDealerValue(cards, numCards);

    //player wins
    if (playerValue == 21 && numCards == 2 && !dealerBJ){ //player blackjack but no dealer blackjack
      if(isSuited(cards[0], cards[2]))
        return games[gameId].bet * 3; //pay 2 to 1
      else
        return games[gameId].bet * 5 / 2; 
    }
    else if(playerValue == 21 && numCards == 5) //automatic win on 5-card 21
      return games[gameId].bet * 2;
    else if (playerValue > dealerValue || dealerValue > 21)
      return games[gameId].bet * 2;
    //tie
    else if (playerValue == dealerValue)
      return games[gameId].bet;
    //player loses
    else
      return 0;

  }

  /**
   *   calculates the value of a player's hand.
   *   cards: holds the (partial) deck.
   *   numCards: the number of cards the player holds
   **/
  function getPlayerValue(uint8[] cards, uint8 numCards) constant internal returns(uint8 playerValue) {
    //player receives first and third card and  all further cards after the 4. until he stands 
    //determine value of the player's hand
    uint8 numAces;
    uint8 card;
    for (uint8 i = 0; i < numCards + 2; i++) {
      if (i != 1 && i != 3) { //1 and 3 are dealer cards
        card = cards[i] %13;
        playerValue += cardValues[card];
        if (card == 0) numAces++;
      }

    }
    while (numAces > 0 && playerValue > 21) {
      playerValue -= 10;
      numAces--;
    }
  }


  /**
   *   calculates the value of a dealer's hand.
   *   cards: holds the (partial) deck.
   *   numCards: the number of cards the player holds
   **/
  function getDealerValue(uint8[] cards, uint8 numCards) constant internal returns(uint8 dealerValue, bool bj) {
    
    //dealer always receives second and forth card
    uint8 card  = cards[1] % 13;
    uint8 card2 = cards[3] % 13;
    dealerValue = cardValues[card] + cardValues[card2];
    uint8 numAces;
    if (card == 0) numAces++;
    if (card2 == 0) numAces++;
    if (dealerValue > 21) { //2 aces,count as 12
      dealerValue -= 10;
      numAces--;
    }
    else if(dealerValue==21){
      return (21, true);
    }
    //take cards until value reaches 17 or more. 
    uint8 i;
    while (dealerValue < 17) {
      card = cards[numCards + i + 2] % 13 ;
      dealerValue += cardValues[card];
      if (card == 0) numAces++;
      if (dealerValue > 21 && numAces > 0) {
        dealerValue -= 10;
        numAces--;
      }
      i++;
    }
  }
  
  /** determines if two cards have the same color **/
  function isSuited(uint8 card1, uint8 card2) internal returns(bool){
    return card1/13 == card2/13;
  }
  
  /** the fallback function can be used to send ether to increase the casino bankroll **/
  function() payable onlyOwner{
  }
  
  /** allows the owner to withdraw funds **/
  function withdraw(uint amount) onlyOwner{
    if(amount < address(this).balance)
      if(!owner.send(amount))
        Error(6);
  }
  
  /** allows the owner to change the signer address **/
  function setSigner(address signerAddress) onlyOwner{
    signer = signerAddress;
  }
  
  /** allows the owner to change the minimum bet **/
  function setMinimumBet(uint newMin) onlyOwner{
    minimumBet = newMin;
  }
  
  /** allows the owner to change the mximum **/
  function setMaximumBet(uint newMax) onlyOwner{
    minimumBet = newMax;
  }
}

  Contract ABI  
[{"constant":false,"inputs":[{"name":"gameId","type":"uint256"},{"name":"deck","type":"uint8[]"},{"name":"seed","type":"bytes32"},{"name":"numCards","type":"uint8"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"stand","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"deck","type":"bytes32"},{"name":"srvSeed","type":"bytes32"},{"name":"cSeed","type":"bytes32"}],"name":"initGame","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"newMax","type":"uint256"}],"name":"setMaximumBet","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"maximumBet","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"signer","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"byteArray","type":"uint8[]"}],"name":"convertToBytes","outputs":[{"name":"b","type":"bytes"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"oldGameId","type":"uint256"},{"name":"oldDeck","type":"uint8[]"},{"name":"oldSeed","type":"bytes32"},{"name":"numCards","type":"uint8"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"},{"name":"newGameId","type":"uint256"},{"name":"newDeck","type":"bytes32"},{"name":"newSrvSeed","type":"bytes32"},{"name":"newCSeed","type":"bytes32"}],"name":"standAndRebet","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"signerAddress","type":"address"}],"name":"setSigner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newMin","type":"uint256"}],"name":"setMinimumBet","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"gameId","type":"uint256"},{"name":"cards","type":"uint8[]"},{"name":"numCards","type":"uint8"}],"name":"determineOutcome","outputs":[{"name":"win","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"minimumBet","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"gameId","type":"uint256"},{"name":"numCards","type":"uint8"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"checkNumCards","outputs":[{"name":"correct","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"gameId","type":"uint256"},{"name":"deck","type":"uint8[]"},{"name":"seed","type":"bytes32"}],"name":"checkDeck","outputs":[{"name":"correct","type":"bool"}],"payable":false,"type":"function"},{"inputs":[{"name":"minBet","type":"uint256"},{"name":"maxBet","type":"uint256"},{"name":"signerAddress","type":"address"}],"payable":true,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"deck","type":"bytes32"},{"indexed":false,"name":"srvSeed","type":"bytes32"},{"indexed":false,"name":"cSeed","type":"bytes32"},{"indexed":false,"name":"player","type":"address"},{"indexed":false,"name":"bet","type":"uint256"}],"name":"NewGame","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"player","type":"address"},{"indexed":false,"name":"win","type":"uint256"}],"name":"Result","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"errorCode","type":"uint256"}],"name":"Error","type":"event"}]

  Contract Creation Code Switch To Opcodes View
610200604052600b60609081526002608052600360a052600460c052600560e052600661010052600761012052600861014052600961016052600a6101808190526101a08190526101c08190526101e05261005e90600190600d6100ca565b50604051606080620013878339810160409081528151602083015191909201515b5b60008054600160a060020a03191633600160a060020a03161790555b6003839055600482905560058054600160a060020a031916600160a060020a0383161790555b505050610182565b60018301918390821561014d5791602002820160005b8382111561011e57835183826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026100e0565b801561014b5782816101000a81549060ff021916905560010160208160000104928301926001030261011e565b505b5061015992915061015d565b5090565b61017f91905b8082111561015957805460ff19168155600101610163565b5090565b90565b6111f580620001926000396000f300606060405236156100d55763ffffffff60e060020a6000350416630140e35981146100fb57806311d87c4e1461016b57806320ae205914610181578063227cade514610196578063238ac933146101b85780632dab7ee2146101e45780632e1a7d4d146102b7578063306ae57b146102cc57806343d726d6146103545780636c19e783146103665780638772ae3c146101815780638da5cb5b146103995780639ddae7f5146103c5578063a6f9dae11461042d578063c38a8afd1461044b578063cc87ed821461046d578063ec9c677d146104a6575b6100f95b60005433600160a060020a039081169116146100f55760006000fd5b5b5b565b005b341561010357fe5b6040805160248035600481810135602081810286810182019097528186526100f9968335969395604495019291829190850190849080828437509496505084359460ff60208201358116955060408201351693506060810135925060800135905061050d565b005b6100f960043560243560443560643561052d565b005b341561018957fe5b6100f9600435610578565b005b341561019e57fe5b6101a661059e565b60408051918252519081900360200190f35b34156101c057fe5b6101c86105a4565b60408051600160a060020a039092168252519081900360200190f35b34156101ec57fe5b6102376004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506105b395505050505050565b60408051602080825283518183015283519192839290830191850190808383821561027d575b80518252602083111561027d57601f19909201916020918201910161025d565b505050905090810190601f1680156102a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102bf57fe5b6100f9600435610663565b005b34156102d457fe5b6040805160248035600481810135602081810286810182019097528186526100f9968335969395604495019291829190850190849080828437509496505084359460ff6020820135811695506040820135169350606081013592506080810135915060a08101359060c08101359060e08101359061010001356106e8565b005b341561035c57fe5b6100f961077b565b005b341561036e57fe5b6100f9600160a060020a03600435166107a8565b005b341561018957fe5b6100f9600435610578565b005b34156103a157fe5b6101c8610817565b60408051600160a060020a039092168252519081900360200190f35b34156103cd57fe5b6040805160248035600481810135602081810286810182019097528186526101a6968335969395604495019291829190850190849080828437509496505050923560ff169250610826915050565b60408051918252519081900360200190f35b341561043557fe5b6100f9600160a060020a03600435166109ae565b005b341561045357fe5b6101a66109f7565b60408051918252519081900360200190f35b341561047557fe5b61049260043560ff602435811690604435166064356084356109fd565b604080519115158252519081900360200190f35b34156104ae57fe5b604080516024803560048181013560208181028681018201909752818652610492968335969395604495019291829190850190849080828437509496505093359350610aad92505050565b604080519115158252519081900360200190f35b6000610520888888888888886001610b75565b90505b5050505050505050565b60035434108061053e575060045434115b156105495760006000fd5b30600160a060020a0316313460030211156105645760006000fd5b6105718484848434610d52565b5b50505050565b60005433600160a060020a039081169116146105945760006000fd5b60038190555b5b50565b60045481565b600554600160a060020a031681565b6105bb611197565b600082516040518059106105cc5750595b908082528060200260200182016040525b509150600090505b82518160ff16101561065c57828160ff1681518110151561060257fe5b9060200190602002015160f860020a02828260ff1681518110151561062357fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b6001016105e5565b5b50919050565b60005433600160a060020a0390811691161461067f5760006000fd5b30600160a060020a03163181101561059a5760008054604051600160a060020a039091169183156108fc02918491818181858888f19350505050151561059a57604080516006815290516000805160206111aa8339815191529181900360200190a15b5b5b5b50565b600060006106fd8d8d8d8d8d8d8d6000610b75565b60008e815260026020526040902060040154909250905080821061072e576107288686868685610d52565b80820391505b6000821180156107605750604051600160a060020a0333169083156108fc029084906000818181858888f19350505050155b1561076b5760006000fd5b5b50505050505050505050505050565b60005433600160a060020a039081169116146107975760006000fd5b600054600160a060020a0316ff5b5b565b60005433600160a060020a039081169116146107c45760006000fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60005433600160a060020a039081169116146105945760006000fd5b60038190555b5b50565b600054600160a060020a031681565b60006000600060006108388686610ec2565b925060158360ff16111561084f57600093506109a0565b6108598686610fa3565b915091508260ff16601514801561087357508460ff166002145b801561087d575080155b15610903576108bc86600081518110151561089457fe5b906020019060200201518760028151811015156108ad57fe5b9060200190602002015161116d565b156108dd5760008781526002602052604090206004015460030293506109a0565b6000878152600260208190526040909120600401546005025b0493506109a0565b6109a0565b8260ff16601514801561091957508460ff166005145b1561093b576000878152600260208190526040909120600401540293506109a0565b8160ff168360ff161180610952575060158260ff16115b15610974576000878152600260208190526040909120600401540293506109a0565b8160ff168360ff16141561099b5760008781526002602052604090206004015493506109a0565b600093505b5b5b5b5b5050509392505050565b60005433600160a060020a039081169116146109ca5760006000fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60035481565b6040805186815260f860020a60ff8088169190910260208084019190915283519283900360210183206005546000858152858401875294860185905285518281529389168484015283860188905260608401879052945193949093600160a060020a03909116926001926080808301939192601f19830192908190039091019088866161da5a03f11515610a8d57fe5b505060206040510351600160a060020a03161491505b5095945050505050565b600083815260026020818152604080842090920154825185815292519283900390910190912014610ae057506000610b6e565b600084815260026020526040902060010154610afb846105b3565b836040518083805190602001908083835b60208310610b2b5780518252601f199092019160209182019101610b0c565b51815160209384036101000a60001901801990921691161790529201938452506040519283900301909120929092149150610b6a905057506000610b6e565b5060015b9392505050565b600088815260026020526040812060058101805490839055600382015433600160a060020a03908116911614610bd057604080516001815290516000805160206111aa8339815191529181900360200190a160009250610d44565b610bdb8b8b8b610aad565b1515610c0c57604080516002815290516000805160206111aa8339815191529181900360200190a160009250610d44565b610c198b898989896109fd565b1515610c4a57604080516003815290516000805160206111aa8339815191529181900360200190a160009250610d44565b4281610e10011015610c8157604080516004815290516000805160206111aa8339815191529181900360200190a160009250610d44565b610c8c8b8b8a610826565b9250838015610c9b5750600083115b8015610cc95750604051600160a060020a0333169084156108fc029085906000818181858888f19350505050155b15610d0057604080516005815290516000805160206111aa8339815191529181900360200190a16005820181905560009250610d44565b60408051600160a060020a03331681526020810185905281518d927f8179c2b3f821111bf4c1ddac0be4fccdfff2e27c0ccf99a67d130888bd0e55df928290030190a25b505098975050505050505050565b600085815260026020526040902060030154600160a060020a031615610d785760006000fd5b60c060405190810160405280868152602001856000191681526020018460001916815260200133600160a060020a03168152602001828152602001428152506002600087815260200190815260200160002060008201518160000155602082015181600101906000191690556040820151816002019060001916905560608201518160030160006101000a815481600160a060020a030219169083600160a060020a031602179055506080820151816004015560a08201518160050155905050847f1e9d2d28c1d972d03a7b3e86ea362077ec7c228f102930285148990e16226d4c85858533866040518086600019166000191681526020018560001916600019168152602001846000191660001916815260200183600160a060020a0316600160a060020a031681526020018281526020019550505050505060405180910390a25b5050505050565b60008080805b8460020160ff168160ff161015610f6a578060ff16600114158015610ef157508060ff16600314155b15610f6057600d868260ff16815181101515610f0957fe5b9060200190602002015160ff16811515610f1f57fe5b069150600160ff8316600d8110610f3257fe5b602091828204019190065b9054906101000a900460ff16840193508160ff1660001415610f60576001909201915b5b5b600101610ec8565b5b60008360ff16118015610f81575060158460ff16115b15610f99576009199093019260001990920191610f6b565b5b50505092915050565b600060006000600060006000600d886001815181101515610fc057fe5b9060200190602002015160ff16811515610fd657fe5b069350600d886003815181101515610fea57fe5b9060200190602002015160ff1681151561100057fe5b069250600160ff8416600d811061101357fe5b602091828204019190065b9054906101000a900460ff1660018560ff16600d8110151561103c57fe5b602091828204019190065b9054906101000a900460ff160195508360ff1660001415611069576001909101905b60ff8316151561107a576001909101905b60158660ff1611156110995760091990950194600019909101906110b2565b8560ff16601514156110b2576015955060019450611161565b5b5b60118660ff16101561116157600d8882890160020160ff168151811015156110d857fe5b9060200190602002015160ff168115156110ee57fe5b069350600160ff8516600d811061110157fe5b602091828204019190065b9054906101000a900460ff16860195508360ff166000141561112f576001909101905b60158660ff16118015611145575060008260ff16115b156111595760091990950194600019909101905b6001016110b2565b5b505050509250929050565b6000600d60ff83165b0460ff16600d8460ff1681151561118957fe5b0460ff161490505b92915050565b6040805160208101909152600081529056002e36a7093f25f22bd4cbdeb6040174c3ba4c5fe8f1abc04e7c3c48f26c7413e0a165627a7a72305820cac2632f28f82ceb5df1285bdf6adaaec264400abb90ffe53371898a2f8576bb002900000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000655f6b94c85872383e669d976991bebba2066ecf

    Constructor Arguments (ABI-encoded and appended to the ByteCode above)
00000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000655f6b94c85872383e669d976991bebba2066ecf

-----Decoded View---------------
Found 3 constructor arguments :
Arg [0] : 00000000000000000000000000000000000000000000000000005af3107a4000
Arg [1] : 000000000000000000000000000000000000000000000000002386f26fc10000
Arg [2] : 000000000000000000000000655f6b94c85872383e669d976991bebba2066ecf


   Swarm Source:
bzzr://cac2632f28f82ceb5df1285bdf6adaaec264400abb90ffe53371898a2f8576bb
View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward