Contract 0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed810

Contract Overview

Balance:
0 Ether
TxHash Block Age From To Value [TxFee]
0x9168965d965fa49d6a1aa2d76ad7e2a478bce76d1cc1e7b95b335e4f1b01883a2981919188 days 12 hrs ago0x0f7665034c4b0fef23052c2038e0a1bbfe28d4bb IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000091395
0xe035604540caad9c8f532d224c6ec4e46c2593107418b9142655437ba91653cd2981901188 days 12 hrs ago0x753c71f4d7b7c5f40fbb679d24414ca341b2d6c2 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000344364
0x0a00f18b1903b01881056bfc1ff7f6dbd0150d7eda6fe8ac1a9ce3d163565d7b2981901188 days 12 hrs ago0x1ed23ae646629ee58b9ad5eacec4c2939d49c03e IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397575
0x555059fa119d522ffd93d1bb89d10a97505408e06b57e7630a332359e28ee8d82981900188 days 12 hrs ago0xde8b575aaa161a211a9d80501d40f0b08dda06e6 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397575
0x4ec5da3ce553b52bd54f76ccb1fda1a56356a0a747f7b618e2b9657300478f3c2981898188 days 12 hrs ago0xa9d00f2d1eb8b038ea7ff472a6da00d667761fc9 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000344364
0xb932f94ea583b86983055efc9a624d7559d4e34ccedd5caca4dcc3005c36f6b02981888188 days 12 hrs ago0x0f7665034c4b0fef23052c2038e0a1bbfe28d4bb IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000091459
0x1da791be2882d56871a59387a44314b1f5cebd22e9b08a5ff69f335c622f041b2981887188 days 12 hrs ago0x29ac34150957d043757595c7fd550621820287b9 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397639
0x6afbd1ffdcae0c598099ca9d83da58b3dbff08e4a8799e79391e9bc65879e9552981887188 days 12 hrs ago0xa9d00f2d1eb8b038ea7ff472a6da00d667761fc9 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000344428
0x8755159fb463a10b879adf2cce0d104dd391fab73c5236d65592ecd52b00feb42981887188 days 12 hrs ago0x1ed23ae646629ee58b9ad5eacec4c2939d49c03e IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397639
0x4d6432677b0f39390e13ab4cfbf3e3fcae95a9a455ad2f7566f7037a90feed2f2981887188 days 12 hrs ago0xde8b575aaa161a211a9d80501d40f0b08dda06e6 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397639
0xce33c4f931a07b199892b8955b442e157e490c864782fb372276761415f136f42981887188 days 12 hrs ago0x753c71f4d7b7c5f40fbb679d24414ca341b2d6c2 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000344428
0x9cfa56cb25ae623ed5cc1bcff4ed38d265d13caad440a4ded858fab3e548b3d42981886188 days 12 hrs ago0x0f7665034c4b0fef23052c2038e0a1bbfe28d4bb IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000091395
0xf2de6aa4ab40cbe793e7069fc17872651c2ec100dd1824e63204678d540706132981853188 days 12 hrs ago0x753c71f4d7b7c5f40fbb679d24414ca341b2d6c2 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000158179
0xfbc89a0f8a681f81ebfd0be318542893afd67490541e89bd0b088046df2c55e02981853188 days 12 hrs ago0xa9d00f2d1eb8b038ea7ff472a6da00d667761fc9 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000344428
0x13b89475a1fa5deebf05b0e128116bc5fc1ce67f33ec4e559e3079ed884707ee2981853188 days 12 hrs ago0xde8b575aaa161a211a9d80501d40f0b08dda06e6 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397639
0x15d4b004693873c89c5d49a2565d1349594d0c9c333c3192c28a449ca1f9b78a2981853188 days 12 hrs ago0x1ed23ae646629ee58b9ad5eacec4c2939d49c03e IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397639
0x75192a823a8c8246aa62cba52f5a87e52e2a895220ceb55c56219fcfeb0e5ffb2981779188 days 12 hrs ago0x0f7665034c4b0fef23052c2038e0a1bbfe28d4bb IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000091459
0xc90a890fec6ff49ca66cb43effeb99285c7697007af35f9688642a250c47ee4d2979433188 days 22 hrs ago0x0f7665034c4b0fef23052c2038e0a1bbfe28d4bb IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000091459
0x2088af75aae7e823d992adbe3e428714b7188ddafb98412afe0b3a09d2fdb4e92979414188 days 22 hrs ago0x29ac34150957d043757595c7fd550621820287b9 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397575
0x152b600bea3772653c68886c2eafee5695e37958039aa0e7d20e1337543536052979413188 days 22 hrs ago0xa9d00f2d1eb8b038ea7ff472a6da00d667761fc9 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397575
0x34e703d212bebdc6e10a2c6c4377a02b99189b56adee6846f2e359651a1731732979413188 days 22 hrs ago0x1ed23ae646629ee58b9ad5eacec4c2939d49c03e IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000291717
0x6043083333879f7a8bef92b4da7da62a173aaa5737fe3b53c97105998ce5f1622979413188 days 22 hrs ago0xde8b575aaa161a211a9d80501d40f0b08dda06e6 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000397575
0xfc9f46aca2e121545d08ca3abc3f737004fc6602ffeb2c656ddb1406ce94b34f2979413188 days 22 hrs ago0x753c71f4d7b7c5f40fbb679d24414ca341b2d6c2 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000344364
0xad013014fe156b6827d5dfa244bbd109dcec8802ddff877bd39d67e1ce0069292979412188 days 22 hrs ago0x35dec0cd83c42c25589cf1865e7fb13193f15639 IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000291589
0xd66a00379277a9cce270caa191a466835b2234a2923a6cb91b2ed50d2c49b0fa2979407188 days 22 hrs ago0x0f7665034c4b0fef23052c2038e0a1bbfe28d4bb IN  0xfa31f56f6f5af3a9d8fdd99f0bd817d8ae9ed8100 Ether0.000091459
[ Download CSV Export 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)

Contract Name:
RaceBase

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes

Runs (Optimizer):
200

Contract Source Code

pragma solidity 0.4.24;

contract Rate {
  mapping(uint => mapping(bytes32 => uint)) public rates;

  function setRates(uint time, bytes32[] names, uint[] amounts) external {
    require(time % 5 == 0);
    require(names.length == amounts.length);
    for (uint i = 0; i < names.length; i++) {
      rates[time][names[i]] = amounts[i];
    }
  }

  function getRate(uint time, bytes32 name) public view returns (uint) {
    return rates[time][name];
  }

  function getRates(uint time, bytes32[] memory names) public view returns (uint[]) {
    uint[] memory amounts = new uint[](names.length);

    for (uint i = 0; i < names.length; i++) {
      amounts[i] = rates[time][names[i]];
    }

    return amounts;
  }
}

contract RaceCore {
    
  struct Player {
    uint id;
    uint portfolioElements;
    address addr;
    bytes32[] portfolioIndex;
        
    mapping(bytes32 => uint) portfolio;
  }
    
  struct Track {
    uint readyCount;
    uint duration;
    uint numPlayers;
    uint maxPlayers;
    uint betAmount;
    address[] playerAddresses;
    bool[] readyPlayers;
    
    mapping(address => Player) players;
  }
    
  struct RunningTrack {
    uint startTime;
  }
  
  mapping(bytes32 => Track) public tracks;
  mapping(bytes32 => mapping(address => uint)) public deposites;
  mapping(bytes32 => RunningTrack) public runningTracks;
}

contract RaceBase is RaceCore {

  Rate public rate;

  uint constant public MAX_PLAYERS_LIMIT = 10;
  
  modifier onlyFreeTrack(bytes32 _trackId) {
    require(tracks[_trackId].maxPlayers > tracks[_trackId].numPlayers);
    _;
  }

  event DebugUint(uint i);
  event DebugBytes(bytes32 b);
  event DebugArray(uint[] a);

  constructor (address _rateAddress) public {
    rate = Rate(_rateAddress);
  }

  // External functions
  function createTrack(bytes32 _trackId) external payable {
    require(tracks[_trackId].numPlayers == 0);

    tracks[_trackId] = createEmptyTrack(msg.value, 2, 3 minutes);
    Track storage t = tracks[_trackId];

    addPlayer(t, createPlayer(msg.sender, t.playerAddresses.length));

    deposites[_trackId][msg.sender] = msg.value;
  }

  function createTrackFromBack(bytes32 _trackId, uint _betAmount, uint _maxPlayers, uint _duration) external {
    require(tracks[_trackId].numPlayers == 0);
    require(MAX_PLAYERS_LIMIT >= _maxPlayers);

    tracks[_trackId] = createEmptyTrack(_betAmount, _maxPlayers, _duration);
  }

  function joinToTrack(bytes32 _id, bytes32[] names, uint[] values) external payable onlyFreeTrack(_id) {
    require(msg.value == tracks[_id].betAmount);
    Track storage t = tracks[_id];
    
    require(!(t.players[msg.sender].addr == msg.sender));
    require(!isReadyToStart(_id));
    addPlayer(t, createPlayer(msg.sender, t.playerAddresses.length));
    _setPortfolio(_id, names, values);
  }

  function withdrawRewards(bytes32 _trackId) external {
    Track storage t = tracks[_trackId];
    
    address[] memory winners = getWinners(_trackId);
    uint amount = (getBetAmount(_trackId) * t.numPlayers) / winners.length;
    uint i = 0;
    for(i = 0; i < t.playerAddresses.length; i++) {
      deposites[_trackId][t.playerAddresses[i]] = 0;
    }

    for (i = 0; i < winners.length; i++) {
      winners[i].transfer(amount);
    }
  }

  function setPortfolio(bytes32 _trackId, bytes32[] names, uint[] values) external {
    require(names.length == values.length);
    require(!isReadyToStart(_trackId));
      
    Track storage t = tracks[_trackId];
    Player storage p = t.players[msg.sender];
    p.portfolioElements = 0;
      
    uint totalPercent = 0;
    for (uint i = 0; i < names.length; i++) {
      require(values[i] > 0 && values[i] <= 100);
      require(!isNameExists(p.portfolioIndex, names[i], p.portfolioElements));
          
      p.portfolioIndex.push(names[i]);
      p.portfolio[names[i]] = values[i];
      p.portfolioElements++;
      totalPercent += values[i];
      require(totalPercent <= 100);
    }
      
    if (!t.readyPlayers[p.id]) {
      t.readyCount++;
      t.readyPlayers[p.id] = true;
    }
  }

  function startTrack(bytes32 _trackId, uint _start) external {
    if (tracks[_trackId].readyCount == tracks[_trackId].numPlayers) {
      if (_start % 5 == 0) {
        runningTracks[_trackId] = RunningTrack({startTime: _start});
      } else {
        runningTracks[_trackId] = RunningTrack({startTime: _start + (5 - (_start % 5))});
      }
    }
  }
  
  // External functions that are view
  // ...
  
  // External functions that are pure
  // ...
  
  // Public functions
  function getCountPlayerByTrackId(bytes32 _id) public view returns (uint) {
    return tracks[_id].playerAddresses.length;
  }
  
  function getCountReadyPlayerByTrackId(bytes32 _id) public view returns (uint) {
    return tracks[_id].readyCount;
  }
  
  function getTrackOwner(bytes32 _id) public view returns (address) {
    return tracks[_id].players[tracks[_id].playerAddresses[0]].addr;
  }
  
  function getPlayersByTrackId(bytes32 _id) public view returns (address[]) {
    address[] memory a = new address[](tracks[_id].playerAddresses.length);
      
    for (uint i = 0; i < tracks[_id].playerAddresses.length; i++) {
      a[i] = (tracks[_id].playerAddresses[i]);
    }
      
    return a;
  }

  function getPortfolio(bytes32 _trackId, address _addr) public view returns (bytes32[], uint[]) {
    bytes32[] memory n = new bytes32[](tracks[_trackId].players[_addr].portfolioElements);
    uint[] memory v = new uint[](tracks[_trackId].players[_addr].portfolioElements);
      
    for (uint i = 0; i < tracks[_trackId].players[_addr].portfolioElements; i++) {
      n[i] = tracks[_trackId].players[_addr].portfolioIndex[i];
      v[i] = tracks[_trackId].players[_addr].portfolio[n[i]];
    }
      
    return(n, v);
  }
  
  function isReadyToStart(bytes32 _trackId) public view returns (bool) {
    Track storage t = tracks[_trackId];
    
    return t.readyCount == t.maxPlayers;
  }

  function getBetAmount(bytes32 _trackId) public view returns (uint) {
    return tracks[_trackId].betAmount;
  }
  
  function isEndedTrack(bytes32 _trackId) public view returns (bool) {
    Track storage t = tracks[_trackId];
    return now > runningTracks[_trackId].startTime + t.duration;
  }

  function endTime(bytes32 _trackId) public view returns (uint) {
    Track storage t = tracks[_trackId];
    return runningTracks[_trackId].startTime + t.duration;
  }

  function getPlayers(bytes32 _trackId) public view returns(address[]) {
    return tracks[_trackId].playerAddresses;
  }

  function getWinners(bytes32 _trackId) public view returns (address[]) {
    (address[] memory players, int[] memory points) = getStats(_trackId);

    uint i = 0;
    uint w_min = 0;
    int tmpI;
    address tmpA;

    for(uint pos = 0; pos < points.length - 1; pos++) {
      w_min = pos;
      for(i = pos; i < points.length; i++) {
        if(points[i] < points[w_min]) {
          w_min = i;
        }
      }
      if(w_min == pos) continue;
      tmpI = points[pos];
      points[pos] = points[w_min];
      points[w_min] = tmpI;

      tmpA = players[pos];
      players[pos] = players[w_min];
      players[w_min] = tmpA;
    }

    i = 0;
    uint count = countWinners(points);
    address[] memory winners = new address[](count);

    for (pos = players.length - 1; pos >= players.length - count; pos--) {
      winners[i++] = players[pos];
    }

    return winners;
  }

  function getStat(bytes32 _trackId, address _player) public view returns (int) {
    Track memory t = tracks[_trackId];
    int points = 0;
    (bytes32[] memory names, uint[] memory amounts) = getPortfolio(_trackId, _player);
    uint[] memory ratesAtStart = rate.getRates(runningTracks[_trackId].startTime, names);
    uint[] memory ratesAtEnd = rate.getRates(runningTracks[_trackId].startTime + 300 seconds, names);

    for (uint i = 0; i < names.length; i++) {
      points += int(((ratesAtEnd[i] - ratesAtStart[i])* 1 ether * amounts[i])/ratesAtStart[i]);
    }

    return points;
  }

  function getStats(bytes32 _trackId) public view returns (address[], int[]) {
    Track memory t = tracks[_trackId];
    address[] memory players = new address[](t.playerAddresses.length);
    int[] memory points = new int[](t.playerAddresses.length);

    for (uint i = 0; i < t.playerAddresses.length; i++) {
      players[i] = t.playerAddresses[i];
      points[i] = getStat(_trackId, players[i]);
    }

    return (players, points);
  }
  
  // Internal functions
  function createPlayer(address _addr, uint _id) internal pure returns (Player) {
    return Player({addr: _addr, portfolioIndex: new bytes32[](0), portfolioElements: 0, id: _id});
  }

  function createEmptyTrack(uint _betAmount, uint _maxPlayers, uint _duration) internal view returns (Track) {
    return Track({
      playerAddresses: new address[](0),
      readyCount: 0,
      readyPlayers: new bool[](0),
      duration: _duration,
      numPlayers: 0,
      maxPlayers: _maxPlayers,
      betAmount: _betAmount
    });
  }

  function countWinners(int[] memory _points) internal pure returns (uint) {
    uint count = 1;
    for (uint i = _points.length - 2; i >= 0; i--) {
      if (_points[i] == _points[_points.length - 1]) {
        count++;
      } else {
        return count;
      }
    }

    return count;
  }
  
  function addPlayer(Track storage t, Player p) internal {
    t.players[p.addr] = p;
    t.playerAddresses.push(p.addr);
    t.readyPlayers.push(false);
    t.numPlayers++;
  }

  function isNameExists(bytes32[] storage names, bytes32 name, uint numNames) internal view returns (bool) {
    for (uint i = 0; i < numNames; i++) {
      if (names[i] == name) {
        return true;
      }
    }
      
    return false;
  }

  
  
  // Private functions
  function _setPortfolio(bytes32 _trackId, bytes32[] names, uint[] values) private {
    require(names.length == values.length);
    require(!isReadyToStart(_trackId));
      
    Track storage t = tracks[_trackId];
    Player storage p = t.players[msg.sender];
    p.portfolioElements = 0;
      
    uint totalPercent = 0;
    for (uint i = 0; i < names.length; i++) {
      require(values[i] > 0 && values[i] <= 100);
      require(!isNameExists(p.portfolioIndex, names[i], p.portfolioElements));
          
      p.portfolioIndex.push(names[i]);
      p.portfolio[names[i]] = values[i];
      p.portfolioElements++;
      totalPercent += values[i];
      require(totalPercent <= 100);
    }
      
    if (!t.readyPlayers[p.id]) {
      t.readyCount++;
      t.readyPlayers[p.id] = true;
    }
  }
}

Contract ABI

[{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"tracks","outputs":[{"name":"readyCount","type":"uint256"},{"name":"duration","type":"uint256"},{"name":"numPlayers","type":"uint256"},{"name":"maxPlayers","type":"uint256"},{"name":"betAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"getStats","outputs":[{"name":"","type":"address[]"},{"name":"","type":"int256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_PLAYERS_LIMIT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"createTrack","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"runningTracks","outputs":[{"name":"startTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"},{"name":"_player","type":"address"}],"name":"getStat","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"isEndedTrack","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"bytes32"},{"name":"names","type":"bytes32[]"},{"name":"values","type":"uint256[]"}],"name":"joinToTrack","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"getWinners","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"bytes32"}],"name":"getPlayersByTrackId","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackId","type":"bytes32"},{"name":"names","type":"bytes32[]"},{"name":"values","type":"uint256[]"}],"name":"setPortfolio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"withdrawRewards","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"getBetAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackId","type":"bytes32"},{"name":"_betAmount","type":"uint256"},{"name":"_maxPlayers","type":"uint256"},{"name":"_duration","type":"uint256"}],"name":"createTrackFromBack","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"getPlayers","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"}],"name":"isReadyToStart","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"bytes32"}],"name":"getCountPlayerByTrackId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trackId","type":"bytes32"},{"name":"_addr","type":"address"}],"name":"getPortfolio","outputs":[{"name":"","type":"bytes32[]"},{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"bytes32"}],"name":"getCountReadyPlayerByTrackId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trackId","type":"bytes32"},{"name":"_start","type":"uint256"}],"name":"startTrack","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"bytes32"}],"name":"getTrackOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"address"}],"name":"deposites","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_rateAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"i","type":"uint256"}],"name":"DebugUint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"b","type":"bytes32"}],"name":"DebugBytes","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"a","type":"uint256[]"}],"name":"DebugArray","type":"event"}]

Contract Creation Code

608060405234801561001057600080fd5b50604051602080611fb2833981016040525160038054600160a060020a031916600160a060020a03909216919091179055611f62806100506000396000f30060806040526004361061013d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630810900981146101425780630bb700dc146101855780631a6687ac146102365780631ac33b3d1461025d5780632c4e722e1461026a5780632e2219b11461029b5780632f2712f8146102b357806335a951b8146102d75780633c473336146102ef5780633fad87b31461031b5780634a61fc1e1461033e5780635c894469146103a65780636615e357146103be5780637dfb6626146103ee578063a469b80914610406578063a59b1ca81461041e578063af1e19d91461043f578063c65ad85c14610457578063d71331c21461046f578063d98c152414610487578063e0aa5654146104ab578063e6dab965146104c3578063e7ceaeab146104de578063ee9deb4f146104f6575b600080fd5b34801561014e57600080fd5b5061015a60043561051a565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b34801561019157600080fd5b5061019d600435610549565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156101e15781810151838201526020016101c9565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610220578181015183820152602001610208565b5050505090500194505050505060405180910390f35b34801561024257600080fd5b5061024b610780565b60408051918252519081900360200190f35b610268600435610785565b005b34801561027657600080fd5b5061027f610869565b60408051600160a060020a039092168252519081900360200190f35b3480156102a757600080fd5b5061024b600435610878565b3480156102bf57600080fd5b5061024b600435600160a060020a036024351661088a565b3480156102e357600080fd5b5061024b600435610d08565b3480156102fb57600080fd5b50610307600435610d28565b604080519115158252519081900360200190f35b610268600480359060248035808201929081013591604435908101910135610d4a565b34801561034a57600080fd5b50610356600435610e58565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561039257818101518382015260200161037a565b505050509050019250505060405180910390f35b3480156103b257600080fd5b50610356600435611087565b3480156103ca57600080fd5b50610268600480359060248035808201929081013591604435908101910135611155565b3480156103fa57600080fd5b50610268600435611356565b34801561041257600080fd5b5061024b60043561145d565b34801561042a57600080fd5b50610268600435602435604435606435611472565b34801561044b57600080fd5b50610356600435611514565b34801561046357600080fd5b50610307600435611581565b34801561047b57600080fd5b5061024b60043561159a565b34801561049357600080fd5b5061019d600435600160a060020a03602435166115af565b3480156104b757600080fd5b5061024b600435611759565b3480156104cf57600080fd5b5061026860043560243561176b565b3480156104ea57600080fd5b5061027f6004356117e3565b34801561050257600080fd5b5061024b600435600160a060020a036024351661183f565b600060208190529081526040902080546001820154600283015460038401546004909401549293919290919085565b606080610554611cfe565b600084815260208181526040808320815160e0810183528154815260018201548185015260028201548184015260038201546060828101919091526004830154608083015260058301805485518188028101880190965280865291968796909593949360a08601939092918301828280156105f857602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116105da575b505050505081526020016006820180548060200260200160405190810160405280929190818152602001828054801561067057602002820191906000526020600020906000905b825461010083900a900460ff16151581526020600192830181810494850194909303909202910180841161063f5790505b50505050508152505093508360a00151516040519080825280602002602001820160405280156106aa578160200160208202803883390190505b5092508360a00151516040519080825280602002602001820160405280156106dc578160200160208202803883390190505b509150600090505b8360a00151518110156107745760a084015180518290811061070257fe5b90602001906020020151838281518110151561071a57fe5b600160a060020a03909216602092830290910190910152825161075490889085908490811061074557fe5b9060200190602002015161088a565b828281518110151561076257fe5b602090810290910101526001016106e4565b50909590945092505050565b600a81565b600081815260208190526040812060020154156107a157600080fd5b6107ae34600260b461185c565b6000838152602081815260409182902083518155838201516001820155918301516002830155606083015160038301556080830151600483015560a083015180516107ff9260058501920190611d3c565b5060c0820151805161081b916006840191602090910190611dae565b5050506000828152602081905260409020600581015490915061084a9082906108459033906118f7565b61193c565b5060009081526001602090815260408083203384529091529020349055565b600354600160a060020a031681565b60026020526000908152604090205481565b6000610894611cfe565b600084815260208181526040808320815160e0810183528154815260018201548185015260028201548184015260038201546060828101919091526004830154608083015260058301805485518188028101880190965280865291958695869586958a959094919360a086019392919083018282801561093d57602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161091f575b50505050508152602001600682018054806020026020016040519081016040528092919081815260200182805480156109b557602002820191906000526020600020906000905b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116109845790505b5050505050815250509650600095506109ce8a8a6115af565b60035460008d81526002602090815260408083205481517f1a3e7b040000000000000000000000000000000000000000000000000000000081526004810182815260248201938452885160448301528851989d50969b50600160a060020a0390951696631a3e7b049691958d95929460649091019281870192909102908190849084905b83811015610a6a578181015183820152602001610a52565b505050509050019350505050600060405180830381600087803b158015610a9057600080fd5b505af1158015610aa4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610acd57600080fd5b810190808051640100000000811115610ae557600080fd5b82016020810184811115610af857600080fd5b8151856020820283011164010000000082111715610b1557600080fd5b505060035460008f81526002602090815260408083205481517f1a3e7b0400000000000000000000000000000000000000000000000000000000815261012c90910160048201818152602483019384528f5160448401528f51979d50600160a060020a039096169950631a3e7b04985096508d9591936064909101928681019202908190849084905b83811015610bb6578181015183820152602001610b9e565b505050509050019350505050600060405180830381600087803b158015610bdc57600080fd5b505af1158015610bf0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610c1957600080fd5b810190808051640100000000811115610c3157600080fd5b82016020810184811115610c4457600080fd5b8151856020820283011164010000000082111715610c6157600080fd5b5090955060009450505050505b8451811015610cfa578281815181101515610c8557fe5b906020019060200201518482815181101515610c9d57fe5b906020019060200201518483815181101515610cb557fe5b906020019060200201518484815181101515610ccd57fe5b9060200190602002015103670de0b6b3a76400000202811515610cec57fe5b049590950194600101610c6e565b509398975050505050505050565b600090815260208181526040808320600101546002909252909120540190565b6000908152602081815260408083206001015460029092529091205401421190565b60008581526020819052604081206002810154600390910154879110610d6f57600080fd5b6000878152602081905260409020600401543414610d8c57600080fd5b6000878152602081815260408083203380855260078201909352922060020154919350600160a060020a039091161415610dc557600080fd5b610dce87611581565b15610dd857600080fd5b610ded826108453385600501805490506118f7565b610e4f878787808060200260200160405190810160405280939291908181526020018383602002808284375050604080516020808d0282810182019093528c82529095508c94508b935083925085019084908082843750611a30945050505050565b50505050505050565b60608060606000806000806000806060610e718b610549565b985098506000965060009550600092505b6001885103831015610fde578295508296505b8751871015610ee3578786815181101515610eac57fe5b906020019060200201518888815181101515610ec457fe5b906020019060200201511215610ed8578695505b600190960195610e95565b82861415610ef057610fd3565b8783815181101515610efe57fe5b9060200190602002015194508786815181101515610f1857fe5b906020019060200201518884815181101515610f3057fe5b6020908102909101015287518590899088908110610f4a57fe5b602090810290910101528851899084908110610f6257fe5b9060200190602002015193508886815181101515610f7c57fe5b906020019060200201518984815181101515610f9457fe5b600160a060020a03909216602092830290910190910152885184908a9088908110610fbb57fe5b600160a060020a039092166020928302909101909101525b600190920191610e82565b60009650610feb88611c47565b915081604051908082528060200260200182016040528015611017578160200160208202803883390190505b509050600189510392505b8851829003831061107957888381518110151561103b57fe5b60209081029091010151815160018901988391811061105657fe5b600160a060020a0390921660209283029091019091015260001990920191611022565b9a9950505050505050505050565b60008181526020818152604080832060050154815181815281840281019093019091526060928392909180156110c7578160200160208202803883390190505b509150600090505b60008481526020819052604090206005015481101561114a57600084815260208190526040902060050180548290811061110557fe5b6000918252602090912001548251600160a060020a039091169083908390811061112b57fe5b600160a060020a039092166020928302909101909101526001016110cf565b8192505b5050919050565b600080808086851461116657600080fd5b61116f89611581565b1561117957600080fd5b5050506000868152602081815260408083203384526007810190925282206001810183905590925090805b868110156112cc5760008686838181106111ba57fe5b905060200201351180156111e1575060648686838181106111d757fe5b9050602002013511155b15156111ec57600080fd5b611214600384018989848181106111ff57fe5b90506020020135600019168560010154611cb2565b1561121e57600080fd5b6003830188888381811061122e57fe5b8354600181018555600094855260209485902091909402929092013591909201555085858281811061125c57fe5b905060200201358360040160008a8a85818110151561127757fe5b60209081029290920135835250810191909152604001600020556001808401805490910190558585828181106112a957fe5b9050602002013582019150606482111515156112c457600080fd5b6001016111a4565b825460068501805490919081106112df57fe5b90600052602060002090602091828204019190069054906101000a900460ff16151561134b578354600190810185558354600686018054909190811061132157fe5b90600052602060002090602091828204019190066101000a81548160ff0219169083151502179055505b505050505050505050565b6000818152602081905260408120906060908061137285610e58565b9250825184600201546113848761145d565b0281151561138e57fe5b049150600090505b60058401548110156113f0576000858152600160205260408120600586018054839190859081106113c357fe5b6000918252602080832090910154600160a060020a03168352820192909252604001902055600101611396565b5060005b825181101561145657828181518110151561140b57fe5b90602001906020020151600160a060020a03166108fc839081150290604051600060405180830381858888f1935050505015801561144d573d6000803e3d6000fd5b506001016113f4565b5050505050565b60009081526020819052604090206004015490565b6000848152602081905260409020600201541561148e57600080fd5b600a82111561149c57600080fd5b6114a783838361185c565b6000858152602081815260409182902083518155838201516001820155918301516002830155606083015160038301556080830151600483015560a083015180516114f89260058501920190611d3c565b5060c08201518051610e4f916006840191602090910190611dae565b6000818152602081815260409182902060050180548351818402810184019094528084526060939283018282801561157557602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611557575b50505050509050919050565b6000908152602081905260409020600381015490541490565b60009081526020819052604090206005015490565b600082815260208181526040808320600160a060020a03851684526007018252808320600101548151818152818402810190930190915260609283928392839291908015611607578160200160208202803883390190505b50600088815260208181526040808320600160a060020a038b16845260070182529182902060010154825181815281830281019092019092529194508015611659578160200160208202803883390190505b509150600090505b600087815260208181526040808320600160a060020a038a16845260070190915290206001015481101561077457600087815260208181526040808320600160a060020a038a16845260070190915290206003018054829081106116c157fe5b906000526020600020015483828151811015156116da57fe5b602090810290910181019190915260008881528082526040808220600160a060020a038a16835260070190925290812084516004909101919085908490811061171f57fe5b6020908102909101810151825281019190915260400160002054825183908390811061174757fe5b60209081029091010152600101611661565b60009081526020819052604090205490565b60008281526020819052604090206002810154905414156117df576005810615156117b55760408051602081810183528382526000858152600290915291909120905190556117df565b60408051602081019091528060058306600503830190526000838152600260205260409020905190555b5050565b60008181526020819052604081206005810180546007909201918391908290811061180a57fe5b6000918252602080832090910154600160a060020a039081168452908301939093526040909101902060020154169050919050565b600160209081526000928352604080842090915290825290205481565b611864611cfe565b60e060405190810160405280600081526020018381526020016000815260200184815260200185815260200160006040519080825280602002602001820160405280156118bb578160200160208202803883390190505b50815260200160006040519080825280602002602001820160405280156118ec578160200160208202803883390190505b509052949350505050565b6118ff611e4f565b506040805160808101825291825260006020808401829052600160a060020a03949094168383015281519081529283019052606081019190915290565b60408181018051600160a060020a03908116600090815260078601602090815293902084518155838501516001820155915160028301805473ffffffffffffffffffffffffffffffffffffffff1916919092161790556060830151805184936119ac926003850192910190611e81565b505050604001516005820180546001808201835560009283526020808420909201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0390951694909417909355600684018054808501825590835291819020908204018054601f9092166101000a60ff02199091169055600290910180549091019055565b60008060008084518651141515611a4657600080fd5b611a4f87611581565b15611a5957600080fd5b5050506000848152602081815260408083203384526007810190925282206001810183905590925090805b8551811015611bc05760008582815181101515611a9d57fe5b90602001906020020151118015611acc575060648582815181101515611abf57fe5b9060200190602002015111155b1515611ad757600080fd5b611b00836003018783815181101515611aec57fe5b906020019060200201518560010154611cb2565b15611b0a57600080fd5b826003018682815181101515611b1c57fe5b6020908102909101810151825460018101845560009384529190922001558451859082908110611b4857fe5b906020019060200201518360040160008884815181101515611b6657fe5b60209081029091018101518252810191909152604001600020556001808401805490910190558451859082908110611b9a57fe5b906020019060200201518201915060648211151515611bb857600080fd5b600101611a84565b82546006850180549091908110611bd357fe5b90600052602060002090602091828204019190069054906101000a900460ff161515610e4f5783546001908101855583546006860180549091908110611c1557fe5b90600052602060002090602091828204019190066101000a81548160ff02191690831515021790555050505050505050565b8051600090600190600119015b6000811061114a57835184906000198101908110611c6e57fe5b906020019060200201518482815181101515611c8657fe5b906020019060200201511415611ca157600190910190611ca9565b81925061114e565b60001901611c54565b6000805b82811015611cf15784548490869083908110611cce57fe5b6000918252602090912001541415611ce95760019150611cf6565b600101611cb6565b600091505b509392505050565b60e060405190810160405280600081526020016000815260200160008152602001600081526020016000815260200160608152602001606081525090565b828054828255906000526020600020908101928215611d9e579160200282015b82811115611d9e578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909116178255602090920191600190910190611d5c565b50611daa929150611eca565b5090565b82805482825590600052602060002090601f01602090048101928215611e435791602002820160005b83821115611e1457835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302611dd7565b8015611e415782816101000a81549060ff0219169055600101602081600001049283019260010302611e14565b505b50611daa929150611efe565b60806040519081016040528060008152602001600081526020016000600160a060020a03168152602001606081525090565b828054828255906000526020600020908101928215611ebe579160200282015b82811115611ebe5782518255602090920191600190910190611ea1565b50611daa929150611f1c565b611efb91905b80821115611daa57805473ffffffffffffffffffffffffffffffffffffffff19168155600101611ed0565b90565b611efb91905b80821115611daa57805460ff19168155600101611f04565b611efb91905b80821115611daa5760008155600101611f225600a165627a7a7230582023ac2da9c56e34ecd9f5a83029579de8d8457bcdbd34c09ad284c0fbac62c5c50029000000000000000000000000e0c55a745f5170c706e188ccc654d9490db20011

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000e0c55a745f5170c706e188ccc654d9490db20011

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e0c55a745f5170c706e188ccc654d9490db20011

Swarm Source

bzzr://23ac2da9c56e34ecd9f5a83029579de8d8457bcdbd34c09ad284c0fbac62c5c5
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward