Sponsored Link:   DocTailor - Legal Self Customisable Smart Contract Platform - Bridging the Gap Between Business & Cryptocurrency Holders - Join Now!
  Latest 25 txns from a total Of 1800 transactions View All

TxHash Age From To Value [TxFee]
0x9b5b6eebc3da014372c3b454a38a3713fbef994b43ff0667b7252a5b2216ba4394 days 14 hrs ago0x0071bb9da92476dc71d277950f05236f935a5524  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.000828702
0x1261a17ac996e8078a4c2777657b33caf14f34441a93def1a96cec121fd41ab294 days 14 hrs ago0x0071bb9da92476dc71d277950f05236f935a5524  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.003259158
0x35e1afd3f2898dc5d4a1cfa5617c8439746d287b2473818be509447b8962b0b795 days 9 hrs ago0x0071bb9da92476dc71d277950f05236f935a5524  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.005475 Ether0.00153918
0x4965d237712a0279499ce992177d53ee2e85b7a3b5b23c348f9b2043e42d1795155 days 4 hrs ago0x1d4170413debd9cc71f249b3fcedb61ffb84acb0  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.000231882
0x36c77b605ace60030f4949dbd505df6417ea298a86c4f0ec470c11eea04e68ea347 days 23 hrs ago0x2b1ffb7bee14768fe86ec90d356b80cc33bc8e28  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.0001 Ether0.00338338
0x62773d437f349dea5a0e57a097073c299f59ace075af4a25ab5e2b65e0914260357 days 12 hrs ago0x21b4bb45293c79348e5ff455bc7b499d8da75d9f  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.003271174451
0xbc8cdeb030c9065906418b95ea922e891879d592658b7f266bc21c8aa40f1ed8368 days 19 hrs ago0xae8153b27a5097b9e9f2bfb1250aa03dfc400552  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0xfff75fb428f55dadba2146d2c85d37365ef89ee3505217ecd27532ab0653e751369 days 14 hrs ago0x582ed2b8fd94492ad3d3236dc29f64d11cfba246  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.00076298
0x9d302b3df67db7e36d373ebea3afdb119aa44d7774c5b02918e70d7afc306d5d369 days 23 hrs ago0x4a6a35798fdac3e7ac45d9473d9a4295d5e4d61c  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.0001 Ether0.003384788
0x1284beff19b482edf0e7712a15ddfac509b6ab801633f597d7c974bf55353c2f370 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x114b93f9f3191e7d91d6a3c52b6db929d8f8143f41f3556d33b117ba517d9415370 days 20 hrs ago0xae8153b27a5097b9e9f2bfb1250aa03dfc400552  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00273612
0xf685189a32de4490986e3c67f0858fd5d6cadac7c73eaca4af24b3810485fdf5371 days 4 hrs ago0xc2edd876a564e0f24ae4a6b1d597be2c8491d154  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.00102512
0xc6e2c40f2a2fcef62389f05011e07ab3333e6f2e742e24c86d5691e618732020371 days 4 hrs ago0xc2edd876a564e0f24ae4a6b1d597be2c8491d154  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.0001 Ether0.00307708
0x737b575d20977cdac5d0072caea0fde061a00f3ac056048688347cf1d03c60bc371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.0030758
0x151dce7d5c145873d22f19d34c34dd36da7a52bbd165d0c43d9c8538b4bdbfb4371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.0035279
0xe3cbd2b50ae23c0636199075ad040cd457ff2468a9577ae8b5ea0b8ebda7c3b1371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.0030758
0x330d8b1a7365c0ad03ca75e9697dc79f5900d79fa8e88291017d9c228daf7350371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.0030758
0xedcf296f64ba80b23dc9637f7c8205358638efa8f32999c57fd20dd446477042371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x1a54220a12c74416753a0886138019d61b7b84c7fef193d287fd916083844744371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.003118994579
0xa855ef0ad8076e7ff369b66d56fc788c9785cfe64dd6fa6d2201433ad08f109d371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00321239145
0xa68d8d12d9c56d863e7b796cebb184261cf140d648c9f311554ef193a241e5e6371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.003905774012
0x5a7cda4325139baceb564c8ea8fdb3b61908d1287f99be256fda2c1c1ba34127371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.004014401715
0x9c698cb6c19b7e05f5808a131500e77eabbb462924fa08e0a2deb9a7945e721e371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x6c2024e748dc8fae279d2bc8e5f38a2c4eef6dfa2b48548a77c88cf0a777c94b371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether0.00307708
0x15013c22443135ae63a01804e7ad337ff64fcdcd46e6e21d1688c9e1db2e22ff371 days 6 hrs ago0x62c6da252a301a252356d5549dc730de4697c640  IN   0x1cce39da85ff2d5ceae92a810447b52df13f92670 Ether0.00102084
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0x79b8ef0bd4f6bb814db1d2d300cf45fbdc0afa9e78dde0f2d16f250c6483276f493493694 days 5 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x46383c37717f87bdde8b0923df35fc1c22ca3d3c47dcd97d6542c5745195dbc6493489694 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x27b753e362b963c5586c7b73e55f3a9af66a8b02e33bc2b83cb33447a4cffa1b493487794 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x27b753e362b963c5586c7b73e55f3a9af66a8b02e33bc2b83cb33447a4cffa1b493487794 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x27b753e362b963c5586c7b73e55f3a9af66a8b02e33bc2b83cb33447a4cffa1b493487794 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x27b753e362b963c5586c7b73e55f3a9af66a8b02e33bc2b83cb33447a4cffa1b493487794 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x04476f7197ac21809134615d82cb38226223da48911b5071d78681cdd99fa18b493485494 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x04476f7197ac21809134615d82cb38226223da48911b5071d78681cdd99fa18b493485494 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x04476f7197ac21809134615d82cb38226223da48911b5071d78681cdd99fa18b493485494 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x04476f7197ac21809134615d82cb38226223da48911b5071d78681cdd99fa18b493485494 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0xa3325336d90f49da4474971ffba11f7547e7043c4af68b39c844ee2ef1c2c8d0493482894 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0xa3325336d90f49da4474971ffba11f7547e7043c4af68b39c844ee2ef1c2c8d0493482894 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0xa3325336d90f49da4474971ffba11f7547e7043c4af68b39c844ee2ef1c2c8d0493482894 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0xa3325336d90f49da4474971ffba11f7547e7043c4af68b39c844ee2ef1c2c8d0493482894 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x1156513e20a997e50106c3463a22ac5e92bff07e0a40355a3b8accbf6def318f493480494 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x1156513e20a997e50106c3463a22ac5e92bff07e0a40355a3b8accbf6def318f493480494 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x1156513e20a997e50106c3463a22ac5e92bff07e0a40355a3b8accbf6def318f493480494 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x1156513e20a997e50106c3463a22ac5e92bff07e0a40355a3b8accbf6def318f493480494 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x9d488921a12cd6295cfb6bc6628ec5411917d7f88e923ce9bddbf8ddb387f666493479194 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x9d488921a12cd6295cfb6bc6628ec5411917d7f88e923ce9bddbf8ddb387f666493479194 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x9d488921a12cd6295cfb6bc6628ec5411917d7f88e923ce9bddbf8ddb387f666493479194 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x9d488921a12cd6295cfb6bc6628ec5411917d7f88e923ce9bddbf8ddb387f666493479194 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x4728e37ca7ca61602767837636f02237253b7bc4966e176bbe15ceb1d965a320493477994 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
0x4728e37ca7ca61602767837636f02237253b7bc4966e176bbe15ceb1d965a320493477994 days 6 hrs ago0xdd732ca07e15d0ac05bc97e196f81abaf66337720x1cce39da85ff2d5ceae92a810447b52df13f92670.01 Ether
0x4728e37ca7ca61602767837636f02237253b7bc4966e176bbe15ceb1d965a320493477994 days 6 hrs ago0x1cce39da85ff2d5ceae92a810447b52df13f92670xdd732ca07e15d0ac05bc97e196f81abaf66337720.03 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity), ConstantOptimizerSubtraction (low-severity) Solidity compiler bugs.

Contract Source Code Verified (Exact match)
Contract Name: blackjack
Compiler Version: v0.4.10+commit.f0d539ae
Optimization Enabled: Yes
Runs (Optimiser):  200



  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 is the last bytes of the Contract Creation Code 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
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.