Contract Overview
Balance: 0.133333333333333334 Ether
Ether Value: $27.67 (@ $207.49/ETH)
Transactions: 22 txns
 Latest 22 txns

TxHash Age From To Value [TxFee]
0x409ee926fbac766f693039cd1a441c5db104c5f645f419adaac5967d1e97508386 days 21 hrs ago0x3a224e3e7ee6187c11b2a573b94a43ced35f1ab4  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.000282144
0x87eed680e388dc7cf1ef52cca2ffcc507b0cc64346f87271b3d3c283985da4d189 days 18 hrs ago0x31e4bf69fa4f42aaa63bfad3f73ebbbe9b074587  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.0000775896
0x54bcad3fec4df38d22096782f9268e8778cadb9df4d9e014c338d25ca3bcbfdd89 days 18 hrs ago0xebf049bf7f7f0bc0615bda4ef34d763ef340a1ec  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.014209151
0x35d2e91db389fbf07adf08e3057ae495aab36d7ba0bb48019275f310d5c0a0cd89 days 18 hrs ago0xebf049bf7f7f0bc0615bda4ef34d763ef340a1ec  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.00031361
0x0827c48617eca9563419b7151c28485220101d4a8c8199c70a74982fd425670689 days 18 hrs ago0xebf049bf7f7f0bc0615bda4ef34d763ef340a1ec  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.00031361
0xa1749ad8ff44c1478ea96ad397cc62a91ccc27e7222bd360f35c87c10b99ed2d89 days 18 hrs ago0xebf049bf7f7f0bc0615bda4ef34d763ef340a1ec  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.00126269
0x08c3e9010ad634008ee334d754d9f95d7a72e8aac5b940a031c0e06a8fdfdb41125 days 17 hrs ago0x3a224e3e7ee6187c11b2a573b94a43ced35f1ab4  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.000340284
0x798ba57297ede06b7d45b0d638e75618ad3b56d3e9ec796ad08cee5c4d3539d5125 days 18 hrs ago0xebf049bf7f7f0bc0615bda4ef34d763ef340a1ec  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.00052464
0x11de256f2a2ec58e4517b77ddb5968e5e7ddb65b54637a6eec8bd6edb8370fed125 days 22 hrs ago0xff579c555a16c339e869b06dde219027ac1ac778  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.00035334
0x08ca04e35bab0c61b4e834f4be8ed33cf1163c0ddb973b0e3bf6d68d0eccd05c125 days 22 hrs ago0xff579c555a16c339e869b06dde219027ac1ac778  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.000948416
0xce567a11a5175826aba3dc98abe0e40ae47a8e21823cf9365776029b6d2fb23f126 days 16 hrs ago0x3a224e3e7ee6187c11b2a573b94a43ced35f1ab4  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.00058968
0xc3018afac5c23a83c3ca3609dad5f9cca24228cb530ec1984d3f1f29e842cfc2126 days 16 hrs ago0x3a224e3e7ee6187c11b2a573b94a43ced35f1ab4  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.00058968
0x7114a7eeaa6d2e025bf017213e7058df794dd8c792f1c438a736447fcd720c1b129 days 10 hrs ago0xd73ebc97df6a89a8ad98b491064a4558672363cb  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.001625088
0xe2466ca91a45bb2746aa24bf03e0fa93f2d0004a0f6fb01bfbf73424466d8d4c129 days 11 hrs ago0x7167be7b0118f63e2ca8b364ef3b5be7a328a437  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.001625088
0x44b98c1cd0ed2e74f6fac9c71f6f7a975046dcf98bda37e14fe7eec6cd9251aa131 days 16 hrs ago0x3a224e3e7ee6187c11b2a573b94a43ced35f1ab4  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.00058968
0x2971f2329b8e9e75be5c47114c3f7935ff9f5bb0a4e17c4511af0ae01680661a131 days 16 hrs ago0x3a224e3e7ee6187c11b2a573b94a43ced35f1ab4  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70 Ether0.000588912
0xe4fb2a679b08c57bc6d885fdbf135d316f6cb2ca4daf2c2ad5d02575875329fa131 days 21 hrs ago0xf7b4809cc876a35baf5f35c1d5a1168144865e8c  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.00162816
0xd21ebfc8fee351e77e349667d29146a0646c6c1a249da1bd63ce0db8c3c2b59c132 days 16 hrs ago0x3a224e3e7ee6187c11b2a573b94a43ced35f1ab4  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.001621248
0x269d1a7774753a0a965bbc729b0ff742788c5340299881b96770a6123db02c92133 days 8 hrs ago0x9ba62573546b0fb4713037b5232395a6d6940681  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.001626624
0x7c13bb6b4e209a3ce5707059ccabc81f80fbba40bd3f019078b8e6ae2a0dabdd134 days 21 hrs ago0x04be1e6e92afa18b2003966f8abb2e3848656415  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.001626624
0x7452ad24d26d19f3d6e600d31cdf7a11aabce118474b9558a367ee9ae75ea2b7134 days 21 hrs ago0x31e4bf69fa4f42aaa63bfad3f73ebbbe9b074587  IN   0x6238972611f7933c6c0919c54447e2bac86f96e70.05 Ether0.001802784
0x0d084702326799a6426a4303a8404852a39e30edbd6e8ee590c2a2a5abeec3f6134 days 22 hrs ago0xebf049bf7f7f0bc0615bda4ef34d763ef340a1ec  IN    Contract Creation0 Ether0.02429752
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 2 Internal Transactions

ParentTxHash Block Age From To Value
0x409ee926fbac766f693039cd1a441c5db104c5f645f419adaac5967d1e975083601511986 days 21 hrs ago0x6238972611f7933c6c0919c54447e2bac86f96e70x3a224e3e7ee6187c11b2a573b94a43ced35f1ab40.133333333333333333 Ether
0x87eed680e388dc7cf1ef52cca2ffcc507b0cc64346f87271b3d3c283985da4d1599817289 days 18 hrs ago0x6238972611f7933c6c0919c54447e2bac86f96e70x31e4bf69fa4f42aaa63bfad3f73ebbbe9b0745870.133333333333333333 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: CopaDelCrypto
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.4.24;

contract CopaDelCrypto
{
  address public owner;
  constructor() public
  {
    owner = msg.sender;
  }
  modifier onlyOwner
  {
    require(msg.sender == owner);
    _;
  }

  struct Forecast
  {
    bytes32 part1;
    bytes32 part2;
    bytes32 part3;
    bytes12 part4;
    bool hasPaidOrWon;
  }

  uint256 public prizeValue;
  uint256 public resultsPublishedTime;

  bytes32 public worldCupResultPart1;
  bytes32 public worldCupResultPart2;
  bytes32 public worldCupResultPart3;
  bytes12 public worldCupResultPart4;

  bool public forecastingClosed;
  bool public resultsPublished;

  uint32 public resultsValidationStep;
  uint32 public verifiedWinnersCount;
  uint32 public verifiedWinnersLastCount;

  uint16 public publishedWinningScoreThreshold;
  uint16 public expectedWinnersCount;

  address[] public players;

  mapping(address => Forecast) public forecasts;

  function PlaceNewForecast(bytes32 f1, bytes32 f2, bytes32 f3, bytes12 f4)
  public payable
  {
    require(!forecastingClosed && msg.value == 50000000000000000 && !forecasts[msg.sender].hasPaidOrWon);

    forecasts[msg.sender].part1 = f1;
    forecasts[msg.sender].part2 = f2;
    forecasts[msg.sender].part3 = f3;
    forecasts[msg.sender].part4 = f4;
    forecasts[msg.sender].hasPaidOrWon = true;

    players.push(msg.sender);
  }

  function UpdateForecast(bytes32 f1, bytes32 f2, bytes32 f3, bytes12 f4)
  public
  {
    require(!forecastingClosed && forecasts[msg.sender].hasPaidOrWon);

    forecasts[msg.sender].part1 = f1;
    forecasts[msg.sender].part2 = f2;
    forecasts[msg.sender].part3 = f3;
    forecasts[msg.sender].part4 = f4;
  }

  function CloseForecasting(uint16 exWinCount)
  public onlyOwner
  {
    require(!forecastingClosed);
    require((exWinCount == 0 && players.length > 10000)
             || (exWinCount > 0 && (uint32(exWinCount) * uint32(exWinCount) >= players.length
                 && uint32(exWinCount - 1) * uint32(exWinCount - 1) < players.length)));
    expectedWinnersCount = (players.length) > 10000 ? uint16(players.length / 100) : exWinCount;

    forecastingClosed = true;
  }

  function PublishWorldCupResults(bytes32 res1, bytes32 res2, bytes32 res3, bytes12 res4)
  public onlyOwner
  {
    require(forecastingClosed && !resultsPublished);

    worldCupResultPart1 = res1;
    worldCupResultPart2 = res2;
    worldCupResultPart3 = res3;
    worldCupResultPart4 = res4;

    resultsValidationStep = 0;
    verifiedWinnersCount = 0;
    verifiedWinnersLastCount = 0;
    resultsPublishedTime = block.timestamp;
  }

  function PublishWinnersScoreThres(uint16 scoreThres)
  public onlyOwner
  {
    require(forecastingClosed && !resultsPublished);

    publishedWinningScoreThreshold = scoreThres;
  }

  function VerifyPublishedResults(uint16 stepSize)
  public onlyOwner
  {
    require(forecastingClosed && !resultsPublished);
    require(stepSize > 0 && resultsValidationStep + stepSize <= players.length);

    uint32 wins;
    uint32 lasts;

    for (uint32 i = resultsValidationStep; i < resultsValidationStep + stepSize; i++) {

      Forecast memory fc = forecasts[players[i]];

      uint16 score = scoreGroups(fc.part1, fc.part2, worldCupResultPart1, worldCupResultPart2)
                     + scoreKnockouts(fc.part2, fc.part3, fc.part4);

      if (score >= publishedWinningScoreThreshold) {
        wins++;
        if (score == publishedWinningScoreThreshold) {
          lasts++;
        }
        forecasts[players[i]].hasPaidOrWon = true;
      } else {
        forecasts[players[i]].hasPaidOrWon = false;
      }
    }

    resultsValidationStep += stepSize;
    verifiedWinnersCount += wins;
    verifiedWinnersLastCount += lasts;

    if (resultsValidationStep == players.length) {
      verifiedWinnersCount = validateWinnersCount(verifiedWinnersCount, verifiedWinnersLastCount, expectedWinnersCount);
      verifiedWinnersLastCount = 0;
      expectedWinnersCount = 0;

      if (verifiedWinnersCount > 0) {
        prizeValue = address(this).balance / verifiedWinnersCount;
        resultsPublished = true;
      }
    }
  }

  function WithdrawPrize()
  public
  returns(bool)
  {
    require(prizeValue > 0);

    if (forecasts[msg.sender].hasPaidOrWon) {
      forecasts[msg.sender].hasPaidOrWon = false;
      if (!msg.sender.send(prizeValue)) {
        forecasts[msg.sender].hasPaidOrWon = true;
        return false;
      }
      return true;
    }
    return false;
  }

  function CancelGame()
  public onlyOwner
  {
    forecastingClosed = true;
    resultsPublished = true;
    resultsPublishedTime = block.timestamp;
    prizeValue = address(this).balance / players.length;
  }

  function CancelGameAfterResultsPublished()
  public onlyOwner
  {
    CancelGame();
    for (uint32 i = 0; i < players.length; i++) {
    	forecasts[players[i]].hasPaidOrWon = true;
    }
  }

  function WithdrawUnclaimed()
  public onlyOwner
  returns(bool)
  {
    require(resultsPublished && block.timestamp >= (resultsPublishedTime + 10 weeks));

    uint256 amount = address(this).balance;
    if (amount > 0) {
      if (!msg.sender.send(amount)) {
        return false;
      }
    }
    return true;
  }

  function getForecastData(bytes32 pred2, bytes32 pred3, bytes12 pred4, uint8 index)
  public pure
  returns(uint8)
  {
    assert(index >= 32 && index < 108);
    if (index < 64) {
      return uint8(pred2[index - 32]);
    } else if (index < 96) {
      return uint8(pred3[index - 64]);
    } else {
      return uint8(pred4[index - 96]);
    }
  }

  function getResultData(uint8 index)
  public view
  returns(uint8)
  {
    assert(index >= 32 && index < 108);
    if (index < 64) {
      return uint8(worldCupResultPart2[index - 32]);
    } else if (index < 96) {
      return uint8(worldCupResultPart3[index - 64]);
    } else {
      return uint8(worldCupResultPart4[index - 96]);
    }
  }

  function computeGroupPhasePoints(uint8 pred, uint8 result)
  public pure
  returns(uint8)
  {
    uint8 gamePoint = 0;

    int8 predLeft = int8(pred % 16);
    int8 predRight = int8(pred >> 4);
    int8 resultLeft = int8(result % 16);
    int8 resultRight = int8(result >> 4);

    int8 outcome = resultLeft - resultRight;
    int8 predOutcome = predLeft - predRight;

    if ((outcome > 0 && predOutcome > 0)
        || (outcome < 0 && predOutcome < 0)
        || (outcome == 0 && predOutcome == 0)) {
      gamePoint += 4;
    }

    if (predLeft == resultLeft) {
      gamePoint += 2;
    }

    if (predRight == resultRight) {
      gamePoint += 2;
    }
    return gamePoint;
  }

  function computeKnockoutPoints(uint8 pred, uint8 result, uint8 shootPred, uint8 shootResult,
                                 uint8 roundFactorLeft, uint8 roundFactorRight, bool isInverted)
  public pure
  returns (uint16)
  {
    uint16 gamePoint = 0;
    int8 predLeft = int8(pred % 16);
    int8 predRight = int8(pred >> 4);
    int8 resultLeft = int8(result % 16);
    int8 resultRight = int8(result >> 4);

    int8 predOutcome = predLeft - predRight;
    int8 outcome = resultLeft - resultRight;

    if (predOutcome == 0) {
       predOutcome = int8(shootPred % 16) - int8(shootPred >> 4);
    }
    if (outcome == 0) { 
       outcome = int8(shootResult % 16) - int8(shootResult >> 4);
    }

    if (isInverted) {
      resultLeft = resultLeft + resultRight;
      resultRight = resultLeft - resultRight;
      resultLeft = resultLeft - resultRight;
      outcome = -outcome;
    }

    if ((outcome > 0 && predOutcome > 0) || (outcome < 0 && predOutcome < 0)) {
      gamePoint += 4 * (roundFactorLeft + roundFactorRight);
    }

    gamePoint += 4 * ((predLeft == resultLeft ? roundFactorLeft : 0)
                      + (predRight == resultRight ? roundFactorRight: 0));

    return gamePoint;
  }

  function scoreGroups(bytes32 pred1, bytes32 pred2, bytes32 res1, bytes32 res2)
  public pure
  returns(uint16)
  {
    uint16 points = 0;
    for (uint8 f = 0; f < 48; f++) {
      if (f < 32) {
        points += computeGroupPhasePoints(uint8(pred1[f]), uint8(res1[f]));
      } else {
        points += computeGroupPhasePoints(uint8(pred2[f - 32]), uint8(res2[f - 32]));
      }
    }
    return points;
  }

  function scoreKnockouts(bytes32 pred2, bytes32 pred3, bytes12 pred4)
  public view
  returns(uint16)
  {
    uint8 f = 48;
    uint16 points = 0;

    int8[15] memory twinShift = [int8(16), 16, 16, 16, -16, -16, -16, -16, 8, 8, -8, -8, 4, -4, 0];
    uint8[15] memory roundFactor = [uint8(2), 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 8, 8, 16];

    for (uint8 i = 0; i < 15; i++) {

      bool teamLeftOK = getForecastData(pred2, pred3, pred4, f) == getResultData(f);
      bool teamRightOK = getForecastData(pred2, pred3, pred4, f + 1) == getResultData(f + 1);

      if (teamLeftOK || teamRightOK) {
        points += computeKnockoutPoints(getForecastData(pred2, pred3, pred4, f + 2), getResultData(f + 2),
                                        getForecastData(pred2, pred3, pred4, f + 3), getResultData(f + 3),
                                        teamLeftOK ? roundFactor[i] : 0, teamRightOK ? roundFactor[i] : 0,
                                        false);
        if (i < 8) {
          points += (teamLeftOK ? 4 : 0) + (teamRightOK ? 4 : 0);
        }
      }

      bool isInverted = (i < 8) || i == 14;
      teamLeftOK = getForecastData(pred2, pred3, pred4, f) ==
                   (getResultData(uint8(int8(f + (isInverted ? 1 : 0)) + twinShift[i])));
      teamRightOK = getForecastData(pred2, pred3, pred4, f + 1) ==
                   (getResultData(uint8(int8(f + (isInverted ? 0 : 1)) + twinShift[i])));

      if (teamLeftOK || teamRightOK) {
        points += computeKnockoutPoints(getForecastData(pred2, pred3, pred4, f + 2),
                                        getResultData(uint8(int8(f + 2) + twinShift[i])),
                                        getForecastData(pred2, pred3, pred4, f + 3),
                                        getResultData(uint8(int8(f + 3) + twinShift[i])),
                                        teamLeftOK ? roundFactor[i] : 0, teamRightOK ? roundFactor[i] : 0,
                                        isInverted);
        if (i < 8) {
          points += (teamLeftOK ? 2 : 0) + (teamRightOK ? 2 : 0);
        }
      }
      f = f + 4;
    }
    return points;
  }

  function validateWinnersCount(uint32 winners, uint32 last, uint32 expected)
  public pure
  returns(uint32)
  {
    if (winners < expected) {
      return 0;
    } else if ((winners == expected && last >= 1)
                || (last > 1 && (winners - last) < expected)) {
      return winners;
    } else {
      return 0;
    }
  }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"pred2","type":"bytes32"},{"name":"pred3","type":"bytes32"},{"name":"pred4","type":"bytes12"}],"name":"scoreKnockouts","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"expectedWinnersCount","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resultsValidationStep","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"winners","type":"uint32"},{"name":"last","type":"uint32"},{"name":"expected","type":"uint32"}],"name":"validateWinnersCount","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"pred","type":"uint8"},{"name":"result","type":"uint8"}],"name":"computeGroupPhasePoints","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"forecasts","outputs":[{"name":"part1","type":"bytes32"},{"name":"part2","type":"bytes32"},{"name":"part3","type":"bytes32"},{"name":"part4","type":"bytes12"},{"name":"hasPaidOrWon","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"f1","type":"bytes32"},{"name":"f2","type":"bytes32"},{"name":"f3","type":"bytes32"},{"name":"f4","type":"bytes12"}],"name":"UpdateForecast","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"WithdrawPrize","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"stepSize","type":"uint16"}],"name":"VerifyPublishedResults","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"resultsPublished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"exWinCount","type":"uint16"}],"name":"CloseForecasting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"worldCupResultPart4","outputs":[{"name":"","type":"bytes12"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"worldCupResultPart3","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"prizeValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"pred1","type":"bytes32"},{"name":"pred2","type":"bytes32"},{"name":"res1","type":"bytes32"},{"name":"res2","type":"bytes32"}],"name":"scoreGroups","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"pred","type":"uint8"},{"name":"result","type":"uint8"},{"name":"shootPred","type":"uint8"},{"name":"shootResult","type":"uint8"},{"name":"roundFactorLeft","type":"uint8"},{"name":"roundFactorRight","type":"uint8"},{"name":"isInverted","type":"bool"}],"name":"computeKnockoutPoints","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"res1","type":"bytes32"},{"name":"res2","type":"bytes32"},{"name":"res3","type":"bytes32"},{"name":"res4","type":"bytes12"}],"name":"PublishWorldCupResults","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"verifiedWinnersLastCount","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"CancelGameAfterResultsPublished","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"verifiedWinnersCount","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resultsPublishedTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"WithdrawUnclaimed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"publishedWinningScoreThreshold","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"forecastingClosed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"pred2","type":"bytes32"},{"name":"pred3","type":"bytes32"},{"name":"pred4","type":"bytes12"},{"name":"index","type":"uint8"}],"name":"getForecastData","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"worldCupResultPart1","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"worldCupResultPart2","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"scoreThres","type":"uint16"}],"name":"PublishWinnersScoreThres","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"CancelGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"f1","type":"bytes32"},{"name":"f2","type":"bytes32"},{"name":"f3","type":"bytes32"},{"name":"f4","type":"bytes12"}],"name":"PlaceNewForecast","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"index","type":"uint8"}],"name":"getResultData","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"players","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b5060008054600160a060020a03191633179055611ab1806100326000396000f3006080604052600436106101875763ffffffff60e060020a60003504166303905f10811461018c5780630fd58d07146101cb57806315d44202146101e057806318d8ec5b1461020e5780633c33863c146102385780633d0948291461026f57806343cd2c40146102c7578063539fffc9146102f4578063581ff6e21461031d5780635f589599146103395780636186fe711461034e57806369ab98dd1461036a5780636b6d294e1461039c57806388279320146103c35780638bd5d30f146103d85780638da5cb5b146103f957806398a0e1c81461042a578063999cef0414610468578063a250f43b14610493578063a3c68e3d146104a8578063a8b322b6146104bd578063ac0840db146104d2578063b459c3fe146104e7578063b768628f146104fc578063c4c5f3de14610511578063ca99720014610526578063d785c19c14610554578063dc71db4314610569578063df5b588c1461057e578063e27e3fd31461059a578063ed7dd693146105af578063f00e6f0a146105cd578063f71d96cb146105e8575b600080fd5b34801561019857600080fd5b506101b4600435602435600160a060020a031960443516610600565b6040805161ffff9092168252519081900360200190f35b3480156101d757600080fd5b506101b4610a3e565b3480156101ec57600080fd5b506101f5610a4f565b6040805163ffffffff9092168252519081900360200190f35b34801561021a57600080fd5b506101f563ffffffff60043581169060243581169060443516610a6d565b34801561024457600080fd5b5061025960ff60043581169060243516610aed565b6040805160ff9092168252519081900360200190f35b34801561027b57600080fd5b50610290600160a060020a0360043516610b9e565b60408051958652602086019490945284840192909252600160a060020a031916606084015215156080830152519081900360a00190f35b3480156102d357600080fd5b506102f2600435602435604435600160a060020a031960643516610bd7565b005b34801561030057600080fd5b50610309610c5a565b604080519115158252519081900360200190f35b34801561032957600080fd5b506102f261ffff60043516610d14565b34801561034557600080fd5b5061030961119b565b34801561035a57600080fd5b506102f261ffff600435166111b5565b34801561037657600080fd5b5061037f6112b4565b60408051600160a060020a03199092168252519081900360200190f35b3480156103a857600080fd5b506103b16112c0565b60408051918252519081900360200190f35b3480156103cf57600080fd5b506103b16112c6565b3480156103e457600080fd5b506101b46004356024356044356064356112cc565b34801561040557600080fd5b5061040e611382565b60408051600160a060020a039092168252519081900360200190f35b34801561043657600080fd5b506101b460ff60043581169060243581169060443581169060643581169060843581169060a4351660c4351515611391565b34801561047457600080fd5b506102f2600435602435604435600160a060020a0319606435166114be565b34801561049f57600080fd5b506101f5611560565b3480156104b457600080fd5b506102f2611586565b3480156104c957600080fd5b506101f561162a565b3480156104de57600080fd5b506103b161163d565b3480156104f357600080fd5b50610309611643565b34801561050857600080fd5b506101b46116d2565b34801561051d57600080fd5b506103096116e3565b34801561053257600080fd5b50610259600435602435600160a060020a03196044351660ff606435166116f3565b34801561056057600080fd5b506103b1611782565b34801561057557600080fd5b506103b1611788565b34801561058a57600080fd5b506102f261ffff6004351661178e565b3480156105a657600080fd5b506102f2611819565b6102f2600435602435604435600160a060020a031960643516611887565b3480156105d957600080fd5b5061025960ff60043516611977565b3480156105f457600080fd5b5061040e600435611a0f565b600080600061060d611a37565b610615611a37565b60008060008060309750600096506101e060405190810160405280601060000b60000b8152602001601060000b8152602001601060000b8152602001601060000b8152602001600f1960000b8152602001600f1960000b8152602001600f1960000b8152602001600f1960000b8152602001600860000b8152602001600860000b815260200160071960000b815260200160071960000b8152602001600460000b815260200160031960000b81526020016000800b81525095506101e060405190810160405280600260ff1660ff168152602001600260ff168152602001600260ff168152602001600260ff168152602001600260ff168152602001600260ff168152602001600260ff168152602001600260ff168152602001600460ff168152602001600460ff168152602001600460ff168152602001600460ff168152602001600860ff168152602001600860ff168152602001601060ff168152509450600093505b600f8460ff161015610a2e5761078f88611977565b60ff1661079e8d8d8d8c6116f3565b60ff161492506107b088600101611977565b60ff166107c28d8d8d8c6001016116f3565b60ff1614915082806107d15750815b1561088f576108586107e88d8d8d8c6002016116f3565b6107f48a600201611977565b6108038f8f8f8e6003016116f3565b61080f8c600301611977565b8761081b576000610830565b8960ff8a16600f811061082a57fe5b60200201515b8761083c576000610851565b8a60ff8b16600f811061084b57fe5b60200201515b6000611391565b8701965060088460ff16101561088f5781610874576000610877565b60045b83610883576000610886565b60045b0160ff16870196505b60088460ff1610806108a457508360ff16600e145b90506108d48660ff8616600f81106108b857fe5b6020020151826108c95760006108cc565b60015b8a0101611977565b60ff166108e38d8d8d8c6116f3565b60ff16149250610915868560ff16600f811015156108fd57fe5b60200201518261090e5760016108cc565b8901611977565b60ff166109278d8d8d8c6001016116f3565b60ff1614915082806109365750815b15610a1d576109e661094d8d8d8d8c6002016116f3565b61096e8860ff8816600f811061095f57fe5b60200201518b60020101611977565b61097d8f8f8f8e6003016116f3565b61099e8a60ff8a16600f811061098f57fe5b60200201518d60030101611977565b876109aa5760006109bf565b8960ff8a16600f81106109b957fe5b60200201515b876109cb5760006109e0565b8a60ff8b16600f81106109da57fe5b60200201515b87611391565b8701965060088460ff161015610a1d5781610a02576000610a05565b60025b83610a11576000610a14565b60025b0160ff16870196505b60049097019660019093019261077a565b50949a9950505050505050505050565b60065460e060020a900461ffff1681565b6006546e010000000000000000000000000000900463ffffffff1681565b60008163ffffffff168463ffffffff161015610a8b57506000610ae6565b8163ffffffff168463ffffffff16148015610aad575060018363ffffffff1610155b80610ad6575060018363ffffffff16118015610ad657508163ffffffff1683850363ffffffff16105b15610ae2575082610ae6565b5060005b9392505050565b600080600f80851690601060ff878116829004928716919087160480820383850381870b87128015610b22575060008160000b135b80610b3e575060008260000b128015610b3e575060008160000b125b80610b5a57508160000b6000148015610b5a57508060000b6000145b15610b66576004870196505b8360000b8660000b1415610b7b576002870196505b8260000b8560000b1415610b90576002870196505b509498975050505050505050565b60086020526000908152604090208054600182015460028301546003909301549192909160a060020a810290606060020a900460ff1685565b600654606060020a900460ff16158015610c0a575033600090815260086020526040902060030154606060020a900460ff165b1515610c1557600080fd5b33600090815260086020526040902093845560018401929092556002830155600390910180546bffffffffffffffffffffffff191660a060020a909204919091179055565b600080600154111515610c6c57600080fd5b33600090815260086020526040902060030154606060020a900460ff1615610d0d573360008181526008602052604080822060030180546cff00000000000000000000000019169055600154905181156108fc0292818181858888f193505050501515610d05575033600090815260086020526040812060030180546cff0000000000000000000000001916606060020a179055610d11565b506001610d11565b5060005b90565b6000806000610d21611a57565b60008054600160a060020a03163314610d3957600080fd5b600654606060020a900460ff168015610d6657506006546d0100000000000000000000000000900460ff16155b1515610d7157600080fd5b60008661ffff16118015610daa575060075460065463ffffffff6e010000000000000000000000000000909104811661ffff8916011611155b1515610db557600080fd5b6006546e010000000000000000000000000000900463ffffffff1692505b60065463ffffffff6e010000000000000000000000000000909104811661ffff88160181169084161015610fd6576008600060078563ffffffff16815481101515610e1a57fe5b600091825260208083209190910154600160a060020a031683528281019390935260409182019020815160a081018352815481526001820154938101849052600282015492810183905260039091015460a060020a8102600160a060020a03191660608301819052606060020a90910460ff1615156080830152909450610ea2929190610600565b610eba836000015184602001516003546004546112cc565b6006549101915061ffff60d060020a909104811690821610610f655760065460019095019461ffff82811660d060020a909204161415610efb576001909301925b60016008600060078663ffffffff16815481101515610f1657fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190206003018054911515606060020a026cff00000000000000000000000019909216919091179055610fcb565b60006008600060078663ffffffff16815481101515610f8057fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190206003018054911515606060020a026cff000000000000000000000000199092169190911790555b600190920191610dd3565b60068054760100000000000000000000000000000000000000000000609060020a63ffffffff6e010000000000000000000000000000808504821661ffff8d16018216810271ffffffff0000000000000000000000000000199095169490941782810482168b01821690920275ffffffff000000000000000000000000000000000000199092169190911782810482168901821690920279ffffffff00000000000000000000000000000000000000000000199092169190911792839055600754919092049091161415611193576006546110e99063ffffffff609060020a820481169176010000000000000000000000000000000000000000000081049091169061ffff60e060020a90910416610a6d565b6006805475ffffffff0000000000000000000000000000000000001916609060020a63ffffffff9384168102919091177fffff0000ffff00000000ffffffffffffffffffffffffffffffffffffffffffff169182905560009104909116111561119357600654609060020a900463ffffffff16303181151561116757fe5b04600155600680546dff0000000000000000000000000019166d01000000000000000000000000001790555b505050505050565b6006546d0100000000000000000000000000900460ff1681565b600054600160a060020a031633146111cc57600080fd5b600654606060020a900460ff16156111e357600080fd5b61ffff81161580156111f85750600754612710105b8061123c575060008161ffff1611801561123c575060075463ffffffff61ffff83168002161080159061123c575060075463ffffffff61ffff600019840116800216105b151561124757600080fd5b600754612710106112585780611260565b600754606490045b600680546cff0000000000000000000000001961ffff9390931660e060020a027fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091161791909116606060020a17905550565b60065460a060020a0281565b60055481565b60015481565b600080805b60308160ff1610156113785760208160ff161015611334576113288760ff8316602081106112fb57fe5b60f860020a91901a8102048660ff84166020811061131557fe5b1a60f860020a0260f860020a9004610aed565b60ff1682019150611370565b6113688660ff601f198401166020811061134a57fe5b60f860020a91901a8102048560ff601f198501166020811061131557fe5b60ff16820191505b6001016112d1565b5095945050505050565b600054600160a060020a031681565b6000806000806000806000806000965060108f60ff168115156113b057fe5b06955060048f60ff169060020a9004945060108e60ff168115156113d057fe5b06935050601060ff8e1604915050828403818303600082900b15156113fe57601060ff8e1604600f8e160391505b8060000b600014156114185750601060ff8c1604600f8c16035b881561142d5792820191820391829003926000035b60008160000b138015611443575060008260000b135b8061145f575060008160000b12801561145f575060008260000b125b1561147257898b0160040260ff16870196505b8260000b8560000b14611486576000611488565b895b8460000b8760000b1461149c57600061149e565b8b5b0160040260ff168701965086975050505050505050979650505050505050565b600054600160a060020a031633146114d557600080fd5b600654606060020a900460ff16801561150257506006546d0100000000000000000000000000900460ff16155b151561150d57600080fd5b600393909355600491909155600555600680546bffffffffffffffffffffffff191660a060020a9092049190911779ffffffffffffffffffffffff00000000000000000000000000001916905542600255565b600654760100000000000000000000000000000000000000000000900463ffffffff1681565b60008054600160a060020a0316331461159e57600080fd5b6115a6611819565b5060005b60075463ffffffff821610156116275760016008600060078463ffffffff168154811015156115d557fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190206003018054911515606060020a026cff000000000000000000000000199092169190911790556001016115aa565b50565b600654609060020a900463ffffffff1681565b60025481565b600080548190600160a060020a0316331461165d57600080fd5b6006546d0100000000000000000000000000900460ff1680156116875750600254625c4900014210155b151561169257600080fd5b50303160008111156116c957604051339082156108fc029083906000818181858888f1935050505015156116c957600091506116ce565b600191505b5090565b60065460d060020a900461ffff1681565b600654606060020a900460ff1681565b600060208260ff161015801561170c5750606c8260ff16105b151561171457fe5b60408260ff161015611748578460ff601f198401166020811061173357fe5b1a60f860020a0260f860020a9004905061177a565b60608260ff161015611767578360ff603f198401166020811061173357fe5b8260ff605f19840116600c811061173357fe5b949350505050565b60035481565b60045481565b600054600160a060020a031633146117a557600080fd5b600654606060020a900460ff1680156117d257506006546d0100000000000000000000000000900460ff16155b15156117dd57600080fd5b6006805461ffff90921660d060020a027fffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b600054600160a060020a0316331461183057600080fd5b600680546dff00000000000000000000000000196cff00000000000000000000000019909116606060020a17166d010000000000000000000000000017905542600255600754303181151561188157fe5b04600155565b600654606060020a900460ff161580156118a757503466b1a2bc2ec50000145b80156118cd575033600090815260086020526040902060030154606060020a900460ff16155b15156118d857600080fd5b3360008181526008602052604081209586556001808701959095556002860193909355600390940180546cff0000000000000000000000001960a060020a9093046bffffffffffffffffffffffff199091161791909116606060020a17905560078054928301815590527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018054600160a060020a0319169091179055565b600060208260ff16101580156119905750606c8260ff16105b151561199857fe5b60408260ff1610156119ce5760045460ff601f19840116602081106119b957fe5b1a60f860020a0260f860020a90049050611a0a565b60608260ff1610156119ef5760055460ff603f19840116602081106119b957fe5b60065460a060020a0260ff605f19840116600c81106119b957fe5b919050565b6007805482908110611a1d57fe5b600091825260209091200154600160a060020a0316905081565b6101e060405190810160405280600f906020820280388339509192915050565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152905600a165627a7a723058204827e58c66ef6f002c7fad84473f238246be6d5dc6b5a2565ef62f22825181220029

   Swarm Source:
bzzr://4827e58c66ef6f002c7fad84473f238246be6d5dc6b5a2565ef62f2282518122

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.