Contract 0x7a093232C5cda300d0dB956BAeF268A523Aa7C68

 

Contract Overview

Balance:
0.00002050252882564 Ether

EtherValue:
$0.06 (@ $3,158.05/ETH)

Token:
Txn Hash Method
Block
From
To
Value
0x0f9e73a7ffce1a689d3887ff08d0b15f7732aacb0c908334a4ff1be914afc3b2Clear Fund75493292019-04-11 22:10:55899 days 3 hrs ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0002659244
0x07745314a99634d73b254720c908d11a37bc8e52ba823c449353883e9c5a03c0Clear Fund75493282019-04-11 22:10:31899 days 3 hrs ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0002659244
0x994c4acde82c0d162e4e30addd6535f9df9407e05637bbeffb60043989793317Clear Fund75493252019-04-11 22:09:31899 days 3 hrs ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0002659244
0x5099f9b76d03a44522649715c4725b6b3bfd5b89fbe16431e4e7ab8d693588b9Clear Fund75493242019-04-11 22:09:26899 days 3 hrs ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0002659244
0x858c6b4c6ccaf213c769898d9921b83a871f963b4a3d5a1472c7d70384a2544aClear Fund73528552019-03-12 7:02:56929 days 19 hrs ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003988866
0xf356308337838a1a8c16f6a4787a9c5cabe7d31ad770faa4442a5d7a4facec71Clear Fund73528532019-03-12 7:02:37929 days 19 hrs ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003988866
0x656b0f77bdeab1600e17cd10adac9fee0dd942da388938f394372f652fc437ebClear Fund73078922019-03-05 7:00:22936 days 19 hrs ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0001994433.000000009
0x192a9cc6cb5e21b7a09fb5693dbc58555f0d1ee80da2a4bf95ace55bce0f45daWithdraw73038572019-03-04 15:50:41937 days 10 hrs ago0x5e65923dd445fd8f68b0b0cdc1ba738ba6501c29 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003697155
0xc6b3c3f7f05d41c854cef704db8b8ae2534e59499b32611e459fd62b53f18f12Withdraw73036802019-03-04 15:17:00937 days 10 hrs ago0x5e65923dd445fd8f68b0b0cdc1ba738ba6501c29 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003697155
0x35d3ea0fca25c4b294160e6ef6673765e056aa35c644eeb802f24066b182a200Withdraw73036772019-03-04 15:16:34937 days 10 hrs ago0x5e65923dd445fd8f68b0b0cdc1ba738ba6501c29 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003697155
0x3ebf5a49508b24fad974a3b4aec2a991369b46817254a7932e3847af0468effeWithdraw73036732019-03-04 15:14:59937 days 10 hrs ago0x5e65923dd445fd8f68b0b0cdc1ba738ba6501c29 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003697155
0x8302d6941b3b80908890b7ba479e7aabae7c44eeb17e32a9b901ea9e7f3f13b4Withdraw73024172019-03-04 10:31:41937 days 15 hrs ago0x526b27b0b2430850cee795c3778cd37a19cf882a IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0005336586
0x55d377397ee178e4d57afcd76c24371cd49a478d484fa8b9216c941a4397223aWithdraw73024152019-03-04 10:31:12937 days 15 hrs ago0x77c18f0903e0576298b28e9c1ec1af64f961196f IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0004436586
0x72739f5333fdcdb9357b78273c03e1e18958ec204f7e450573753a295d093c82Withdraw73024132019-03-04 10:30:34937 days 15 hrs ago0x526b27b0b2430850cee795c3778cd37a19cf882a IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0004436586
0xfa8cc790ed385f1a97a8c6bb0590ba6a70b5f031eda02568976ec9b6b69f637fWithdraw73024112019-03-04 10:30:09937 days 15 hrs ago0x77c18f0903e0576298b28e9c1ec1af64f961196f IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0004436586
0xb92f1820d9797afc84cd7396ca428ea1f609bfe8e9385f05bdaa50f094c82453Withdraw73024092019-03-04 10:28:47937 days 15 hrs ago0x526b27b0b2430850cee795c3778cd37a19cf882a IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.00042886945.8
0xfe6d5973176b7f4a44657d496580dbc8ce654fb2846301b4cea18ca6ef15cd23Withdraw73024072019-03-04 10:28:40937 days 15 hrs ago0x77c18f0903e0576298b28e9c1ec1af64f961196f IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.00042886945.8
0x7fe773dcb1380ff21ebc44b1d8e3b5dce1eeb7dcb5847cef1b4aeff78160e157Withdraw73024052019-03-04 10:28:05937 days 15 hrs ago0x526b27b0b2430850cee795c3778cd37a19cf882a IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003697155
0xfd38377de6794289b4a7263dd47b1c36cfcad95d30cb0bda180d9f33e23402abWithdraw73024032019-03-04 10:27:33937 days 15 hrs ago0x77c18f0903e0576298b28e9c1ec1af64f961196f IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003697155
0x3ddc1357652c8b168d651fd73b5b67d69a612227e1a1e8343bae106b3850e578Withdraw73024012019-03-04 10:27:06937 days 15 hrs ago0x526b27b0b2430850cee795c3778cd37a19cf882a IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003697155
0xf152109068aa74515c08e0b4fa058fa38676b40d9843b646129e19bde5fdf289Withdraw73023992019-03-04 10:26:38937 days 15 hrs ago0x77c18f0903e0576298b28e9c1ec1af64f961196f IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0003697155
0x2e3b9b309ce497caa9e45807f13f8b230ecb1a970dd6d816fd26196e6e9c1298Withdraw73003372019-03-04 2:38:00937 days 23 hrs ago0x8a00a0aca7ed024c6ebbb9a7046fc691145d7ff8 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.00115625913
0x12a30ea3c6af7da946f81869643d7e9ddac8777f3a0fe2c8f3ff1cf3616a70a5Settle Game73003312019-03-04 2:36:45937 days 23 hrs ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0004366364
0x0c1ff0da45dbf4cb602e4e3103d331ecf3db2cd9c88306cbc6578f988c47cb5aWithdraw73002292019-03-04 2:11:03937 days 23 hrs ago0x8a00a0aca7ed024c6ebbb9a7046fc691145d7ff8 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.00115625913
0x3721a8814163bf924fdd35d189db75fa85c013fba8b6120bd8510a474189683aSettle Game73002062019-03-04 2:06:09938 days ago0xe0b005384df8f4d80e9a69b6210ec1929a935d97 IN  0x7a093232c5cda300d0db956baef268a523aa7c680 Ether0.0006558186
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x0f9e73a7ffce1a689d3887ff08d0b15f7732aacb0c908334a4ff1be914afc3b275493292019-04-11 22:10:55899 days 3 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0x3a2321ddc991c50518969b93d2c6b76bf53097900.000648564200507195 Ether
0x07745314a99634d73b254720c908d11a37bc8e52ba823c449353883e9c5a03c075493282019-04-11 22:10:31899 days 3 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0x3a2321ddc991c50518969b93d2c6b76bf53097900.000609535634497212 Ether
0x994c4acde82c0d162e4e30addd6535f9df9407e05637bbeffb6004398979331775493252019-04-11 22:09:31899 days 3 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0x3a2321ddc991c50518969b93d2c6b76bf53097900.001219012816111737 Ether
0x5099f9b76d03a44522649715c4725b6b3bfd5b89fbe16431e4e7ab8d693588b975493242019-04-11 22:09:26899 days 3 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0x3a2321ddc991c50518969b93d2c6b76bf53097900.154697330081443765 Ether
0x858c6b4c6ccaf213c769898d9921b83a871f963b4a3d5a1472c7d70384a2544a73528552019-03-12 7:02:56929 days 19 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0x3a2321ddc991c50518969b93d2c6b76bf53097900.003400543379324194 Ether
0xf356308337838a1a8c16f6a4787a9c5cabe7d31ad770faa4442a5d7a4facec7173528532019-03-12 7:02:37929 days 19 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0x3a2321ddc991c50518969b93d2c6b76bf53097900.048886985231858072 Ether
0x656b0f77bdeab1600e17cd10adac9fee0dd942da388938f394372f652fc437eb73078922019-03-05 7:00:22936 days 19 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0x3a2321ddc991c50518969b93d2c6b76bf53097900.006962988924389838 Ether
0x192a9cc6cb5e21b7a09fb5693dbc58555f0d1ee80da2a4bf95ace55bce0f45da73038572019-03-04 15:50:41937 days 10 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x5e65923dd445fd8f68b0b0cdc1ba738ba6501c290.011344970420765569 Ether
0xc6b3c3f7f05d41c854cef704db8b8ae2534e59499b32611e459fd62b53f18f1273036802019-03-04 15:17:00937 days 10 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x5e65923dd445fd8f68b0b0cdc1ba738ba6501c290.004226900431583999 Ether
0x35d3ea0fca25c4b294160e6ef6673765e056aa35c644eeb802f24066b182a20073036772019-03-04 15:16:34937 days 10 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x5e65923dd445fd8f68b0b0cdc1ba738ba6501c290.210016530286792595 Ether
0x3ebf5a49508b24fad974a3b4aec2a991369b46817254a7932e3847af0468effe73036732019-03-04 15:14:59937 days 10 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x5e65923dd445fd8f68b0b0cdc1ba738ba6501c290.200266408413315991 Ether
0x8302d6941b3b80908890b7ba479e7aabae7c44eeb17e32a9b901ea9e7f3f13b473024172019-03-04 10:31:41937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x526b27b0b2430850cee795c3778cd37a19cf882a1.390373099568415947 Ether
0x55d377397ee178e4d57afcd76c24371cd49a478d484fa8b9216c941a4397223a73024152019-03-04 10:31:12937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x77c18f0903e0576298b28e9c1ec1af64f961196f2.118698390027060859 Ether
0x72739f5333fdcdb9357b78273c03e1e18958ec204f7e450573753a295d093c8273024132019-03-04 10:30:34937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x526b27b0b2430850cee795c3778cd37a19cf882a1.17386225866849104 Ether
0xfa8cc790ed385f1a97a8c6bb0590ba6a70b5f031eda02568976ec9b6b69f637f73024112019-03-04 10:30:09937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x77c18f0903e0576298b28e9c1ec1af64f961196f0.442922818160198266 Ether
0xb92f1820d9797afc84cd7396ca428ea1f609bfe8e9385f05bdaa50f094c8245373024092019-03-04 10:28:47937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x526b27b0b2430850cee795c3778cd37a19cf882a1.613642422048449597 Ether
0xfe6d5973176b7f4a44657d496580dbc8ce654fb2846301b4cea18ca6ef15cd2373024072019-03-04 10:28:40937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x77c18f0903e0576298b28e9c1ec1af64f961196f0.554063860797591229 Ether
0x7fe773dcb1380ff21ebc44b1d8e3b5dce1eeb7dcb5847cef1b4aeff78160e15773024052019-03-04 10:28:05937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x526b27b0b2430850cee795c3778cd37a19cf882a0.638251054821842628 Ether
0xfd38377de6794289b4a7263dd47b1c36cfcad95d30cb0bda180d9f33e23402ab73024032019-03-04 10:27:33937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x77c18f0903e0576298b28e9c1ec1af64f961196f0.787681900537111773 Ether
0x3ddc1357652c8b168d651fd73b5b67d69a612227e1a1e8343bae106b3850e57873024012019-03-04 10:27:06937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x526b27b0b2430850cee795c3778cd37a19cf882a0.840314155492892891 Ether
0xf152109068aa74515c08e0b4fa058fa38676b40d9843b646129e19bde5fdf28973023992019-03-04 10:26:38937 days 15 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x77c18f0903e0576298b28e9c1ec1af64f961196f1.019651831976192914 Ether
0x2e3b9b309ce497caa9e45807f13f8b230ecb1a970dd6d816fd26196e6e9c129873003372019-03-04 2:38:00937 days 23 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x8a00a0aca7ed024c6ebbb9a7046fc691145d7ff80.891283591586683987 Ether
0x0c1ff0da45dbf4cb602e4e3103d331ecf3db2cd9c88306cbc6578f988c47cb5a73002292019-03-04 2:11:03937 days 23 hrs ago 0x7a093232c5cda300d0db956baef268a523aa7c680x8a00a0aca7ed024c6ebbb9a7046fc691145d7ff81.066783469713207396 Ether
0x0c33c1514f0ec81d2314857f4008bc73863d00ca1c27f60a0ef62537dc9eb0bf73001322019-03-04 1:50:08938 days 16 mins ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0x3a2321ddc991c50518969b93d2c6b76bf53097900.002879999999999999 Ether
0x0c33c1514f0ec81d2314857f4008bc73863d00ca1c27f60a0ef62537dc9eb0bf73001322019-03-04 1:50:08938 days 16 mins ago 0x7a093232c5cda300d0db956baef268a523aa7c68 0xb440cf08bc2c78c33f3d29726d6c8ba5cbaa4b910.004319999999999999 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FomoSport

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-10-09
*/

pragma solidity 0.4.25;

/// @title Events used in FomoSport
contract FSEvents {

    event onGameCreated(
        uint256 indexed gameID,
        uint256 timestamp
    );

    event onGameActivated(
        uint256 indexed gameID,
        uint256 startTime,
        uint256 timestamp
    );

    event onGamePaused(
        uint256 indexed gameID,
        bool paused,
        uint256 timestamp
    );

    event onChangeCloseTime(
        uint256 indexed gameID,
        uint256 closeTimestamp,
        uint256 timestamp
    );

    event onPurchase(
        uint256 indexed gameID,
        uint256 indexed playerID,
        address playerAddress,
        bytes32 playerName,
        uint256 teamID,
        uint256 ethIn,
        uint256 keysBought,
        uint256 affID,
        uint256 timestamp
    );

    event onComment(
        uint256 indexed gameID,
        uint256 indexed playerID,
        address playerAddress,
        bytes32 playerName,
        uint256 ethIn,
        string comment,
        uint256 timestamp
    );

    event onWithdraw(
        uint256 indexed gameID,
        uint256 indexed playerID,
        address playerAddress,
        bytes32 playerName,
        uint256 ethOut,
        uint256 timestamp
    );

    event onGameEnded(
        uint256 indexed gameID,
        uint256 winningTeamID,
        string comment,
        uint256 timestamp
    );

    event onGameCancelled(
        uint256 indexed gameID,
        string comment,
        uint256 timestamp
    );

    event onFundCleared(
        uint256 indexed gameID,
        uint256 fundCleared,
        uint256 timestamp
    );
}


/// @title A raffle system for sports betting, designed with FOMO elements
/// @notice This contract manages multiple games. Owner(s) can create games and
/// assign winning team for each game. Players can withdraw their winnings before
/// the deadline set by the owner(s). If there's no winning team, the owner(s)
/// can also cancel a game so the players get back their bettings (minus fees).
/// @dev The address of the forwarder, player book, and owner(s) are hardcoded.
/// Check 'TODO' before deploy.
contract FomoSport is FSEvents {
    using FSKeyCalc for *;
    using SafeMath for *;

    // TODO: check address!!
    FSInterfaceForForwarder constant private FSKingCorp = FSInterfaceForForwarder(0x3a2321DDC991c50518969B93d2C6B76bf5309790);
    FSBookInterface constant private FSBook = FSBookInterface(0xb440cF08BC2C78C33f3D29726d6c8ba5cBaA4B91);

    string constant public name_ = "FomoSport";
    uint256 public gameIDIndex_;
    
    // (gameID => gameData)
    mapping(uint256 => FSdatasets.Game) public game_;

    // (gameID => gameStatus)
    mapping(uint256 => FSdatasets.GameStatus) public gameStatus_;

    // (gameID => (teamID => teamData))
    mapping(uint256 => mapping(uint256 => FSdatasets.Team)) public teams_;

    // (playerID => (gameID => playerData))
    mapping(uint256 => mapping(uint256 => FSdatasets.Player)) public players_;

    // (playerID => (gameID => (teamID => playerTeamData)))
    mapping(uint256 => mapping(uint256 => mapping(uint256 => FSdatasets.PlayerTeam))) public playerTeams_;

    // (gameID => (commentID => commentData))
    mapping(uint256 => mapping(uint256 => FSdatasets.PlayerComment)) public playerComments_;

    // (gameID => numberOfComments)
    mapping(uint256 => uint256) public playerCommentsIndex_;


    constructor() public {
        gameIDIndex_ = 1;
    }


    /// @notice Create a game. Only owner(s) can call this function.
    /// Emits "onGameCreated" event.
    /// @param _name Name of the new game.
    /// @param _teamNames Array consisting names of all teams in the game.
    /// The size of the array indicates the number of teams in this game.
    /// @return Game ID of the newly created game.
    function createGame(string _name, bytes32[] _teamNames)
        external
        isHuman()
        isOwner()
        returns(uint256)
    {
        uint256 _gameID = gameIDIndex_;
        gameIDIndex_++;

        // initialize game
        game_[_gameID].name = _name;

        // initialize each team
        uint256 _nt = _teamNames.length;
        require(_nt > 0, "number of teams must be larger than 0");

        game_[_gameID].numberOfTeams = _nt;
        for (uint256 i = 0; i < _nt; i++) {
            teams_[_gameID][i] = FSdatasets.Team(_teamNames[i], 0, 0, 0, 0);
        }

        emit onGameCreated(_gameID, now);

        return _gameID;
    }


    /// @notice Activate a game. Only owner(s) can do this.
    /// Players can start buying keys after start time.
    /// Emits "onGameActivated" event.
    /// @param _gameID Game ID of the game.
    /// @param _startTime Timestamp of the start time.
    function activate(uint256 _gameID, uint256 _startTime)
        external
        isHuman()
        isOwner()
    {
        require(_gameID < gameIDIndex_, "incorrect game id");
        require(game_[_gameID].gameStartTime == 0, "already activated");
        
        // TODO: do some initialization
        game_[_gameID].gameStartTime = _startTime;

        emit onGameActivated(_gameID, _startTime, now);
    }


    /// @notice Buy keys for each team.
    /// Emits "onPurchase" for each team with a purchase.
    /// Emits "onComment" if there's a valid comment.
    /// @param _gameID Game ID of the game to buy tickets.
    /// @param _teamEth Array consisting amount of ETH for each team to buy tickets.
    /// The size of the array must be the same as the number of teams.
    /// The paid ETH along with this function call must be the same as the sum of all
    /// ETH in this array.
    /// @param _affCode Affiliate code used for this transaction. Use 0 if no affiliate
    /// code is used.
    /// @param _comment A string comment passed along with this transaction. Only
    /// valid when paid more than 0.001 ETH.
    function buysXid(uint256 _gameID, uint256[] memory _teamEth, uint256 _affCode, string memory _comment)
        public
        payable
        isActivated(_gameID)
        isOngoing(_gameID)
        isNotPaused(_gameID)
        isNotClosed(_gameID)
        isHuman()
        isWithinLimits(msg.value)
    {
        // fetch player id
        uint256 _pID = FSBook.getPlayerID(msg.sender);
        
        uint256 _affID;
        if (_affCode != 0 && _affCode != _pID) {
            // update last affiliate 
            FSBook.setPlayerLAff(_pID, _affCode);
            _affID = _affCode;
        } else {
            _affID = FSBook.getPlayerLAff(_pID);
        }
        
        // purchase keys for each team
        buysCore(_gameID, _pID, _teamEth, _affID);

        // handle comment
        handleComment(_gameID, _pID, _comment);
    }


    /// @notice Pause a game. Only owner(s) can do this.
    /// Players can't buy tickets if a game is paused.
    /// Emits "onGamePaused" event.
    /// @param _gameID Game ID of the game.
    /// @param _paused "true" to pause this game, "false" to unpause.
    function pauseGame(uint256 _gameID, bool _paused)
        external
        isActivated(_gameID)
        isOngoing(_gameID)
        isOwner()
    {
        game_[_gameID].paused = _paused;

        emit onGamePaused(_gameID, _paused, now);
    }


    /// @notice Set a closing time for betting. Only owner(s) can do this.
    /// Players can't buy tickets for this game once the closing time is passed.
    /// Emits "onChangeCloseTime" event.
    /// @param _gameID Game ID of the game.
    /// @param _closeTime Timestamp of the closing time.
    function setCloseTime(uint256 _gameID, uint256 _closeTime)
        external
        isActivated(_gameID)
        isOngoing(_gameID)
        isOwner()
    {
        game_[_gameID].closeTime = _closeTime;

        emit onChangeCloseTime(_gameID, _closeTime, now);
    }


    /// @notice Select a winning team. Only owner(s) can do this.
    /// Players can't no longer buy tickets for this game once a winning team is selected.
    /// Players who bought tickets for the winning team are able to withdraw winnings.
    /// Emits "onGameEnded" event.
    /// @param _gameID Game ID of the game.
    /// @param _team Team ID of the winning team.
    /// @param _comment A closing comment to describe the conclusion of the game.
    /// @param _deadline Timestamp of the withdraw deadline of the game
    function settleGame(uint256 _gameID, uint256 _team, string _comment, uint256 _deadline)
        external
        isActivated(_gameID)
        isOngoing(_gameID)
        isValidTeam(_gameID, _team)
        isOwner()
    {
        // TODO: check deadline limit
        require(_deadline >= now + 86400, "deadline must be more than one day later.");

        game_[_gameID].ended = true;
        game_[_gameID].winnerTeam = _team;
        game_[_gameID].gameEndComment = _comment;
        game_[_gameID].withdrawDeadline = _deadline;

        if (teams_[_gameID][_team].keys == 0) {
            // no one bought winning keys, send pot to community
            uint256 _totalPot = (gameStatus_[_gameID].winningVaultInst).add(gameStatus_[_gameID].winningVaultFinal);
            gameStatus_[_gameID].totalWithdrawn = _totalPot;
            if (_totalPot > 0) {
                FSKingCorp.deposit.value(_totalPot)();
            }
        }

        emit FSEvents.onGameEnded(_gameID, _team, _comment, now);
    }


    /// @notice Cancel a game. Only owner(s) can do this.
    /// Players can't no longer buy tickets for this game once a winning team is selected.
    /// Players who bought tickets can get back 95% of the ETH paid.
    /// Emits "onGameCancelled" event.
    /// @param _gameID Game ID of the game.
    /// @param _comment A closing comment to describe the conclusion of the game.
    /// @param _deadline Timestamp of the withdraw deadline of the game
    function cancelGame(uint256 _gameID, string _comment, uint256 _deadline)
        external
        isActivated(_gameID)
        isOngoing(_gameID)
        isOwner()
    {
        // TODO: check deadline limit
        require(_deadline >= now + 86400, "deadline must be more than one day later.");

        game_[_gameID].ended = true;
        game_[_gameID].canceled = true;
        game_[_gameID].gameEndComment = _comment;
        game_[_gameID].withdrawDeadline = _deadline;

        emit FSEvents.onGameCancelled(_gameID, _comment, now);
    }


    /// @notice Withdraw winnings. Only available after a game is ended
    /// (winning team selected or game canceled).
    /// Emits "onWithdraw" event.
    /// @param _gameID Game ID of the game.
    function withdraw(uint256 _gameID)
        external
        isHuman()
        isActivated(_gameID)
        isEnded(_gameID)
    {
        require(now < game_[_gameID].withdrawDeadline, "withdraw deadline already passed");
        require(gameStatus_[_gameID].fundCleared == false, "fund already cleared");

        uint256 _pID = FSBook.pIDxAddr_(msg.sender);

        require(_pID != 0, "player has not played this game");
        require(players_[_pID][_gameID].withdrawn == false, "player already cashed out");

        players_[_pID][_gameID].withdrawn = true;

        if (game_[_gameID].canceled) {
            // game is canceled
            // withdraw 95% of the original payments
            uint256 _totalInvestment = players_[_pID][_gameID].eth.mul(95) / 100;
            if (_totalInvestment > 0) {
                // send to player
                FSBook.getPlayerAddr(_pID).transfer(_totalInvestment);
                gameStatus_[_gameID].totalWithdrawn = _totalInvestment.add(gameStatus_[_gameID].totalWithdrawn);
            }

            emit FSEvents.onWithdraw(_gameID, _pID, msg.sender, FSBook.getPlayerName(_pID), _totalInvestment, now);
        } else {
            uint256 _totalWinnings = getPlayerInstWinning(_gameID, _pID, game_[_gameID].winnerTeam).add(getPlayerPotWinning(_gameID, _pID, game_[_gameID].winnerTeam));
            if (_totalWinnings > 0) {
                // send to player
                FSBook.getPlayerAddr(_pID).transfer(_totalWinnings);
                gameStatus_[_gameID].totalWithdrawn = _totalWinnings.add(gameStatus_[_gameID].totalWithdrawn);
            }

            emit FSEvents.onWithdraw(_gameID, _pID, msg.sender, FSBook.getPlayerName(_pID), _totalWinnings, now);
        }
    }


    /// @notice Clear funds of a game. Only owner(s) can do this, after withdraw deadline
    /// is passed.
    /// Emits "onFundCleared" event.
    /// @param _gameID Game ID of the game.
    function clearFund(uint256 _gameID)
        external
        isHuman()
        isEnded(_gameID)
        isOwner()
    {
        require(now >= game_[_gameID].withdrawDeadline, "withdraw deadline not passed yet");
        require(gameStatus_[_gameID].fundCleared == false, "fund already cleared");

        gameStatus_[_gameID].fundCleared = true;

        // send remaining fund to community
        uint256 _totalPot = (gameStatus_[_gameID].winningVaultInst).add(gameStatus_[_gameID].winningVaultFinal);
        uint256 _amount = _totalPot.sub(gameStatus_[_gameID].totalWithdrawn);
        if (_amount > 0) {
            FSKingCorp.deposit.value(_amount)();
        }

        emit onFundCleared(_gameID, _amount, now);
    }


    /// @notice Get a player's current instant pot winnings.
    /// @param _gameID Game ID of the game.
    /// @param _pID Player ID of the player.
    /// @param _team Team ID of the team.
    /// @return Instant pot winnings of the player for this game and this team.
    function getPlayerInstWinning(uint256 _gameID, uint256 _pID, uint256 _team)
        public
        view
        isActivated(_gameID)
        isValidTeam(_gameID, _team)
        returns(uint256)
    {
        return ((((teams_[_gameID][_team].mask).mul(playerTeams_[_pID][_gameID][_team].keys)) / (1000000000000000000)).sub(playerTeams_[_pID][_gameID][_team].mask));
    }


    /// @notice Get a player's current final pot winnings.
    /// @param _gameID Game ID of the game.
    /// @param _pID Player ID of the player.
    /// @param _team Team ID of the team.
    /// @return Final pot winnings of the player for this game and this team.
    function getPlayerPotWinning(uint256 _gameID, uint256 _pID, uint256 _team)
        public
        view
        isActivated(_gameID)
        isValidTeam(_gameID, _team)
        returns(uint256)
    {
        if (teams_[_gameID][_team].keys > 0) {
            return gameStatus_[_gameID].winningVaultFinal.mul(playerTeams_[_pID][_gameID][_team].keys) / teams_[_gameID][_team].keys;
        } else {
            return 0;
        }
    }


    /// @notice Get current game status.
    /// @param _gameID Game ID of the game.
    /// @return (number of teams, names, keys, eth, current key price for 1 key)
    function getGameStatus(uint256 _gameID)
        public
        view
        isActivated(_gameID)
        returns(uint256, bytes32[] memory, uint256[] memory, uint256[] memory, uint256[] memory)
    {
        uint256 _nt = game_[_gameID].numberOfTeams;
        bytes32[] memory _names = new bytes32[](_nt);
        uint256[] memory _keys = new uint256[](_nt);
        uint256[] memory _eth = new uint256[](_nt);
        uint256[] memory _keyPrice = new uint256[](_nt);
        uint256 i;

        for (i = 0; i < _nt; i++) {
            _names[i] = teams_[_gameID][i].name;
            _keys[i] = teams_[_gameID][i].keys;
            _eth[i] = teams_[_gameID][i].eth;
            _keyPrice[i] = getBuyPrice(_gameID, i, 1000000000000000000);
        }

        return (_nt, _names, _keys, _eth, _keyPrice);
    }


    /// @notice Get player status of a game.
    /// @param _gameID Game ID of the game.
    /// @param _pID Player ID of the player.
    /// @return (name, eth for each team, keys for each team, inst win for each team, pot win for each team)
    function getPlayerStatus(uint256 _gameID, uint256 _pID)
        public
        view
        isActivated(_gameID)
        returns(bytes32, uint256[] memory, uint256[] memory, uint256[] memory, uint256[] memory)
    {
        uint256 _nt = game_[_gameID].numberOfTeams;
        uint256[] memory _eth = new uint256[](_nt);
        uint256[] memory _keys = new uint256[](_nt);
        uint256[] memory _instWin = new uint256[](_nt);
        uint256[] memory _potWin = new uint256[](_nt);
        uint256 i;

        for (i = 0; i < _nt; i++) {
            _eth[i] = playerTeams_[_pID][_gameID][i].eth;
            _keys[i] = playerTeams_[_pID][_gameID][i].keys;
            _instWin[i] = getPlayerInstWinning(_gameID, _pID, i);
            _potWin[i] = getPlayerPotWinning(_gameID, _pID, i);
        }
        
        return (FSBook.getPlayerName(_pID), _eth, _keys, _instWin, _potWin);
    }


    /// @notice Get the price buyer have to pay for next keys.
    /// @param _gameID Game ID of the game.
    /// @param _team Team ID of the team.
    /// @param _keys Number of keys (in wei).
    /// @return Price for the number of keys to buy (in wei).
    function getBuyPrice(uint256 _gameID, uint256 _team, uint256 _keys)
        public 
        view
        isActivated(_gameID)
        isValidTeam(_gameID, _team)
        returns(uint256)
    {                  
        return ((teams_[_gameID][_team].keys.add(_keys)).ethRec(_keys));
    }


    /// @notice Get the prices buyer have to pay for next keys for all teams.
    /// @param _gameID Game ID of the game.
    /// @param _keys Array of number of keys (in wei) for all teams.
    /// @return (total eth, array of prices in wei).
    function getBuyPrices(uint256 _gameID, uint256[] memory _keys)
        public
        view
        isActivated(_gameID)
        returns(uint256, uint256[])
    {
        uint256 _totalEth = 0;
        uint256 _nt = game_[_gameID].numberOfTeams;
        uint256[] memory _eth = new uint256[](_nt);
        uint256 i;

        require(_nt == _keys.length, "Incorrect number of teams");

        for (i = 0; i < _nt; i++) {
            if (_keys[i] > 0) {
                _eth[i] = getBuyPrice(_gameID, i, _keys[i]);
                _totalEth = _totalEth.add(_eth[i]);
            }
        }

        return (_totalEth, _eth);
    }
    

    /// @notice Get the number of keys can be bought with an amount of ETH.
    /// @param _gameID Game ID of the game.
    /// @param _team Team ID of the team.
    /// @param _eth Amount of ETH in wei.
    /// @return Number of keys can be bought (in wei).
    function getKeysfromETH(uint256 _gameID, uint256 _team, uint256 _eth)
        public 
        view
        isActivated(_gameID)
        isValidTeam(_gameID, _team)
        returns(uint256)
    {                  
        return (teams_[_gameID][_team].eth).keysRec(_eth);
    }


    /// @notice Get all numbers of keys can be bought with amounts of ETH.
    /// @param _gameID Game ID of the game.
    /// @param _eths Array of amounts of ETH in wei.
    /// @return (total keys, array of number of keys in wei).
    function getKeysFromETHs(uint256 _gameID, uint256[] memory _eths)
        public
        view
        isActivated(_gameID)
        returns(uint256, uint256[])
    {
        uint256 _totalKeys = 0;
        uint256 _nt = game_[_gameID].numberOfTeams;
        uint256[] memory _keys = new uint256[](_nt);
        uint256 i;

        require(_nt == _eths.length, "Incorrect number of teams");

        for (i = 0; i < _nt; i++) {
            if (_eths[i] > 0) {
                _keys[i] = getKeysfromETH(_gameID, i, _eths[i]);
                _totalKeys = _totalKeys.add(_keys[i]);
            }
        }

        return (_totalKeys, _keys);
    }


    /// @dev Handle comments.
    /// @param _gameID Game ID of the game.
    /// @param _pID Player ID of the player.
    /// @param _comment Comment to be used.
    function handleComment(uint256 _gameID, uint256 _pID, string memory _comment)
        private
    {
        bytes memory _commentBytes = bytes(_comment);
        // comment is empty, do nothing
        if (_commentBytes.length == 0) {
            return;
        }

        // only handle comments when eth >= 0.001
        uint256 _totalEth = msg.value;
        if (_totalEth >= 1000000000000000) {
            require(_commentBytes.length <= 64, "comment is too long");
            bytes32 _name = FSBook.getPlayerName(_pID);

            playerComments_[_gameID][playerCommentsIndex_[_gameID]] = FSdatasets.PlayerComment(_pID, _name, _totalEth, _comment);
            playerCommentsIndex_[_gameID] ++;

            emit onComment(_gameID, _pID, msg.sender, _name, _totalEth, _comment, now);
        }
    }


    /// @dev Buy keys for all teams.
    /// @param _gameID Game ID of the game.
    /// @param _pID Player ID of the player.
    /// @param _teamEth Array of eth paid for each team.
    /// @param _affID Affiliate ID
    function buysCore(uint256 _gameID, uint256 _pID, uint256[] memory _teamEth, uint256 _affID)
        private
    {
        uint256 _nt = game_[_gameID].numberOfTeams;
        uint256[] memory _keys = new uint256[](_nt);
        bytes32 _name = FSBook.getPlayerName(_pID);
        uint256 _totalEth = 0;
        uint256 i;

        require(_teamEth.length == _nt, "Number of teams is not correct");

        // for all teams...
        for (i = 0; i < _nt; i++) {
            if (_teamEth[i] > 0) {
                // compute total eth
                _totalEth = _totalEth.add(_teamEth[i]);

                // compute number of keys to buy
                _keys[i] = (teams_[_gameID][i].eth).keysRec(_teamEth[i]);

                // update player data
                playerTeams_[_pID][_gameID][i].eth = _teamEth[i].add(playerTeams_[_pID][_gameID][i].eth);
                playerTeams_[_pID][_gameID][i].keys = _keys[i].add(playerTeams_[_pID][_gameID][i].keys);

                // update team data
                teams_[_gameID][i].eth = _teamEth[i].add(teams_[_gameID][i].eth);
                teams_[_gameID][i].keys = _keys[i].add(teams_[_gameID][i].keys);

                emit FSEvents.onPurchase(_gameID, _pID, msg.sender, _name, i, _teamEth[i], _keys[i], _affID, now);
            }
        }

        // check assigned ETH for each team is the same as msg.value
        require(_totalEth == msg.value, "Total ETH is not the same as msg.value");        
            
        // update game data and player data
        gameStatus_[_gameID].totalEth = _totalEth.add(gameStatus_[_gameID].totalEth);
        players_[_pID][_gameID].eth = _totalEth.add(players_[_pID][_gameID].eth);

        distributeAll(_gameID, _pID, _affID, _totalEth, _keys);
    }


    /// @dev Distribute paid ETH to different pots.
    /// @param _gameID Game ID of the game.
    /// @param _pID Player ID of the player.
    /// @param _affID Affiliate ID used for this transasction.
    /// @param _totalEth Total ETH paid.
    /// @param _keys Array of keys bought for each team.
    function distributeAll(uint256 _gameID, uint256 _pID, uint256 _affID, uint256 _totalEth, uint256[] memory _keys)
        private
    {
        // community 2%
        uint256 _com = _totalEth / 50;

        // distribute 3% to aff
        uint256 _aff = _totalEth.mul(3) / 100;
        _com = _com.add(handleAffiliate(_pID, _affID, _aff));

        // instant pot (15%)
        uint256 _instPot = _totalEth.mul(15) / 100;

        // winning pot (80%)
        uint256 _pot = _totalEth.mul(80) / 100;

        // Send community to forwarder
        if (!address(FSKingCorp).call.value(_com)(abi.encode("deposit()"))) {
            // if unable to deposit, add to pot
            _pot = _pot.add(_com);
        }

        gameStatus_[_gameID].winningVaultInst = _instPot.add(gameStatus_[_gameID].winningVaultInst);
        gameStatus_[_gameID].winningVaultFinal = _pot.add(gameStatus_[_gameID].winningVaultFinal);

        // update masks for instant winning vault
        uint256 _nt = _keys.length;
        for (uint256 i = 0; i < _nt; i++) {
            uint256 _newPot = _instPot.add(teams_[_gameID][i].dust);
            uint256 _dust = updateMasks(_gameID, _pID, i, _newPot, _keys[i]);
            teams_[_gameID][i].dust = _dust;
        }
    }


    /// @dev Handle affiliate payments.
    /// @param _pID Player ID of the player.
    /// @param _affID Affiliate ID used for this transasction.
    /// @param _aff Amount of ETH for affiliate payment.
    /// @return The amount remained for the community (if there's no affiliate payment)
    function handleAffiliate(uint256 _pID, uint256 _affID, uint256 _aff)
        private
        returns (uint256)
    {
        uint256 _com = 0;

        if (_affID == 0 || _affID == _pID) {
            _com = _aff;
        } else if(FSBook.getPlayerHasAff(_affID)) {
            FSBook.depositAffiliate.value(_aff)(_affID);
        } else {
            _com = _aff;
        }

        return _com;
    }


    /// @dev Updates masks for instant pot.
    /// @param _gameID Game ID of the game.
    /// @param _pID Player ID of the player.
    /// @param _team Team ID of the team.
    /// @param _gen Amount of ETH to be added into instant pot.
    /// @param _keys Number of keys bought.
    /// @return Dust left over.
    function updateMasks(uint256 _gameID, uint256 _pID, uint256 _team, uint256 _gen, uint256 _keys)
        private
        returns(uint256)
    {
        /* MASKING NOTES
            earnings masks are a tricky thing for people to wrap their minds around.
            the basic thing to understand here.  is were going to have a global
            tracker based on profit per share for each round, that increases in
            relevant proportion to the increase in share supply.
            
            the player will have an additional mask that basically says "based
            on the rounds mask, my shares, and how much i've already withdrawn,
            how much is still owed to me?"
        */
        
        // calc profit per key & round mask based on this buy:  (dust goes to pot)
        if (teams_[_gameID][_team].keys > 0) {
            uint256 _ppt = (_gen.mul(1000000000000000000)) / (teams_[_gameID][_team].keys);
            teams_[_gameID][_team].mask = _ppt.add(teams_[_gameID][_team].mask);

            updatePlayerMask(_gameID, _pID, _team, _ppt, _keys);

            // calculate & return dust
            return(_gen.sub((_ppt.mul(teams_[_gameID][_team].keys)) / (1000000000000000000)));
        } else {
            return _gen;
        }
    }


    /// @dev Updates masks for the player.
    /// @param _gameID Game ID of the game.
    /// @param _pID Player ID of the player.
    /// @param _team Team ID of the team.
    /// @param _ppt Amount of unit ETH.
    /// @param _keys Number of keys bought.
    /// @return Dust left over.
    function updatePlayerMask(uint256 _gameID, uint256 _pID, uint256 _team, uint256 _ppt, uint256 _keys)
        private
    {
        if (_keys > 0) {
            // calculate player earning from their own buy (only based on the keys
            // they just bought).  & update player earnings mask
            uint256 _pearn = (_ppt.mul(_keys)) / (1000000000000000000);
            playerTeams_[_pID][_gameID][_team].mask = (((teams_[_gameID][_team].mask.mul(_keys)) / (1000000000000000000)).sub(_pearn)).add(playerTeams_[_pID][_gameID][_team].mask);
        }
    }


    /// @dev Check if a game is activated.
    /// @param _gameID Game ID of the game.
    modifier isActivated(uint256 _gameID) {
        require(game_[_gameID].gameStartTime > 0, "Not activated yet");
        require(game_[_gameID].gameStartTime <= now, "game not started yet");
        _;
    }


    /// @dev Check if a game is not paused.
    /// @param _gameID Game ID of the game.
    modifier isNotPaused(uint256 _gameID) {
        require(game_[_gameID].paused == false, "game is paused");
        _;
    }


    /// @dev Check if a game is not closed.
    /// @param _gameID Game ID of the game.
    modifier isNotClosed(uint256 _gameID) {
        require(game_[_gameID].closeTime == 0 || game_[_gameID].closeTime > now, "game is closed");
        _;
    }


    /// @dev Check if a game is not settled.
    /// @param _gameID Game ID of the game.
    modifier isOngoing(uint256 _gameID) {
        require(game_[_gameID].ended == false, "game is ended");
        _;
    }


    /// @dev Check if a game is settled.
    /// @param _gameID Game ID of the game.
    modifier isEnded(uint256 _gameID) {
        require(game_[_gameID].ended == true, "game is not ended");
        _;
    }


    /// @dev Check if caller is not a smart contract.
    modifier isHuman() {
        address _addr = msg.sender;
        require (_addr == tx.origin, "Human only");

        uint256 _codeLength;
        assembly { _codeLength := extcodesize(_addr) }
        require(_codeLength == 0, "Human only");
        _;
    }


    // TODO: Check address!!!
    /// @dev Check if caller is one of the owner(s).
    modifier isOwner() {
        require(
            msg.sender == 0xE3FF68fB79FEE1989FB67Eb04e196E361EcAec3e ||
            msg.sender == 0xb914843D2E56722a2c133Eff956d1F99b820D468 ||
            msg.sender == 0xE0b005384dF8F4D80e9a69B6210eC1929A935D97 ||
            msg.sender == 0xc52FA2C9411fCd4f58be2d6725094689C46242f2
            , "Only owner can do this");
        _;
    }


    /// @dev Check if purchase is within limits.
    /// (between 0.000000001 ETH and 100000 ETH)
    /// @param _eth Amount of ETH
    modifier isWithinLimits(uint256 _eth) {
        require(_eth >= 1000000000, "too little money");
        require(_eth <= 100000000000000000000000, "too much money");
        _;    
    }


    /// @dev Check if team ID is valid.
    /// @param _gameID Game ID of the game.
    /// @param _team Team ID of the team.
    modifier isValidTeam(uint256 _gameID, uint256 _team) {
        require(_team < game_[_gameID].numberOfTeams, "there is no such team");
        _;
    }
}

// key calculation
library FSKeyCalc {
    using SafeMath for *;
    
    /// @dev calculates number of keys received given X eth 
    /// @param _curEth current amount of eth in contract 
    /// @param _newEth eth being spent
    /// @return amount of ticket purchased
    function keysRec(uint256 _curEth, uint256 _newEth)
        internal
        pure
        returns (uint256)
    {
        return(keys((_curEth).add(_newEth)).sub(keys(_curEth)));
    }


    /// @dev calculates amount of eth received if you sold X keys 
    /// @param _curKeys current amount of keys that exist 
    /// @param _sellKeys amount of keys you wish to sell
    /// @return amount of eth received
    function ethRec(uint256 _curKeys, uint256 _sellKeys)
        internal
        pure
        returns (uint256)
    {
        return((eth(_curKeys)).sub(eth(_curKeys.sub(_sellKeys))));
    }

    /// @dev calculates how many keys would exist with given an amount of eth
    /// @param _eth eth "in contract"
    /// @return number of keys that would exist
    function keys(uint256 _eth) 
        internal
        pure
        returns(uint256)
    {
        return ((((((_eth).mul(1000000000000000000)).mul(3125000000000000000000000000)).add(562498828125610351562500000000000000000000000000000000000000000000)).sqrt()).sub(749999218750000000000000000000000)) / (1562500000);
    }
    
    /// @dev calculates how much eth would be in contract given a number of keys
    /// @param _keys number of keys "in contract" 
    /// @return eth that would exists
    function eth(uint256 _keys) 
        internal
        pure
        returns(uint256)
    {
        return ((781250000).mul(_keys.sq()).add(((1499998437500000).mul(_keys.mul(1000000000000000000))) / (2))) / ((1000000000000000000).sq());
    }
}


// datasets
library FSdatasets {

    struct Game {
        string name;                     // game name
        uint256 numberOfTeams;           // number of teams
        uint256 gameStartTime;           // game start time (> 0 means activated)

        bool paused;                     // game paused
        bool ended;                      // game ended
        bool canceled;                   // game canceled
        uint256 winnerTeam;              // winner team        
        uint256 withdrawDeadline;        // deadline for withdraw fund
        string gameEndComment;           // comment for game ending or canceling
        uint256 closeTime;               // betting close time
    }

    struct GameStatus {
        uint256 totalEth;                // total eth invested
        uint256 totalWithdrawn;          // total withdrawn by players
        uint256 winningVaultInst;        // current "instant" winning vault
        uint256 winningVaultFinal;       // current "final" winning vault        
        bool fundCleared;                // fund already cleared
    }

    struct Team {
        bytes32 name;       // team name
        uint256 keys;       // number of keys
        uint256 eth;        // total eth for the team
        uint256 mask;       // mask of this team
        uint256 dust;       // dust for winning vault
    }

    struct Player {
        uint256 eth;        // total eth for the game
        bool withdrawn;     // winnings already withdrawn
    }

    struct PlayerTeam {
        uint256 keys;       // number of keys
        uint256 eth;        // total eth for the team
        uint256 mask;       // mask for this team
    }

    struct PlayerComment {
        uint256 playerID;
        bytes32 playerName;
        uint256 ethIn;
        string comment;
    }
}


interface FSInterfaceForForwarder {
    function deposit() external payable returns(bool);
}


interface FSBookInterface {
    function pIDxAddr_(address _addr) external returns (uint256);
    function pIDxName_(bytes32 _name) external returns (uint256);

    function getPlayerID(address _addr) external returns (uint256);
    function getPlayerName(uint256 _pID) external view returns (bytes32);
    function getPlayerLAff(uint256 _pID) external view returns (uint256);
    function setPlayerLAff(uint256 _pID, uint256 _lAff) external;
    function getPlayerAffT2(uint256 _pID) external view returns (uint256);
    function getPlayerAddr(uint256 _pID) external view returns (address);
    function getPlayerHasAff(uint256 _pID) external view returns (bool);
    function getNameFee() external view returns (uint256);
    function getAffiliateFee() external view returns (uint256);
    function depositAffiliate(uint256 _pID) external payable;
}


/// @title SafeMath v0.1.9
/// @dev Math operations with safety checks that throw on error
/// change notes: original SafeMath library from OpenZeppelin modified by Inventor
/// - added sqrt
/// - added sq
/// - added pwr 
/// - changed asserts to requires with error log outputs
/// - removed div, its useless
library SafeMath {
    
    /// @dev Multiplies two numbers, throws on overflow.
    function mul(uint256 a, uint256 b) 
        internal 
        pure 
        returns (uint256 c) 
    {
        if (a == 0) {
            return 0;
        }
        c = a * b;
        require(c / a == b, "SafeMath mul failed");
        return c;
    }


    /// @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    function sub(uint256 a, uint256 b)
        internal
        pure
        returns (uint256) 
    {
        require(b <= a, "SafeMath sub failed");
        return a - b;
    }


    /// @dev Adds two numbers, throws on overflow.
    function add(uint256 a, uint256 b)
        internal
        pure
        returns (uint256 c) 
    {
        c = a + b;
        require(c >= a, "SafeMath add failed");
        return c;
    }
    

    /// @dev gives square root of given x.
    function sqrt(uint256 x)
        internal
        pure
        returns (uint256 y) 
    {
        uint256 z = ((add(x, 1)) / 2);
        y = x;
        while (z < y) {
            y = z;
            z = ((add((x / z), z)) / 2);
        }
    }


    /// @dev gives square. multiplies x by x
    function sq(uint256 x)
        internal
        pure
        returns (uint256)
    {
        return (mul(x,x));
    }


    /// @dev x to the power of y 
    function pwr(uint256 x, uint256 y)
        internal 
        pure 
        returns (uint256)
    {
        if (x == 0) {
            return (0);
        } else if (y == 0) {
            return (1);
        } else {
            uint256 z = x;
            for (uint256 i = 1; i < y; i++) {
                z = mul(z,x);
            }
            return (z);
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"playerComments_","outputs":[{"name":"playerID","type":"uint256"},{"name":"playerName","type":"bytes32"},{"name":"ethIn","type":"uint256"},{"name":"comment","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_pID","type":"uint256"}],"name":"getPlayerStatus","outputs":[{"name":"","type":"bytes32"},{"name":"","type":"uint256[]"},{"name":"","type":"uint256[]"},{"name":"","type":"uint256[]"},{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_keys","type":"uint256[]"}],"name":"getBuyPrices","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_gameID","type":"uint256"}],"name":"getGameStatus","outputs":[{"name":"","type":"uint256"},{"name":"","type":"bytes32[]"},{"name":"","type":"uint256[]"},{"name":"","type":"uint256[]"},{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_team","type":"uint256"},{"name":"_eth","type":"uint256"}],"name":"getKeysfromETH","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_paused","type":"bool"}],"name":"pauseGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_teamEth","type":"uint256[]"},{"name":"_affCode","type":"uint256"},{"name":"_comment","type":"string"}],"name":"buysXid","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_gameID","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gameIDIndex_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"playerCommentsIndex_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_gameID","type":"uint256"}],"name":"clearFund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_comment","type":"string"},{"name":"_deadline","type":"uint256"}],"name":"cancelGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_closeTime","type":"uint256"}],"name":"setCloseTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_pID","type":"uint256"},{"name":"_team","type":"uint256"}],"name":"getPlayerInstWinning","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_startTime","type":"uint256"}],"name":"activate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"game_","outputs":[{"name":"name","type":"string"},{"name":"numberOfTeams","type":"uint256"},{"name":"gameStartTime","type":"uint256"},{"name":"paused","type":"bool"},{"name":"ended","type":"bool"},{"name":"canceled","type":"bool"},{"name":"winnerTeam","type":"uint256"},{"name":"withdrawDeadline","type":"uint256"},{"name":"gameEndComment","type":"string"},{"name":"closeTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_pID","type":"uint256"},{"name":"_team","type":"uint256"}],"name":"getPlayerPotWinning","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"players_","outputs":[{"name":"eth","type":"uint256"},{"name":"withdrawn","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name_","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"gameStatus_","outputs":[{"name":"totalEth","type":"uint256"},{"name":"totalWithdrawn","type":"uint256"},{"name":"winningVaultInst","type":"uint256"},{"name":"winningVaultFinal","type":"uint256"},{"name":"fundCleared","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_team","type":"uint256"},{"name":"_comment","type":"string"},{"name":"_deadline","type":"uint256"}],"name":"settleGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_eths","type":"uint256[]"}],"name":"getKeysFromETHs","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_teamNames","type":"bytes32[]"}],"name":"createGame","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"teams_","outputs":[{"name":"name","type":"bytes32"},{"name":"keys","type":"uint256"},{"name":"eth","type":"uint256"},{"name":"mask","type":"uint256"},{"name":"dust","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"playerTeams_","outputs":[{"name":"keys","type":"uint256"},{"name":"eth","type":"uint256"},{"name":"mask","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_gameID","type":"uint256"},{"name":"_team","type":"uint256"},{"name":"_keys","type":"uint256"}],"name":"getBuyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onGameCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":false,"name":"startTime","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onGameActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":false,"name":"paused","type":"bool"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onGamePaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":false,"name":"closeTimestamp","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onChangeCloseTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":true,"name":"playerID","type":"uint256"},{"indexed":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"playerName","type":"bytes32"},{"indexed":false,"name":"teamID","type":"uint256"},{"indexed":false,"name":"ethIn","type":"uint256"},{"indexed":false,"name":"keysBought","type":"uint256"},{"indexed":false,"name":"affID","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":true,"name":"playerID","type":"uint256"},{"indexed":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"playerName","type":"bytes32"},{"indexed":false,"name":"ethIn","type":"uint256"},{"indexed":false,"name":"comment","type":"string"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onComment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":true,"name":"playerID","type":"uint256"},{"indexed":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"playerName","type":"bytes32"},{"indexed":false,"name":"ethOut","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":false,"name":"winningTeamID","type":"uint256"},{"indexed":false,"name":"comment","type":"string"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onGameEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":false,"name":"comment","type":"string"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onGameCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gameID","type":"uint256"},{"indexed":false,"name":"fundCleared","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"onFundCleared","type":"event"}]

608060405234801561001057600080fd5b506001600055614fee806100256000396000f30060806040526004361061013a5763ffffffff60e060020a60003504166306271bc0811461013f578063063b3b29146101ef5780630a5cfb151461033c5780630f1bf454146103f1578063198c1f971461045a5780631d7809601461048a57806323d52499146104a95780632e1a7d4d1461053a578063300cf9de1461055257806350ee5fa914610567578063580583041461057f57806376ec477d1461059757806381646be8146105be57806382cdc93e146105d95780638ea8f83c146105f7578063aad5469114610612578063b9649e521461074c578063be567a9e1461076a578063e2b9e1861461079e578063e738827414610828578063e9007d4e1461086d578063f0a3859114610898578063f48c157d146108f2578063f90b98be1461091e578063fb9591d514610964578063fca16c3b146109a0575b600080fd5b34801561014b57600080fd5b5061015a6004356024356109be565b60405180858152602001846000191660001916815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156101b1578181015183820152602001610199565b50505050905090810190601f1680156101de5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b3480156101fb57600080fd5b5061020a600435602435610a93565b60405180866000191660001916815260200180602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b8381101561026457818101518382015260200161024c565b50505050905001858103845288818151815260200191508051906020019060200280838360005b838110156102a357818101518382015260200161028b565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156102e25781810151838201526020016102ca565b50505050905001858103825286818151815260200191508051906020019060200280838360005b83811015610321578181015183820152602001610309565b50505050905001995050505050505050505060405180910390f35b34801561034857600080fd5b5060408051602060046024803582810135848102808701860190975280865261039696843596369660449591949091019291829185019084908082843750949750610dc59650505050505050565b6040518083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156103dc5781810151838201526020016103c4565b50505050905001935050505060405180910390f35b3480156103fd57600080fd5b50610409600435610fd5565b6040518086815260200180602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360008381101561026457818101518382015260200161024c565b34801561046657600080fd5b5061047860043560243560443561125c565b60408051918252519081900360200190f35b34801561049657600080fd5b506104a760043560243515156113a0565b005b6040805160206004602480358281013584810280870186019097528086526104a79684359636966044959194909101929182918501908490808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a9099940197509195509182019350915081908401838280828437509497506115c59650505050505050565b34801561054657600080fd5b506104a7600435611af6565b34801561055e57600080fd5b50610478612359565b34801561057357600080fd5b5061047860043561235f565b34801561058b57600080fd5b506104a7600435612371565b3480156105a357600080fd5b506104a760048035906024803590810191013560443561272a565b3480156105ca57600080fd5b506104a7600435602435612a26565b3480156105e557600080fd5b50610478600435602435604435612c3f565b34801561060357600080fd5b506104a7600435602435612dbe565b34801561061e57600080fd5b5061062a600435613019565b60405180806020018b81526020018a81526020018915151515815260200188151515158152602001871515151581526020018681526020018581526020018060200184815260200183810383528d818151815260200191508051906020019080838360005b838110156106a757818101518382015260200161068f565b50505050905090810190601f1680156106d45780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156107075781810151838201526020016106ef565b50505050905090810190601f1680156107345780820380516001836020036101000a031916815260200191505b509c5050505050505050505050505060405180910390f35b34801561075857600080fd5b50610478600435602435604435613180565b34801561077657600080fd5b5061078560043560243561331c565b6040805192835290151560208301528051918290030190f35b3480156107aa57600080fd5b506107b3613343565b6040805160208082528351818301528351919283929083019185019080838360005b838110156107ed5781810151838201526020016107d5565b50505050905090810190601f16801561081a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561083457600080fd5b5061084060043561337a565b60408051958652602086019490945284840192909252606084015215156080830152519081900360a00190f35b34801561087957600080fd5b506104a7600480359060248035916044359182019101356064356133ac565b3480156108a457600080fd5b50604080516020600460248035828101358481028087018601909752808652610396968435963696604495919490910192918291850190849080828437509497506137e49650505050505050565b3480156108fe57600080fd5b5061047860246004803582810192908201359181359182019101356139cf565b34801561092a57600080fd5b50610939600435602435613cb1565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b34801561097057600080fd5b50610982600435602435604435613ce9565b60408051938452602084019290925282820152519081900360600190f35b3480156109ac57600080fd5b50610478600435602435604435613d1b565b600660205281600052604060002060205280600052604060002060009150915050806000015490806001015490806002015490806003018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a895780601f10610a5e57610100808354040283529160200191610a89565b820191906000526020600020905b815481529060010190602001808311610a6c57829003601f168201915b5050505050905084565b6000606080606080600060608060608060008c60006001600083815260200190815260200160002060020154111515610b04576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b600081815260016020526040902060020154421015610b5b576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b600160008f815260200190815260200160002060010154965086604051908082528060200260200182016040528015610b9e578160200160208202803883390190505b50955086604051908082528060200260200182016040528015610bcb578160200160208202803883390190505b50945086604051908082528060200260200182016040528015610bf8578160200160208202803883390190505b50935086604051908082528060200260200182016040528015610c25578160200160208202803883390190505b509250600091505b86821015610d2c57600560008e815260200190815260200160002060008f81526020019081526020016000206000838152602001908152602001600020600101548683815181101515610c7c57fe5b9060200190602002018181525050600560008e815260200190815260200160002060008f81526020019081526020016000206000838152602001908152602001600020600001548583815181101515610cd157fe5b60209081029091010152610ce68e8e84612c3f565b8483815181101515610cf457fe5b60209081029091010152610d098e8e84613180565b8383815181101515610d1757fe5b60209081029091010152600190910190610c2d565b600080516020614f43833981519152600160a060020a03166382e37b2c8e6040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b158015610d8357600080fd5b505af1158015610d97573d6000803e3d6000fd5b505050506040513d6020811015610dad57600080fd5b50519e959d50939b5091995097509195505050505050565b60006060600080606060008760006001600083815260200190815260200160002060020154111515610e2f576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b600081815260016020526040902060020154421015610e86576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b60009450600160008a815260200190815260200160002060010154935083604051908082528060200260200182016040528015610ecd578160200160208202803883390190505b5088519093508414610f29576040805160e560020a62461bcd02815260206004820152601960248201527f496e636f7272656374206e756d626572206f66207465616d7300000000000000604482015290519081900360640190fd5b600091505b83821015610fc75760008883815181101515610f4657fe5b906020019060200201511115610fbc57610f7889838a85815181101515610f6957fe5b90602001906020020151613d1b565b8383815181101515610f8657fe5b602090810290910101528251610fb990849084908110610fa257fe5b60209081029091010151869063ffffffff613e6416565b94505b600190910190610f2e565b509297909650945050505050565b6000606080606080600060608060608060008b60006001600083815260200190815260200160002060020154111515611046576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b60008181526001602052604090206002015442101561109d576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b600160008e8152602001908152602001600020600101549650866040519080825280602002602001820160405280156110e0578160200160208202803883390190505b5095508660405190808252806020026020018201604052801561110d578160200160208202803883390190505b5094508660405190808252806020026020018201604052801561113a578160200160208202803883390190505b50935086604051908082528060200260200182016040528015611167578160200160208202803883390190505b509250600091505b868210156112495760008d8152600360209081526040808320858452909152902054865187908490811061119f57fe5b602090810290910181019190915260008e8152600382526040808220858352909252206001015485518690849081106111d457fe5b602090810290910181019190915260008e81526003825260408082208583529092522060020154845185908490811061120957fe5b602090810290910101526112268d83670de0b6b3a7640000613d1b565b838381518110151561123457fe5b6020908102909101015260019091019061116f565b50949b939a509198509650945092505050565b600083815260016020526040812060020154849082106112b4576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b60008181526001602052604090206002015442101561130b576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b60008581526001602081905260409091200154859085908110611366576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614f23833981519152604482015290519081900360640190fd5b6000878152600360209081526040808320898452909152902060020154611393908663ffffffff613ec516565b93505b5050509392505050565b6000828152600160205260408120600201548391106113f7576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b60008181526001602052604090206002015442101561144e576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b6000838152600160205260409020600301548390610100900460ff16156114ad576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020614f83833981519152604482015290519081900360640190fd5b73e3ff68fb79fee1989fb67eb04e196e361ecaec3e3314806114e2575073b914843d2e56722a2c133eff956d1f99b820d46833145b80611500575073e0b005384df8f4d80e9a69b6210ec1929a935d9733145b8061151e575073c52fa2c9411fcd4f58be2d6725094689c46242f233145b1515611562576040805160e560020a62461bcd0281526020600482015260166024820152600080516020614f63833981519152604482015290519081900360640190fd5b600084815260016020908152604091829020600301805460ff191686151590811790915582519081524291810191909152815186927ff8a5d721d11ad0c291de44a168364b94f9230ec59fd9b09f55b83f9a72ea7563928290030190a250505050565b60008481526001602052604081206002015481908690821061161f576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b600081815260016020526040902060020154421015611676576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b6000878152600160205260409020600301548790610100900460ff16156116d5576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020614f83833981519152604482015290519081900360640190fd5b600088815260016020526040902060030154889060ff1615611741576040805160e560020a62461bcd02815260206004820152600e60248201527f67616d6520697320706175736564000000000000000000000000000000000000604482015290519081900360640190fd5b60008981526001602052604090206007015489901580611771575060008181526001602052604090206007015442105b15156117c7576040805160e560020a62461bcd02815260206004820152600e60248201527f67616d6520697320636c6f736564000000000000000000000000000000000000604482015290519081900360640190fd5b33600032821461180f576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b50803b8015611856576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b34633b9aca008110156118b3576040805160e560020a62461bcd02815260206004820152601060248201527f746f6f206c6974746c65206d6f6e657900000000000000000000000000000000604482015290519081900360640190fd5b69152d02c7e14af6800000811115611915576040805160e560020a62461bcd02815260206004820152600e60248201527f746f6f206d756368206d6f6e6579000000000000000000000000000000000000604482015290519081900360640190fd5b604080517fe56556a90000000000000000000000000000000000000000000000000000000081523360048201529051600080516020614f438339815191529163e56556a99160248083019260209291908290030181600087803b15801561197b57600080fd5b505af115801561198f573d6000803e3d6000fd5b505050506040513d60208110156119a557600080fd5b505198508a158015906119b85750888b14155b15611a4a57604080517f4a9cdfad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018d90529051600080516020614f4383398151915291634a9cdfad91604480830192600092919082900301818387803b158015611a2a57600080fd5b505af1158015611a3e573d6000803e3d6000fd5b505050508a9750611ad0565b600080516020614f43833981519152600160a060020a031663e3c08adf8a6040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b158015611aa157600080fd5b505af1158015611ab5573d6000803e3d6000fd5b505050506040513d6020811015611acb57600080fd5b505197505b611adc8d8a8e8b613efe565b611ae78d8a8c6143bc565b50505050505050505050505050565b600080803381328214611b41576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b50803b8015611b88576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b600086815260016020526040812060020154879110611bdf576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b600081815260016020526040902060020154421015611c36576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b600087815260016020819052604090912060030154889161010090910460ff16151514611cad576040805160e560020a62461bcd02815260206004820152601160248201527f67616d65206973206e6f7420656e646564000000000000000000000000000000604482015290519081900360640190fd5b6000888152600160205260409020600501544210611d15576040805160e560020a62461bcd02815260206004820181905260248201527f776974686472617720646561646c696e6520616c726561647920706173736564604482015290519081900360640190fd5b60008881526002602052604090206004015460ff1615611d7f576040805160e560020a62461bcd02815260206004820152601460248201527f66756e6420616c726561647920636c6561726564000000000000000000000000604482015290519081900360640190fd5b604080517f10f01eba0000000000000000000000000000000000000000000000000000000081523360048201529051600080516020614f43833981519152916310f01eba9160248083019260209291908290030181600087803b158015611de557600080fd5b505af1158015611df9573d6000803e3d6000fd5b505050506040513d6020811015611e0f57600080fd5b50519650861515611e6a576040805160e560020a62461bcd02815260206004820152601f60248201527f706c6179657220686173206e6f7420706c6179656420746869732067616d6500604482015290519081900360640190fd5b60008781526004602090815260408083208b845290915290206001015460ff1615611edf576040805160e560020a62461bcd02815260206004820152601960248201527f706c6179657220616c726561647920636173686564206f757400000000000000604482015290519081900360640190fd5b60008781526004602090815260408083208b845282528083206001908101805460ff19168217905590915290206003015462010000900460ff161561212d5760008781526004602090815260408083208b8452909152902054606490611f4c90605f63ffffffff61461216565b811515611f5557fe5b049550600086111561205257600080516020614f43833981519152600160a060020a0316634d0d35ff886040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b158015611fb857600080fd5b505af1158015611fcc573d6000803e3d6000fd5b505050506040513d6020811015611fe257600080fd5b5051604051600160a060020a039091169087156108fc029088906000818181858888f1935050505015801561201b573d6000803e3d6000fd5b5060008881526002602052604090206001015461203f90879063ffffffff613e6416565b6000898152600260205260409020600101555b86887fc96dab36fe463b470a08ba59680a411f7e81d3f0bf14ee16d56e16124df2757633600080516020614f43833981519152600160a060020a03166382e37b2c8c6040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b1580156120cd57600080fd5b505af11580156120e1573d6000803e3d6000fd5b505050506040513d60208110156120f757600080fd5b505160408051600160a060020a03909316835260208301919091528181018b9052426060830152519081900360800190a361234f565b61217c6121518989600160008d815260200190815260200160002060040154613180565b60008a815260016020526040902060040154612170908b908b90612c3f565b9063ffffffff613e6416565b9450600085111561227857600080516020614f43833981519152600160a060020a0316634d0d35ff886040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b1580156121de57600080fd5b505af11580156121f2573d6000803e3d6000fd5b505050506040513d602081101561220857600080fd5b5051604051600160a060020a039091169086156108fc029087906000818181858888f19350505050158015612241573d6000803e3d6000fd5b5060008881526002602052604090206001015461226590869063ffffffff613e6416565b6000898152600260205260409020600101555b86887fc96dab36fe463b470a08ba59680a411f7e81d3f0bf14ee16d56e16124df2757633600080516020614f43833981519152600160a060020a03166382e37b2c8c6040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b1580156122f357600080fd5b505af1158015612307573d6000803e3d6000fd5b505050506040513d602081101561231d57600080fd5b505160408051600160a060020a03909316835260208301919091528181018a9052426060830152519081900360800190a35b5050505050505050565b60005481565b60076020526000908152604090205481565b60008033813282146123bb576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b50803b8015612402576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b600085815260016020819052604090912060030154869161010090910460ff16151514612479576040805160e560020a62461bcd02815260206004820152601160248201527f67616d65206973206e6f7420656e646564000000000000000000000000000000604482015290519081900360640190fd5b73e3ff68fb79fee1989fb67eb04e196e361ecaec3e3314806124ae575073b914843d2e56722a2c133eff956d1f99b820d46833145b806124cc575073e0b005384df8f4d80e9a69b6210ec1929a935d9733145b806124ea575073c52fa2c9411fcd4f58be2d6725094689c46242f233145b151561252e576040805160e560020a62461bcd0281526020600482015260166024820152600080516020614f63833981519152604482015290519081900360640190fd5b600086815260016020526040902060050154421015612597576040805160e560020a62461bcd02815260206004820181905260248201527f776974686472617720646561646c696e65206e6f742070617373656420796574604482015290519081900360640190fd5b60008681526002602052604090206004015460ff1615612601576040805160e560020a62461bcd02815260206004820152601460248201527f66756e6420616c726561647920636c6561726564000000000000000000000000604482015290519081900360640190fd5b600086815260026020819052604090912060048101805460ff1916600117905560038101549101546126389163ffffffff613e6416565b60008781526002602052604090206001015490955061265e90869063ffffffff61468916565b935060008411156126e957733a2321ddc991c50518969b93d2c6b76bf5309790600160a060020a031663d0e30db0856040518263ffffffff1660e060020a0281526004016020604051808303818588803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b50505050506040513d60208110156126e657600080fd5b50505b60408051858152426020820152815188927f98ce57d1af12cdf7b07d3b9bd899255b7ae73b24039b0f1c4564a06aabaab541928290030190a2505050505050565b600084815260016020526040812060020154859110612781576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b6000818152600160205260409020600201544210156127d8576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b6000858152600160205260409020600301548590610100900460ff1615612837576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020614f83833981519152604482015290519081900360640190fd5b73e3ff68fb79fee1989fb67eb04e196e361ecaec3e33148061286c575073b914843d2e56722a2c133eff956d1f99b820d46833145b8061288a575073e0b005384df8f4d80e9a69b6210ec1929a935d9733145b806128a8575073c52fa2c9411fcd4f58be2d6725094689c46242f233145b15156128ec576040805160e560020a62461bcd0281526020600482015260166024820152600080516020614f63833981519152604482015290519081900360640190fd5b62015180420183101561296f576040805160e560020a62461bcd02815260206004820152602960248201527f646561646c696e65206d757374206265206d6f7265207468616e206f6e65206460448201527f6179206c617465722e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600086815260016020526040902060038101805462ff00001961ff00199091166101001716620100001790556129a9906006018686614dd9565b50826001600088815260200190815260200160002060050181905550857f12688d2ff8c59b3885c2d5b1a9ef5d2f90fbb6232922112f6bba67d32fc234dd868642604051808060200183815260200182810382528585828181526020019250808284376040519201829003965090945050505050a2505050505050565b600082815260016020526040812060020154839110612a7d576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b600081815260016020526040902060020154421015612ad4576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b6000838152600160205260409020600301548390610100900460ff1615612b33576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020614f83833981519152604482015290519081900360640190fd5b73e3ff68fb79fee1989fb67eb04e196e361ecaec3e331480612b68575073b914843d2e56722a2c133eff956d1f99b820d46833145b80612b86575073e0b005384df8f4d80e9a69b6210ec1929a935d9733145b80612ba4575073c52fa2c9411fcd4f58be2d6725094689c46242f233145b1515612be8576040805160e560020a62461bcd0281526020600482015260166024820152600080516020614f63833981519152604482015290519081900360640190fd5b60008481526001602090815260409182902060070185905581518581524291810191909152815186927f9c792396208f0e7d6e7a9e2925ae3fb93255d2b0d09bffb26463f2a7e114df60928290030190a250505050565b60008381526001602052604081206002015484908210612c97576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b600081815260016020526040902060020154421015612cee576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b60008581526001602081905260409091200154859084908110612d49576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614f23833981519152604482015290519081900360640190fd5b60008681526005602090815260408083208a845282528083208884528252808320600281015490548b855260038085528386208b875290945291909320909101546113939291670de0b6b3a764000091612da89163ffffffff61461216565b811515612db157fe5b049063ffffffff61468916565b336000328214612e06576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b50803b8015612e4d576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b73e3ff68fb79fee1989fb67eb04e196e361ecaec3e331480612e82575073b914843d2e56722a2c133eff956d1f99b820d46833145b80612ea0575073e0b005384df8f4d80e9a69b6210ec1929a935d9733145b80612ebe575073c52fa2c9411fcd4f58be2d6725094689c46242f233145b1515612f02576040805160e560020a62461bcd0281526020600482015260166024820152600080516020614f63833981519152604482015290519081900360640190fd5b6000548410612f5b576040805160e560020a62461bcd02815260206004820152601160248201527f696e636f72726563742067616d65206964000000000000000000000000000000604482015290519081900360640190fd5b60008481526001602052604090206002015415612fc2576040805160e560020a62461bcd02815260206004820152601160248201527f616c726561647920616374697661746564000000000000000000000000000000604482015290519081900360640190fd5b60008481526001602090815260409182902060020185905581518581524291810191909152815186927f87a6d0fc6e9251a2300bec3090409cb3abd43e99f4bc33d04177df604a32e1b4928290030190a250505050565b60016020818152600092835260409283902080548451600294821615610100026000190190911693909304601f81018390048302840183019094528383529283918301828280156130ab5780601f10613080576101008083540402835291602001916130ab565b820191906000526020600020905b81548152906001019060200180831161308e57829003601f168201915b5050505060018381015460028086015460038701546004880154600589015460068a0180546040805160206101009b8416158c026000190190931698909804601f81018390048302890183019091528088529a9b979a95995060ff808616998604811698620100009096041696939592949392908301828280156131705780601f1061314557610100808354040283529160200191613170565b820191906000526020600020905b81548152906001019060200180831161315357829003601f168201915b505050505090806007015490508a565b600083815260016020526040812060020154849082106131d8576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b60008181526001602052604090206002015442101561322f576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b6000858152600160208190526040909120015485908490811061328a576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614f23833981519152604482015290519081900360640190fd5b600087815260036020908152604080832088845290915281206001015411156133135760008781526003602081815260408084208985528252808420600101548a8552600583528185208c865283528185208a86528352818520548c865260029093529320909101546133029163ffffffff61461216565b81151561330b57fe5b049350611396565b60009350611396565b60046020908152600092835260408084209091529082529020805460019091015460ff1682565b60408051808201909152600981527f466f6d6f53706f72740000000000000000000000000000000000000000000000602082015281565b600260208190526000918252604090912080546001820154928201546003830154600490930154919392909160ff1685565b60008581526001602052604081206002015486908210613404576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b60008181526001602052604090206002015442101561345b576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b6000878152600160205260409020600301548790610100900460ff16156134ba576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020614f83833981519152604482015290519081900360640190fd5b60008881526001602081905260409091200154889088908110613515576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614f23833981519152604482015290519081900360640190fd5b73e3ff68fb79fee1989fb67eb04e196e361ecaec3e33148061354a575073b914843d2e56722a2c133eff956d1f99b820d46833145b80613568575073e0b005384df8f4d80e9a69b6210ec1929a935d9733145b80613586575073c52fa2c9411fcd4f58be2d6725094689c46242f233145b15156135ca576040805160e560020a62461bcd0281526020600482015260166024820152600080516020614f63833981519152604482015290519081900360640190fd5b62015180420186101561364d576040805160e560020a62461bcd02815260206004820152602960248201527f646561646c696e65206d757374206265206d6f7265207468616e206f6e65206460448201527f6179206c617465722e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008a815260016020526040902060038101805461ff001916610100179055600481018a9055613681906006018989614dd9565b5060008a81526001602081815260408084206005018a9055600382528084208d8552909152909120015415156137775760008a815260026020819052604090912060038101549101546136d99163ffffffff613e6416565b60008b815260026020526040812060010182905590955085111561377757733a2321ddc991c50518969b93d2c6b76bf5309790600160a060020a031663d0e30db0866040518263ffffffff1660e060020a0281526004016020604051808303818588803b15801561374957600080fd5b505af115801561375d573d6000803e3d6000fd5b50505050506040513d602081101561377457600080fd5b50505b897f37e6488813e1f30f34773029c3c5094d94bf010e0f9d48e7327dc8c80dfdc1158a8a8a4260405180858152602001806020018381526020018281038252858582818152602001925080828437604051920182900397509095505050505050a250505050505050505050565b6000606060008060606000876000600160008381526020019081526020016000206002015411151561384e576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b6000818152600160205260409020600201544210156138a5576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b60009450600160008a8152602001908152602001600020600101549350836040519080825280602002602001820160405280156138ec578160200160208202803883390190505b5088519093508414613948576040805160e560020a62461bcd02815260206004820152601960248201527f496e636f7272656374206e756d626572206f66207465616d7300000000000000604482015290519081900360640190fd5b600091505b83821015610fc7576000888381518110151561396557fe5b9060200190602002015111156139c45761399789838a8581518110151561398857fe5b9060200190602002015161125c565b83838151811015156139a557fe5b6020908102909101015282516139c190849084908110610fa257fe5b94505b60019091019061394d565b60008080803381328214613a1b576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b50803b8015613a62576040805160e560020a62461bcd02815260206004820152600a6024820152600080516020614ee3833981519152604482015290519081900360640190fd5b73e3ff68fb79fee1989fb67eb04e196e361ecaec3e331480613a97575073b914843d2e56722a2c133eff956d1f99b820d46833145b80613ab5575073e0b005384df8f4d80e9a69b6210ec1929a935d9733145b80613ad3575073c52fa2c9411fcd4f58be2d6725094689c46242f233145b1515613b17576040805160e560020a62461bcd0281526020600482015260166024820152600080516020614f63833981519152604482015290519081900360640190fd5b60008054600180820183558183526020526040909120909550613b3b908b8b614dd9565b5086935060008411613bbd576040805160e560020a62461bcd02815260206004820152602560248201527f6e756d626572206f66207465616d73206d757374206265206c6172676572207460448201527f68616e2030000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600085815260016020819052604082200185905592505b83831015613c6d576040805160a0810190915280898986818110613bf457fe5b6020908102929092013583525060008282018190526040808401829052606080850183905260809485018390528a835260038085528284208a8552855292829020865181559386015160018086019190915591860151600285015585015191830191909155929091015160049091015590920191613bd4565b60408051428152905186917fffe97dd58eb7f1cb0ff7a3875926969a358a30cd5ffb25826536fa825f9cd9de919081900360200190a2509298975050505050505050565b600360208181526000938452604080852090915291835291208054600182015460028301549383015460049093015491939092909185565b600560209081526000938452604080852082529284528284209052825290208054600182015460029092015490919083565b60008381526001602052604081206002015484908210613d73576040805160e560020a62461bcd0281526020600482015260116024820152600080516020614fa3833981519152604482015290519081900360640190fd5b600081815260016020526040902060020154421015613dca576040805160e560020a62461bcd0281526020600482015260146024820152600080516020614f03833981519152604482015290519081900360640190fd5b60008581526001602081905260409091200154859085908110613e25576040805160e560020a62461bcd0281526020600482015260156024820152600080516020614f23833981519152604482015290519081900360640190fd5b6000878152600360209081526040808320898452909152902060010154611393908690613e58908263ffffffff613e6416565b9063ffffffff6146e916565b81810182811015613ebf576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b6000613ef7613ed38461470f565b613eeb613ee6868663ffffffff613e6416565b61470f565b9063ffffffff61468916565b9392505050565b600060606000806000600160008a815260200190815260200160002060010154945084604051908082528060200260200182016040528015613f4a578160200160208202803883390190505b509350600080516020614f43833981519152600160a060020a03166382e37b2c896040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b158015613fa457600080fd5b505af1158015613fb8573d6000803e3d6000fd5b505050506040513d6020811015613fce57600080fd5b5051875190935060009250851461402f576040805160e560020a62461bcd02815260206004820152601e60248201527f4e756d626572206f66207465616d73206973206e6f7420636f72726563740000604482015290519081900360640190fd5b5060005b848110156142b6576000878281518110151561404b57fe5b9060200190602002015111156142ae57614083878281518110151561406c57fe5b60209081029091010151839063ffffffff613e6416565b91506140c9878281518110151561409657fe5b602090810290910181015160008c815260038352604080822086835290935291909120600201549063ffffffff613ec516565b84828151811015156140d757fe5b602090810290910181019190915260008981526005825260408082208c835283528082208483529092522060010154875161412f919089908490811061411957fe5b602090810290910101519063ffffffff613e6416565b60008981526005602090815260408083208d845282528083208584529091529020600181019190915554845161416c919086908490811061411957fe5b60008981526005602090815260408083208d845282528083208584528252808320939093558b8252600381528282208483529052206002015487516141b8919089908490811061411957fe5b60008a8152600360209081526040808320858452909152902060028101919091556001015484516141f0919086908490811061411957fe5b60008a8152600360209081526040808320858452909152902060010155865188908a907f18a23b86f4b8acd0f955d6e3ec369789fb102ae228e90508b157cd4f486d5134903390879086908d908290811061424757fe5b906020019060200201518a8881518110151561425f57fe5b602090810290910181015160408051600160a060020a03909716875291860194909452848101929092526060840152608083019190915260a082018b90524260c0830152519081900360e00190a35b600101614033565b348214614333576040805160e560020a62461bcd02815260206004820152602660248201527f546f74616c20455448206973206e6f74207468652073616d65206173206d736760448201527f2e76616c75650000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008981526002602052604090205461435390839063ffffffff613e6416565b60008a8152600260209081526040808320939093558a8252600481528282208c83529052205461438a90839063ffffffff613e6416565b60008981526004602090815260408083208d84529091529020556143b18989888588614794565b505050505050505050565b80518190600090819015156143d05761460a565b34915066038d7ea4c68000821061460a5782516040101561443b576040805160e560020a62461bcd02815260206004820152601360248201527f636f6d6d656e7420697320746f6f206c6f6e6700000000000000000000000000604482015290519081900360640190fd5b600080516020614f43833981519152600160a060020a03166382e37b2c866040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b15801561449257600080fd5b505af11580156144a6573d6000803e3d6000fd5b505050506040513d60208110156144bc57600080fd5b5051604080516080810182528781526020818101848152828401878152606084018a815260008d8152600685528681206007865287822054825285529590952084518155915160018301555160028201559251805194955091936145269260038501920190614e57565b505050600086815260076020908152604080832080546001019055805133808252818401869052918101869052426080820181905260a0606083018181528a519184019190915289518b968d967f8f4702bd2802aed8fedca976c79841e6448350313fae622b4294009f96573cfa96958a958c958f9591949293909260c085019291870191908190849084905b838110156145cb5781810151838201526020016145b3565b50505050905090810190601f1680156145f85780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a35b505050505050565b600082151561462357506000613ebf565b5081810281838281151561463357fe5b0414613ebf576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b6000828211156146e3576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b6000613ef7614706614701858563ffffffff61468916565b6149fe565b613eeb856149fe565b6000635d21dba06147846d24fa522d2e0f0db62017eac00000613eeb61477f7b05575be14f932abcdf1a51232967e37e965f45ec05c39000000000006121706b0a18f07d736b90be550000006147738a670de0b6b3a764000063ffffffff61461216565b9063ffffffff61461216565b614a6c565b81151561478d57fe5b0492915050565b60328204600080808080808060646147ad8b6003614612565b8115156147b657fe5b0496506147d46147c78d8d8a614ac5565b899063ffffffff613e6416565b975060646147e98b600f63ffffffff61461216565b8115156147f257fe5b04955060646148088b605063ffffffff61461216565b81151561481157fe5b049450733a2321ddc991c50518969b93d2c6b76bf5309790600160a060020a0316886040516020018080602001828103825260098152602001807f6465706f7369742829000000000000000000000000000000000000000000000081525060200191505060405160208183030381529060405260405180828051906020019080838360005b838110156148ae578181015183820152602001614896565b50505050905090810190601f1680156148db5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af192505050151561490957614906858963ffffffff613e6416565b94505b60008d8152600260208190526040909120015461492d90879063ffffffff613e6416565b60008e8152600260208190526040909120908101919091556003015461495a90869063ffffffff613e6416565b60008e8152600260205260408120600301919091558951945092505b83831015611ae75760008d81526003602090815260408083208684529091529020600401546149ac90879063ffffffff613e6416565b91506149d28d8d85858d888151811015156149c357fe5b90602001906020020151614be8565b60008e815260036020908152604080832087845290915290206004018190556001909301929050614976565b6000614a11670de0b6b3a7640000614d10565b6147846002614a45614a3186670de0b6b3a764000063ffffffff61461216565b6605543d9a07e4609063ffffffff61461216565b811515614a4e57fe5b04612170614a5b86614d10565b632e90edd09063ffffffff61461216565b6000806002614a7c846001613e64565b811515614a8557fe5b0490508291505b81811015614abf578091506002614aae8285811515614aa757fe5b0483613e64565b811515614ab757fe5b049050614a8c565b50919050565b600080831580614ad457508484145b15614ae0575081614be0565b600080516020614f43833981519152600160a060020a0316638febb1e5856040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b158015614b3757600080fd5b505af1158015614b4b573d6000803e3d6000fd5b505050506040513d6020811015614b6157600080fd5b505115614bdd57600080516020614f43833981519152600160a060020a031663bdf944b384866040518363ffffffff1660e060020a028152600401808281526020019150506000604051808303818588803b158015614bbf57600080fd5b505af1158015614bd3573d6000803e3d6000fd5b5050505050614be0565b50815b949350505050565b60008581526003602090815260408083208684529091528120600101548190811015614d02576000878152600360209081526040808320888452909152902060010154614c4385670de0b6b3a764000063ffffffff61461216565b811515614c4c57fe5b60008981526003602081815260408084208b855290915290912001549190049150614c7e90829063ffffffff613e6416565b60008881526003602081815260408084208a85529091529091200155614ca78787878487614d1c565b6000878152600360209081526040808320888452909152902060010154614cfb90670de0b6b3a764000090614ce390849063ffffffff61461216565b811515614cec57fe5b8691900463ffffffff61468916565b9150614d06565b8391505b5095945050505050565b6000613ebf8283614612565b60008082111561460a57670de0b6b3a7640000614d3f848463ffffffff61461216565b811515614d4857fe5b60008781526005602090815260408083208b845282528083208984528252808320600201548b845260038084528285208b865290935292200154929091049250614dac91612170908490670de0b6b3a764000090612da8908863ffffffff61461216565b60008681526005602090815260408083208a84528252808320888452909152902060020155505050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614e1a5782800160ff19823516178555614e47565b82800160010185558215614e47579182015b82811115614e47578235825591602001919060010190614e2c565b50614e53929150614ec5565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614e9857805160ff1916838001178555614e47565b82800160010185558215614e47579182015b82811115614e47578251825591602001919060010190614eaa565b614edf91905b80821115614e535760008155600101614ecb565b90560048756d616e206f6e6c790000000000000000000000000000000000000000000067616d65206e6f742073746172746564207965740000000000000000000000007468657265206973206e6f2073756368207465616d0000000000000000000000000000000000000000000000b440cf08bc2c78c33f3d29726d6c8ba5cbaa4b914f6e6c79206f776e65722063616e20646f20746869730000000000000000000067616d6520697320656e646564000000000000000000000000000000000000004e6f742061637469766174656420796574000000000000000000000000000000a165627a7a7230582022b951f3596b13018b8035548f06d7be87a1f4caab74689c89b652449eeda07b0029

Swarm Source

bzzr://22b951f3596b13018b8035548f06d7be87a1f4caab74689c89b652449eeda07b
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.