ETH Price: $1,942.61 (-1.50%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
When Game Dies61374882018-08-13 2:08:382750 days ago1534126118IN
0x643d60FE...Fb5eF8807
0 ETH0.0048418532
When Game Dies61374792018-08-13 2:06:212750 days ago1534125981IN
0x643d60FE...Fb5eF8807
0 ETH0.00061112
Buy Xname61372612018-08-13 1:17:322750 days ago1534123052IN
0x643d60FE...Fb5eF8807
0.01 ETH0.002063716
Withdraw61338602018-08-12 11:34:432751 days ago1534073683IN
0x643d60FE...Fb5eF8807
0 ETH0.001276314
Buy Xname61338312018-08-12 11:26:322751 days ago1534073192IN
0x643d60FE...Fb5eF8807
0.01 ETH0.001812044
Withdraw61324492018-08-12 5:42:112751 days ago1534052531IN
0x643d60FE...Fb5eF8807
0 ETH0.00019013
Buy Xname61287332018-08-11 14:27:352752 days ago1533997655IN
0x643d60FE...Fb5eF8807
0.01 ETH0.001840216
Buy Xname61245672018-08-10 21:33:272753 days ago1533936807IN
0x643d60FE...Fb5eF8807
0.08 ETH0.001812364
Buy Xname61136202018-08-09 1:22:232754 days ago1533777743IN
0x643d60FE...Fb5eF8807
0.02 ETH0.001068913
Buy Xname61060132018-08-07 18:30:382756 days ago1533666638IN
0x643d60FE...Fb5eF8807
0.01 ETH0.002525
Buy Xname61017112018-08-07 0:59:002756 days ago1533603540IN
0x643d60FE...Fb5eF8807
0.01 ETH0.00110953
Withdraw61003512018-08-06 19:28:242757 days ago1533583704IN
0x643d60FE...Fb5eF8807
0 ETH0.000637912
Buy Xname61003112018-08-06 19:16:222757 days ago1533582982IN
0x643d60FE...Fb5eF8807
0.01 ETH0.00068792
Withdraw61002822018-08-06 19:10:032757 days ago1533582603IN
0x643d60FE...Fb5eF8807
0 ETH0.000638152
Buy Xname60999882018-08-06 18:00:582757 days ago1533578458IN
0x643d60FE...Fb5eF8807
0.01 ETH0.001018322.5
Withdraw60984222018-08-06 11:39:422757 days ago1533555582IN
0x643d60FE...Fb5eF8807
0 ETH0.000253474
Withdraw60954922018-08-05 23:46:152758 days ago1533512775IN
0x643d60FE...Fb5eF8807
0 ETH0.00019013
Withdraw60949422018-08-05 21:39:322758 days ago1533505172IN
0x643d60FE...Fb5eF8807
0 ETH0.000316845
Withdraw60947912018-08-05 21:03:262758 days ago1533503006IN
0x643d60FE...Fb5eF8807
0 ETH0.000063361
Withdraw60947622018-08-05 20:55:392758 days ago1533502539IN
0x643d60FE...Fb5eF8807
0 ETH0.000056721.7
Buy Xname60947262018-08-05 20:49:012758 days ago1533502141IN
0x643d60FE...Fb5eF8807
0.01 ETH0.000498061.8
Buy Xname60947022018-08-05 20:41:452758 days ago1533501705IN
0x643d60FE...Fb5eF8807
0.01 ETH0.00040481.8
Buy Xname60946972018-08-05 20:40:382758 days ago1533501638IN
0x643d60FE...Fb5eF8807
0.01 ETH0.000693163
Buy Xname60946852018-08-05 20:36:462758 days ago1533501406IN
0x643d60FE...Fb5eF8807
0.01 ETH0.001617377
Buy Xname60946792018-08-05 20:35:032758 days ago1533501303IN
0x643d60FE...Fb5eF8807
0.01 ETH0.000984214
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer61374882018-08-13 2:08:382750 days ago1534126118
0x643d60FE...Fb5eF8807
0.28740964 ETH
Transfer61374792018-08-13 2:06:212750 days ago1534125981
0x643d60FE...Fb5eF8807
0.28740964 ETH
Transfer61372612018-08-13 1:17:322750 days ago1534123052
0x643d60FE...Fb5eF8807
0.003 ETH
Transfer61372612018-08-13 1:17:322750 days ago1534123052
0x643d60FE...Fb5eF8807
0.0001 ETH
Transfer61338602018-08-12 11:34:432751 days ago1534073683
0x643d60FE...Fb5eF8807
0.00916317 ETH
Transfer61338602018-08-12 11:34:432751 days ago1534073683
0x643d60FE...Fb5eF8807
0.00083542 ETH
Transfer61338602018-08-12 11:34:432751 days ago1534073683
0x643d60FE...Fb5eF8807
0.00016708 ETH
Transfer61338312018-08-12 11:26:322751 days ago1534073192
0x643d60FE...Fb5eF8807
0.003 ETH
Transfer61338312018-08-12 11:26:322751 days ago1534073192
0x643d60FE...Fb5eF8807
0.0001 ETH
Transfer61324492018-08-12 5:42:112751 days ago1534052531
0x643d60FE...Fb5eF8807
0.0454487 ETH
Transfer61287332018-08-11 14:27:352752 days ago1533997655
0x643d60FE...Fb5eF8807
0.00226169 ETH
Transfer61287332018-08-11 14:27:352752 days ago1533997655
0x643d60FE...Fb5eF8807
0.00045233 ETH
Transfer61245672018-08-10 21:33:272753 days ago1533936807
0x643d60FE...Fb5eF8807
0.024 ETH
Transfer61245672018-08-10 21:33:272753 days ago1533936807
0x643d60FE...Fb5eF8807
0.0008 ETH
Transfer61136202018-08-09 1:22:232754 days ago1533777743
0x643d60FE...Fb5eF8807
0.00040679 ETH
Transfer61136202018-08-09 1:22:232754 days ago1533777743
0x643d60FE...Fb5eF8807
0.00008135 ETH
Transfer61017112018-08-07 0:59:002756 days ago1533603540
0x643d60FE...Fb5eF8807
0.003 ETH
Transfer61017112018-08-07 0:59:002756 days ago1533603540
0x643d60FE...Fb5eF8807
0.0001 ETH
Transfer61003512018-08-06 19:28:242757 days ago1533583704
0x643d60FE...Fb5eF8807
0.00734725 ETH
Transfer61003512018-08-06 19:28:242757 days ago1533583704
0x643d60FE...Fb5eF8807
0.00054718 ETH
Transfer61003512018-08-06 19:28:242757 days ago1533583704
0x643d60FE...Fb5eF8807
0.00010943 ETH
Transfer61003112018-08-06 19:16:222757 days ago1533582982
0x643d60FE...Fb5eF8807
0.003 ETH
Transfer61003112018-08-06 19:16:222757 days ago1533582982
0x643d60FE...Fb5eF8807
0.0001 ETH
Transfer61002822018-08-06 19:10:032757 days ago1533582603
0x643d60FE...Fb5eF8807
0.010885 ETH
Transfer61002822018-08-06 19:10:032757 days ago1533582603
0x643d60FE...Fb5eF8807
0.00110873 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
POOHMOX

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-08-05
*/

pragma solidity ^0.4.24;

contract POOHMOXevents {
    // fired whenever a player registers a name
    event onNewName
    (
        uint256 indexed playerID,
        address indexed playerAddress,
        bytes32 indexed playerName,
        bool isNewPlayer,
        uint256 affiliateID,
        address affiliateAddress,
        bytes32 affiliateName,
        uint256 amountPaid,
        uint256 timeStamp
    );

    // fired at end of buy or reload
    event onEndTx
    (
        uint256 compressedData,
        uint256 compressedIDs,
        bytes32 playerName,
        address playerAddress,
        uint256 ethIn,
        uint256 keysBought,
        address winnerAddr,
        bytes32 winnerName,
        uint256 amountWon,
        uint256 newPot,
        uint256 POOHAmount,
        uint256 genAmount,
        uint256 potAmount
    );

    // fired whenever theres a withdraw
    event onWithdraw
    (
        uint256 indexed playerID,
        address playerAddress,
        bytes32 playerName,
        uint256 ethOut,
        uint256 timeStamp
    );

    // fired whenever a withdraw forces end round to be ran
    event onWithdrawAndDistribute
    (
        address playerAddress,
        bytes32 playerName,
        uint256 ethOut,
        uint256 compressedData,
        uint256 compressedIDs,
        address winnerAddr,
        bytes32 winnerName,
        uint256 amountWon,
        uint256 newPot,
        uint256 POOHAmount,
        uint256 genAmount
    );

    // fired whenever a player tries a buy after round timer
    // hit zero, and causes end round to be ran.
    event onBuyAndDistribute
    (
        address playerAddress,
        bytes32 playerName,
        uint256 ethIn,
        uint256 compressedData,
        uint256 compressedIDs,
        address winnerAddr,
        bytes32 winnerName,
        uint256 amountWon,
        uint256 newPot,
        uint256 POOHAmount,
        uint256 genAmount
    );

    // fired whenever a player tries a reload after round timer
    // hit zero, and causes end round to be ran.
    event onReLoadAndDistribute
    (
        address playerAddress,
        bytes32 playerName,
        uint256 compressedData,
        uint256 compressedIDs,
        address winnerAddr,
        bytes32 winnerName,
        uint256 amountWon,
        uint256 newPot,
        uint256 POOHAmount,
        uint256 genAmount
    );

    // fired whenever an affiliate is paid
    event onAffiliatePayout
    (
        uint256 indexed affiliateID,
        address affiliateAddress,
        bytes32 affiliateName,
        uint256 indexed roundID,
        uint256 indexed buyerID,
        uint256 amount,
        uint256 timeStamp
    );

    // received pot swap deposit
    event onPotSwapDeposit
    (
        uint256 roundID,
        uint256 amountAddedToPot
    );
}

//==============================================================================
//   _ _  _ _|_ _ _  __|_   _ _ _|_    _   .
//  (_(_)| | | | (_|(_ |   _\(/_ | |_||_)  .
//====================================|=========================================

contract POOHMOX is POOHMOXevents {
    using SafeMath for *;
    using NameFilter for string;
    using KeysCalc for uint256;

    PlayerBookInterface private PlayerBook;

//==============================================================================
//     _ _  _  |`. _     _ _ |_ | _  _  .
//    (_(_)| |~|~|(_||_|| (_||_)|(/__\  .  (game settings)
//=================_|===========================================================
    address private admin = msg.sender;
    address private flushDivs;
    string constant public name = "POOHMOX";
    string constant public symbol = "POOHMOX";
    uint256 private rndExtra_ = 1 seconds;     // length of the very first ICO phase
    uint256 private rndGap_ = 1 seconds;       // length of ICO phases
    uint256 private rndInit_ = 5 minutes;      // round timer starts at this
    uint256 private rndMax_ = 5 minutes;       // max length a round timer can be  (for first round) 
    uint256 constant private rndInc_ = 5 minutes;// every full key purchased adds this much to the timer
                                 
//==============================================================================
//     _| _ _|_ _    _ _ _|_    _   .
//    (_|(_| | (_|  _\(/_ | |_||_)  .  (data used to store game info that changes)
//=============================|================================================
    uint256 public rID_;    // round id number / total rounds that have happened
//****************
// PLAYER DATA
//****************
    mapping (address => uint256) public pIDxAddr_;          // (addr => pID) returns player id by address
    mapping (bytes32 => uint256) public pIDxName_;          // (name => pID) returns player id by name
    mapping (uint256 => POOHMOXDatasets.Player) public plyr_;   // (pID => data) player data
    mapping (uint256 => mapping (uint256 => POOHMOXDatasets.PlayerRounds)) public plyrRnds_;    // (pID => rID => data) player round data by player id & round id
    mapping (uint256 => mapping (bytes32 => bool)) public plyrNames_; // (pID => name => bool) list of names a player owns.  (used so you can change your display name amongst any name you own)
//****************
// ROUND DATA
//****************
    mapping (uint256 => POOHMOXDatasets.Round) public round_;   // (rID => data) round data
    mapping (uint256 => mapping(uint256 => uint256)) public rndTmEth_;      // (rID => tID => data) eth in per team, by round id and team id
//****************
// TEAM FEE DATA
//****************
    mapping (uint256 => POOHMOXDatasets.TeamFee) public fees_;          // (team => fees) fee distribution by team
    mapping (uint256 => POOHMOXDatasets.PotSplit) public potSplit_;     // (team => fees) pot split distribution by team
//==============================================================================
//     _ _  _  __|_ _    __|_ _  _  .
//    (_(_)| |_\ | | |_|(_ | (_)|   .  (initial data setup upon contract deploy)
//==============================================================================
    constructor(address whaleContract, address playerbook)
        public
    {
        flushDivs = whaleContract;
        PlayerBook = PlayerBookInterface(playerbook);

        //no teams... only POOH-heads
        // Referrals / Community rewards are mathematically designed to come from the winner's share of the pot.
        fees_[0] = POOHMOXDatasets.TeamFee(39,20);   //30% to pot, 10% to aff, 1% to dev,
       

        potSplit_[0] = POOHMOXDatasets.PotSplit(15,10);  //36% to winner, 36% to next round, 3% to dev
    }
//==============================================================================
//     _ _  _  _|. |`. _  _ _  .
//    | | |(_)(_||~|~|(/_| _\  .  (these are safety checks)
//==============================================================================
    /**
     * @dev used to make sure no one can interact with contract until it has
     * been activated.
     */
    modifier isActivated() {
        require(activated_ == true);
        _;
    }

    /**
     * @dev prevents contracts from interacting with fomo3d
     */
    modifier isHuman() {
        address _addr = msg.sender;
        uint256 _codeLength;

        assembly {_codeLength := extcodesize(_addr)}
        require(_codeLength == 0);
        require(_addr == tx.origin);
        _;
    }

    /**
     * @dev sets boundaries for incoming tx
     */
    modifier isWithinLimits(uint256 _eth) {
        require(_eth >= 1000000000);
        require(_eth <= 100000000000000000000000);
        _;
    }

//==============================================================================
//     _    |_ |. _   |`    _  __|_. _  _  _  .
//    |_)|_||_)||(_  ~|~|_|| |(_ | |(_)| |_\  .  (use these to interact with contract)
//====|=========================================================================
    /**
     * @dev emergency buy uses last stored affiliate ID
     */
    function()
        isActivated()
        isHuman()
        isWithinLimits(msg.value)
        public
        payable
    {
        // set up our tx event data and determine if player is new or not
        POOHMOXDatasets.EventReturns memory _eventData_ = determinePID(_eventData_);

        // fetch player id
        uint256 _pID = pIDxAddr_[msg.sender];

        // buy core
        buyCore(_pID, plyr_[_pID].laff, _eventData_);
    }

    /**
     * @dev converts all incoming ethereum to keys.
     * -functionhash- 0x8f38f309 (using ID for affiliate)
     * -functionhash- 0x98a0871d (using address for affiliate)
     * -functionhash- 0xa65b37a1 (using name for affiliate)
     * @param _affCode the ID/address/name of the player who gets the affiliate fee
     */
    function buyXid(uint256 _affCode)
        isActivated()
        isHuman()
        isWithinLimits(msg.value)
        public
        payable
    {
        // set up our tx event data and determine if player is new or not
        POOHMOXDatasets.EventReturns memory _eventData_ = determinePID(_eventData_);

        // fetch player id
        uint256 _pID = pIDxAddr_[msg.sender];

        // manage affiliate residuals
        // if no affiliate code was given or player tried to use their own, lolz
        if (_affCode == 0 || _affCode == _pID)
        {
            // use last stored affiliate code
            _affCode = plyr_[_pID].laff;

        // if affiliate code was given & its not the same as previously stored
        } else if (_affCode != plyr_[_pID].laff) {
            // update last affiliate
            plyr_[_pID].laff = _affCode;
        }

        // buy core
        buyCore(_pID, _affCode, _eventData_);
    }

    function buyXaddr(address _affCode)
        isActivated()
        isHuman()
        isWithinLimits(msg.value)
        public
        payable
    {
        // set up our tx event data and determine if player is new or not
        POOHMOXDatasets.EventReturns memory _eventData_ = determinePID(_eventData_);

        // fetch player id
        uint256 _pID = pIDxAddr_[msg.sender];

        // manage affiliate residuals
        uint256 _affID;
        // if no affiliate code was given or player tried to use their own, lolz
        if (_affCode == address(0) || _affCode == msg.sender)
        {
            // use last stored affiliate code
            _affID = plyr_[_pID].laff;

        // if affiliate code was given
        } else {
            // get affiliate ID from aff Code
            _affID = pIDxAddr_[_affCode];

            // if affID is not the same as previously stored
            if (_affID != plyr_[_pID].laff)
            {
                // update last affiliate
                plyr_[_pID].laff = _affID;
            }
        }
        // buy core
        buyCore(_pID, _affID, _eventData_);
    }

    function buyXname(bytes32 _affCode)
        isActivated()
        isHuman()
        isWithinLimits(msg.value)
        public
        payable
    {
        // set up our tx event data and determine if player is new or not
        POOHMOXDatasets.EventReturns memory _eventData_ = determinePID(_eventData_);

        // fetch player id
        uint256 _pID = pIDxAddr_[msg.sender];

        // manage affiliate residuals
        uint256 _affID;
        // if no affiliate code was given or player tried to use their own, lolz
        if (_affCode == '' || _affCode == plyr_[_pID].name)
        {
            // use last stored affiliate code
            _affID = plyr_[_pID].laff;

        // if affiliate code was given
        } else {
            // get affiliate ID from aff Code
            _affID = pIDxName_[_affCode];

            // if affID is not the same as previously stored
            if (_affID != plyr_[_pID].laff)
            {
                // update last affiliate
                plyr_[_pID].laff = _affID;
            }
        }

        // buy core
        buyCore(_pID, _affID, _eventData_);
    }

    /**
     * @dev essentially the same as buy, but instead of you sending ether
     * from your wallet, it uses your unwithdrawn earnings.
     * -functionhash- 0x349cdcac (using ID for affiliate)
     * -functionhash- 0x82bfc739 (using address for affiliate)
     * -functionhash- 0x079ce327 (using name for affiliate)
     * @param _affCode the ID/address/name of the player who gets the affiliate fee
     * @param _eth amount of earnings to use (remainder returned to gen vault)
     */
    function reLoadXid(uint256 _affCode, uint256 _eth)
        isActivated()
        isHuman()
        isWithinLimits(_eth)
        public
    {
        // set up our tx event data
        POOHMOXDatasets.EventReturns memory _eventData_;

        // fetch player ID
        uint256 _pID = pIDxAddr_[msg.sender];

        // manage affiliate residuals
        // if no affiliate code was given or player tried to use their own, lolz
        if (_affCode == 0 || _affCode == _pID)
        {
            // use last stored affiliate code
            _affCode = plyr_[_pID].laff;

        // if affiliate code was given & its not the same as previously stored
        } else if (_affCode != plyr_[_pID].laff) {
            // update last affiliate
            plyr_[_pID].laff = _affCode;
        }

        // reload core
        reLoadCore(_pID, _affCode, _eth, _eventData_);
    }

    function reLoadXaddr(address _affCode, uint256 _eth)
        isActivated()
        isHuman()
        isWithinLimits(_eth)
        public
    {
        // set up our tx event data
        POOHMOXDatasets.EventReturns memory _eventData_;

        // fetch player ID
        uint256 _pID = pIDxAddr_[msg.sender];

        // manage affiliate residuals
        uint256 _affID;
        // if no affiliate code was given or player tried to use their own, lolz
        if (_affCode == address(0) || _affCode == msg.sender)
        {
            // use last stored affiliate code
            _affID = plyr_[_pID].laff;

        // if affiliate code was given
        } else {
            // get affiliate ID from aff Code
            _affID = pIDxAddr_[_affCode];

            // if affID is not the same as previously stored
            if (_affID != plyr_[_pID].laff)
            {
                // update last affiliate
                plyr_[_pID].laff = _affID;
            }
        }

        // reload core
        reLoadCore(_pID, _affID, _eth, _eventData_);
    }

    function reLoadXname(bytes32 _affCode, uint256 _eth)
        isActivated()
        isHuman()
        isWithinLimits(_eth)
        public
    {
        // set up our tx event data
        POOHMOXDatasets.EventReturns memory _eventData_;

        // fetch player ID
        uint256 _pID = pIDxAddr_[msg.sender];

        // manage affiliate residuals
        uint256 _affID;
        // if no affiliate code was given or player tried to use their own, lolz
        if (_affCode == '' || _affCode == plyr_[_pID].name)
        {
            // use last stored affiliate code
            _affID = plyr_[_pID].laff;

        // if affiliate code was given
        } else {
            // get affiliate ID from aff Code
            _affID = pIDxName_[_affCode];

            // if affID is not the same as previously stored
            if (_affID != plyr_[_pID].laff)
            {
                // update last affiliate
                plyr_[_pID].laff = _affID;
            }
        }

        // reload core
        reLoadCore(_pID, _affID, _eth, _eventData_);
    }

    /**
     * @dev withdraws all of your earnings.
     * -functionhash- 0x3ccfd60b
     */
    function withdraw()
        isActivated()
        isHuman()
        public
    {
        // setup local rID
        uint256 _rID = rID_;

        // grab time
        uint256 _now = now;

        // fetch player ID
        uint256 _pID = pIDxAddr_[msg.sender];

        // setup temp var for player eth
        uint256 _eth;

        // check to see if round has ended and no one has run round end yet
        if (_now > round_[_rID].end && round_[_rID].ended == false && round_[_rID].plyr != 0)
        {
            // set up our tx event data
            POOHMOXDatasets.EventReturns memory _eventData_;

            // end the round (distributes pot)
            round_[_rID].ended = true;
            _eventData_ = endRound(_eventData_);

            // get their earnings
            _eth = withdrawEarnings(_pID);

            // gib moni
            if (_eth > 0)
                plyr_[_pID].addr.transfer(_eth);

            // build event data
            _eventData_.compressedData = _eventData_.compressedData + (_now * 1000000000000000000);
            _eventData_.compressedIDs = _eventData_.compressedIDs + _pID;

            // fire withdraw and distribute event
            emit POOHMOXevents.onWithdrawAndDistribute
            (
                msg.sender,
                plyr_[_pID].name,
                _eth,
                _eventData_.compressedData,
                _eventData_.compressedIDs,
                _eventData_.winnerAddr,
                _eventData_.winnerName,
                _eventData_.amountWon,
                _eventData_.newPot,
                _eventData_.POOHAmount,
                _eventData_.genAmount
            );

        // in any other situation
        } else {
            // get their earnings
            _eth = withdrawEarnings(_pID);

            // gib moni
            if (_eth > 0)
                plyr_[_pID].addr.transfer(_eth);

            // fire withdraw event
            emit POOHMOXevents.onWithdraw(_pID, msg.sender, plyr_[_pID].name, _eth, _now);
        }
    }

    /**
     * @dev use these to register names.  they are just wrappers that will send the
     * registration requests to the PlayerBook contract.  So registering here is the
     * same as registering there.  UI will always display the last name you registered.
     * but you will still own all previously registered names to use as affiliate
     * links.
     * - must pay a registration fee.
     * - name must be unique
     * - names will be converted to lowercase
     * - name cannot start or end with a space
     * - cannot have more than 1 space in a row
     * - cannot be only numbers
     * - cannot start with 0x
     * - name must be at least 1 char
     * - max length of 32 characters long
     * - allowed characters: a-z, 0-9, and space
     * -functionhash- 0x921dec21 (using ID for affiliate)
     * -functionhash- 0x3ddd4698 (using address for affiliate)
     * -functionhash- 0x685ffd83 (using name for affiliate)
     * @param _nameString players desired name
     * @param _affCode affiliate ID, address, or name of who referred you
     * @param _all set to true if you want this to push your info to all games
     * (this might cost a lot of gas)
     */
    function registerNameXID(string _nameString, uint256 _affCode, bool _all)
        isHuman()
        public
        payable
    {
        bytes32 _name = _nameString.nameFilter();
        address _addr = msg.sender;
        uint256 _paid = msg.value;
        (bool _isNewPlayer, uint256 _affID) = PlayerBook.registerNameXIDFromDapp.value(_paid)(_addr, _name, _affCode, _all);

        uint256 _pID = pIDxAddr_[_addr];

        // fire event
        emit POOHMOXevents.onNewName(_pID, _addr, _name, _isNewPlayer, _affID, plyr_[_affID].addr, plyr_[_affID].name, _paid, now);
    }

    function registerNameXaddr(string _nameString, address _affCode, bool _all)
        isHuman()
        public
        payable
    {
        bytes32 _name = _nameString.nameFilter();
        address _addr = msg.sender;
        uint256 _paid = msg.value;
        (bool _isNewPlayer, uint256 _affID) = PlayerBook.registerNameXaddrFromDapp.value(msg.value)(msg.sender, _name, _affCode, _all);

        uint256 _pID = pIDxAddr_[_addr];

        // fire event
        emit POOHMOXevents.onNewName(_pID, _addr, _name, _isNewPlayer, _affID, plyr_[_affID].addr, plyr_[_affID].name, _paid, now);
    }

    function registerNameXname(string _nameString, bytes32 _affCode, bool _all)
        isHuman()
        public
        payable
    {
        bytes32 _name = _nameString.nameFilter();
        address _addr = msg.sender;
        uint256 _paid = msg.value;
        (bool _isNewPlayer, uint256 _affID) = PlayerBook.registerNameXnameFromDapp.value(msg.value)(msg.sender, _name, _affCode, _all);

        uint256 _pID = pIDxAddr_[_addr];

        // fire event
        emit POOHMOXevents.onNewName(_pID, _addr, _name, _isNewPlayer, _affID, plyr_[_affID].addr, plyr_[_affID].name, _paid, now);
    }
//==============================================================================
//     _  _ _|__|_ _  _ _  .
//    (_|(/_ |  | (/_| _\  . (for UI & viewing things on etherscan)
//=====_|=======================================================================
    /**
     * @dev return the price buyer will pay for next 1 individual key.
     * -functionhash- 0x018a25e8
     * @return price for next key bought (in wei format)
     */
    function getBuyPrice()
        public
        view
        returns(uint256)
    {
       return 0.01 ether;
    }

    /**
     * @dev returns time left.  dont spam this, you'll ddos yourself from your node
     * provider
     * -functionhash- 0xc7e284b8
     * @return time left in seconds
     */
    function getTimeLeft()
        public
        view
        returns(uint256)
    {
        // setup local rID
        uint256 _rID = rID_;

        // grab time
        uint256 _now = now;

        if (_now < round_[_rID].end)
            if (_now > round_[_rID].strt + rndGap_)
                return( (round_[_rID].end).sub(_now) );
            else
                return( (round_[_rID].strt + rndGap_).sub(_now) );
        else
            return(0);
    }

    /**
     * @dev returns player earnings per vaults
     * -functionhash- 0x63066434
     * @return winnings vault
     * @return general vault
     * @return affiliate vault
     */
    function getPlayerVaults(uint256 _pID)
        public
        view
        returns(uint256 ,uint256, uint256)
    {
        // setup local rID
        uint256 _rID = rID_;

        // if round has ended.  but round end has not been run (so contract has not distributed winnings)
        if (now > round_[_rID].end && round_[_rID].ended == false && round_[_rID].plyr != 0)
        {
            // if player is winner
            if (round_[_rID].plyr == _pID)
            {
                return
                (
                    (plyr_[_pID].win).add( ((round_[_rID].pot).mul(48)) / 100 ),
                    (plyr_[_pID].gen).add(  getPlayerVaultsHelper(_pID, _rID).sub(plyrRnds_[_pID][_rID].mask)   ),
                    plyr_[_pID].aff
                );
            // if player is not the winner
            } else {
                return
                (
                    plyr_[_pID].win,
                    (plyr_[_pID].gen).add(  getPlayerVaultsHelper(_pID, _rID).sub(plyrRnds_[_pID][_rID].mask)  ),
                    plyr_[_pID].aff
                );
            }

        // if round is still going on, or round has ended and round end has been ran
        } else {
            return
            (
                plyr_[_pID].win,
                (plyr_[_pID].gen).add(calcUnMaskedEarnings(_pID, plyr_[_pID].lrnd)),
                plyr_[_pID].aff
            );
        }
    }

    /**
     * solidity hates stack limits.  this lets us avoid that hate
     */
    function getPlayerVaultsHelper(uint256 _pID, uint256 _rID)
        private
        view
        returns(uint256)
    {
        return(  ((((round_[_rID].mask).add(((((round_[_rID].pot).mul(potSplit_[round_[_rID].team].gen)) / 100).mul(1000000000000000000)) / (round_[_rID].keys))).mul(plyrRnds_[_pID][_rID].keys)) / 1000000000000000000)  );
    }

    /**
     * @dev returns all current round info needed for front end
     * -functionhash- 0x747dff42
     * @return eth invested during ICO phase
     * @return round id
     * @return total keys for round
     * @return time round ends
     * @return time round started
     * @return current pot
     * @return current team ID & player ID in lead
     * @return current player in leads address
     * @return current player in leads name
     * @return whales eth in for round
     * @return bears eth in for round
     * @return sneks eth in for round
     * @return bulls eth in for round
     */
    function getCurrentRoundInfo()
        public
        view
        returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, address, bytes32, uint256, uint256, uint256, uint256)
    {
        // setup local rID
        uint256 _rID = rID_;

        return
        (
            round_[_rID].ico,               //0
            _rID,                           //1
            round_[_rID].keys,              //2
            round_[_rID].end,               //3
            round_[_rID].strt,              //4
            round_[_rID].pot,               //5
            (round_[_rID].team + (round_[_rID].plyr * 10)),     //6
            plyr_[round_[_rID].plyr].addr,  //7
            plyr_[round_[_rID].plyr].name,  //8
            rndTmEth_[_rID][0],             //9
            rndTmEth_[_rID][1],             //10
            rndTmEth_[_rID][2],             //11
            rndTmEth_[_rID][3]              //12
          
        );
    }

    /**
     * @dev returns player info based on address.  if no address is given, it will
     * use msg.sender
     * -functionhash- 0xee0b5d8b
     * @param _addr address of the player you want to lookup
     * @return player ID
     * @return player name
     * @return keys owned (current round)
     * @return winnings vault
     * @return general vault
     * @return affiliate vault
     * @return player round eth
     */
    function getPlayerInfoByAddress(address _addr)
        public
        view
        returns(uint256, bytes32, uint256, uint256, uint256, uint256, uint256)
    {
        // setup local rID
        uint256 _rID = rID_;

        if (_addr == address(0))
        {
            _addr == msg.sender;
        }
        uint256 _pID = pIDxAddr_[_addr];

        return
        (
            _pID,                               //0
            plyr_[_pID].name,                   //1
            plyrRnds_[_pID][_rID].keys,         //2
            plyr_[_pID].win,                    //3
            (plyr_[_pID].gen).add(calcUnMaskedEarnings(_pID, plyr_[_pID].lrnd)),       //4
            plyr_[_pID].aff,                    //5
            plyrRnds_[_pID][_rID].eth           //6
        );
    }

//==============================================================================
//     _ _  _ _   | _  _ . _  .
//    (_(_)| (/_  |(_)(_||(_  . (this + tools + calcs + modules = our softwares engine)
//=====================_|=======================================================
    /**
     * @dev logic runs whenever a buy order is executed.  determines how to handle
     * incoming eth depending on if we are in an active round or not
     */
    function buyCore(uint256 _pID, uint256 _affID, POOHMOXDatasets.EventReturns memory _eventData_)
        private
    {
        // setup local rID
        uint256 _rID = rID_;

        // grab time
        uint256 _now = now;

        // if round is active
        if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
        {
            // call core
            core(_rID, _pID, msg.value, _affID, 0, _eventData_);

        // if round is not active
        } else {
            // check to see if end round needs to be ran
            if (_now > round_[_rID].end && round_[_rID].ended == false)
            {
                // end the round (distributes pot) & start new round
                round_[_rID].ended = true;
                _eventData_ = endRound(_eventData_);

                // build event data
                _eventData_.compressedData = _eventData_.compressedData + (_now * 1000000000000000000);
                _eventData_.compressedIDs = _eventData_.compressedIDs + _pID;

                // fire buy and distribute event
                emit POOHMOXevents.onBuyAndDistribute
                (
                    msg.sender,
                    plyr_[_pID].name,
                    msg.value,
                    _eventData_.compressedData,
                    _eventData_.compressedIDs,
                    _eventData_.winnerAddr,
                    _eventData_.winnerName,
                    _eventData_.amountWon,
                    _eventData_.newPot,
                    _eventData_.POOHAmount,
                    _eventData_.genAmount
                );
            }

            // put eth in players vault
            plyr_[_pID].gen = plyr_[_pID].gen.add(msg.value);
        }
    }

    /**
     * @dev logic runs whenever a reload order is executed.  determines how to handle
     * incoming eth depending on if we are in an active round or not
     */
    function reLoadCore(uint256 _pID, uint256 _affID, uint256 _eth, POOHMOXDatasets.EventReturns memory _eventData_)
        private
    {
        // setup local rID
        uint256 _rID = rID_;

        // grab time
        uint256 _now = now;

        // if round is active
        if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
        {
            // get earnings from all vaults and return unused to gen vault
            // because we use a custom safemath library.  this will throw if player
            // tried to spend more eth than they have.
            plyr_[_pID].gen = withdrawEarnings(_pID).sub(_eth);

            // call core
            core(_rID, _pID, _eth, _affID, 0, _eventData_);

        // if round is not active and end round needs to be ran
        } else if (_now > round_[_rID].end && round_[_rID].ended == false) {
            // end the round (distributes pot) & start new round
            round_[_rID].ended = true;
            _eventData_ = endRound(_eventData_);

            // build event data
            _eventData_.compressedData = _eventData_.compressedData + (_now * 1000000000000000000);
            _eventData_.compressedIDs = _eventData_.compressedIDs + _pID;

            // fire buy and distribute event
            emit POOHMOXevents.onReLoadAndDistribute
            (
                msg.sender,
                plyr_[_pID].name,
                _eventData_.compressedData,
                _eventData_.compressedIDs,
                _eventData_.winnerAddr,
                _eventData_.winnerName,
                _eventData_.amountWon,
                _eventData_.newPot,
                _eventData_.POOHAmount,
                _eventData_.genAmount
            );
        }
    }

    /**
     * @dev this is the core logic for any buy/reload that happens while a round
     * is live.
     */
    function core(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, POOHMOXDatasets.EventReturns memory _eventData_)
        private
    {
        require(_eth >= 0.01 ether);

        // if player is new to round
        if (plyrRnds_[_pID][_rID].keys == 0)
            _eventData_ = managePlayer(_pID, _eventData_);

        // // early round eth limiter
        // if (round_[_rID].eth < 100000000000000000000 && plyrRnds_[_pID][_rID].eth.add(_eth) > 5000000000000000000)
        // {
        //     uint256 _availableLimit = (5000000000000000000).sub(plyrRnds_[_pID][_rID].eth);
        //     uint256 _refund = _eth.sub(_availableLimit);
        //     plyr_[_pID].gen = plyr_[_pID].gen.add(_refund);
        //     _eth = _availableLimit;
        // }

        // if eth left is greater than min eth allowed (sorry no pocket lint)
       

            // mint the new keys
            uint256 _keys = (round_[_rID].eth).keysRec(_eth);

            // if they bought at least 1 whole key
            if (_keys >= 1000000000000000000)
            {
                updateTimer(_keys, _rID);

                // set new leaders
                if (round_[_rID].plyr != _pID)
                    round_[_rID].plyr = _pID;
                if (round_[_rID].team != _team)
                    round_[_rID].team = _team;

                // set the new leader bool to true
                _eventData_.compressedData = _eventData_.compressedData + 100;
            }

            // update player
            plyrRnds_[_pID][_rID].keys = _keys.add(plyrRnds_[_pID][_rID].keys);
            plyrRnds_[_pID][_rID].eth = _eth.add(plyrRnds_[_pID][_rID].eth);

            // update round
            round_[_rID].keys = _keys.add(round_[_rID].keys);
            round_[_rID].eth = _eth.add(round_[_rID].eth);
            rndTmEth_[_rID][0] = _eth.add(rndTmEth_[_rID][0]);

            // distribute eth
            _eventData_ = distributeExternal(_rID, _pID, _eth, _affID, 0, _eventData_);
            _eventData_ = distributeInternal(_rID, _pID, _eth, 0, _keys, _eventData_);

            // call end tx function to fire end tx event.
            endTx(_pID, 0, _eth, _keys, _eventData_);
    }
//==============================================================================
//     _ _ | _   | _ _|_ _  _ _  .
//    (_(_||(_|_||(_| | (_)| _\  .
//==============================================================================
    /**
     * @dev calculates unmasked earnings (just calculates, does not update mask)
     * @return earnings in wei format
     */
    function calcUnMaskedEarnings(uint256 _pID, uint256 _rIDlast)
        private
        view
        returns(uint256)
    {
        return(  (((round_[_rIDlast].mask).mul(plyrRnds_[_pID][_rIDlast].keys)) / (1000000000000000000)).sub(plyrRnds_[_pID][_rIDlast].mask)  );
    }

    /**
     * @dev returns the amount of keys you would get given an amount of eth.
     * -functionhash- 0xce89c80c
     * @param _rID round ID you want price for
     * @param _eth amount of eth sent in
     * @return keys received
     */
    function calcKeysReceived(uint256 _rID, uint256 _eth)
        public
        view
        returns(uint256)
    {
        // grab time
        uint256 _now = now;

        // are we in a round?
        if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
            return ( (round_[_rID].eth).keysRec(_eth) );
        else // rounds over.  need keys for new round
            return ( (_eth).keys() );
    }

    /**
     * @dev returns current eth price for X keys.
     * -functionhash- 0xcf808000
     * @param _keys number of keys desired (in 18 decimal format)
     * @return amount of eth needed to send
     */
    function iWantXKeys(uint256 _keys)
        public
        view
        returns(uint256)
    {
        // setup local rID
        uint256 _rID = rID_;

        // grab time
        uint256 _now = now;

        // are we in a round?
        if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
            return ( (round_[_rID].keys.add(_keys)).ethRec(_keys) );
        else // rounds over.  need price for new round
            return ( (_keys).eth() );
    }
//==============================================================================
//    _|_ _  _ | _  .
//     | (_)(_)|_\  .
//==============================================================================
    /**
     * @dev receives name/player info from names contract
     */
    function receivePlayerInfo(uint256 _pID, address _addr, bytes32 _name, uint256 _laff)
        external
    {
        require (msg.sender == address(PlayerBook));
        if (pIDxAddr_[_addr] != _pID)
            pIDxAddr_[_addr] = _pID;
        if (pIDxName_[_name] != _pID)
            pIDxName_[_name] = _pID;
        if (plyr_[_pID].addr != _addr)
            plyr_[_pID].addr = _addr;
        if (plyr_[_pID].name != _name)
            plyr_[_pID].name = _name;
        if (plyr_[_pID].laff != _laff)
            plyr_[_pID].laff = _laff;
        if (plyrNames_[_pID][_name] == false)
            plyrNames_[_pID][_name] = true;
    }

    /**
     * @dev receives entire player name list
     */
    function receivePlayerNameList(uint256 _pID, bytes32 _name)
        external
    {
        require (msg.sender == address(PlayerBook));
        if(plyrNames_[_pID][_name] == false)
            plyrNames_[_pID][_name] = true;
    }

    /**
     * @dev gets existing or registers new pID.  use this when a player may be new
     * @return pID
     */
    function determinePID(POOHMOXDatasets.EventReturns memory _eventData_)
        private
        returns (POOHMOXDatasets.EventReturns)
    {
        uint256 _pID = pIDxAddr_[msg.sender];
        // if player is new to this version of fomo3d
        if (_pID == 0)
        {
            // grab their player ID, name and last aff ID, from player names contract
            _pID = PlayerBook.getPlayerID(msg.sender);
            bytes32 _name = PlayerBook.getPlayerName(_pID);
            uint256 _laff = PlayerBook.getPlayerLAff(_pID);

            // set up player account
            pIDxAddr_[msg.sender] = _pID;
            plyr_[_pID].addr = msg.sender;

            if (_name != "")
            {
                pIDxName_[_name] = _pID;
                plyr_[_pID].name = _name;
                plyrNames_[_pID][_name] = true;
            }

            if (_laff != 0 && _laff != _pID)
                plyr_[_pID].laff = _laff;

            // set the new player bool to true
            _eventData_.compressedData = _eventData_.compressedData + 1;
        }
        return (_eventData_);
    }

    

    /**
     * @dev decides if round end needs to be run & new round started.  and if
     * player unmasked earnings from previously played rounds need to be moved.
     */
    function managePlayer(uint256 _pID, POOHMOXDatasets.EventReturns memory _eventData_)
        private
        returns (POOHMOXDatasets.EventReturns)
    {
        // if player has played a previous round, move their unmasked earnings
        // from that round to gen vault.
        if (plyr_[_pID].lrnd != 0)
            updateGenVault(_pID, plyr_[_pID].lrnd);

        // update player's last round played
        plyr_[_pID].lrnd = rID_;

        // set the joined round bool to true
        _eventData_.compressedData = _eventData_.compressedData + 10;

        return(_eventData_);
    }

    /**
     * @dev ends the round. manages paying out winner/splitting up pot
     */
    function endRound(POOHMOXDatasets.EventReturns memory _eventData_)
        private
        returns (POOHMOXDatasets.EventReturns)
    {
        // setup local rID
        uint256 _rID = rID_;

        // grab our winning player and team id's
        uint256 _winPID = round_[_rID].plyr;
        uint256 _winTID = round_[_rID].team;

        // grab our pot amount
        uint256 _pot = round_[_rID].pot;

        // calculate our winner share, community rewards, gen share,
        // p3d share, and amount reserved for next pot
        uint256 _win = (_pot.mul(48)) / 100;   //48%
        uint256 _dev = (_pot / 50);            //2%
        uint256 _gen = (_pot.mul(potSplit_[_winTID].gen)) / 100; //15
        uint256 _POOH = (_pot.mul(potSplit_[_winTID].pooh)) / 100; // 10
        uint256 _res = (((_pot.sub(_win)).sub(_dev)).sub(_gen)).sub(_POOH); //25

        // calculate ppt for round mask
        uint256 _ppt = (_gen.mul(1000000000000000000)) / (round_[_rID].keys);
        uint256 _dust = _gen.sub((_ppt.mul(round_[_rID].keys)) / 1000000000000000000);
        if (_dust > 0)
        {
            _gen = _gen.sub(_dust);
            _res = _res.add(_dust);
        }

        // pay our winner
        plyr_[_winPID].win = _win.add(plyr_[_winPID].win);

        // community rewards

        admin.transfer(_dev);

        flushDivs.call.value(_POOH)(bytes4(keccak256("donate()")));  

        // distribute gen portion to key holders
        round_[_rID].mask = _ppt.add(round_[_rID].mask);

        // prepare event data
        _eventData_.compressedData = _eventData_.compressedData + (round_[_rID].end * 1000000);
        _eventData_.compressedIDs = _eventData_.compressedIDs + (_winPID * 100000000000000000000000000) + (_winTID * 100000000000000000);
        _eventData_.winnerAddr = plyr_[_winPID].addr;
        _eventData_.winnerName = plyr_[_winPID].name;
        _eventData_.amountWon = _win;
        _eventData_.genAmount = _gen;
        _eventData_.POOHAmount = _POOH;
        _eventData_.newPot = _res;

        // start next round
        rID_++;
        _rID++;
        round_[_rID].strt = now;
        round_[_rID].end = now.add(rndMax_);
        round_[_rID].pot = _res;

        return(_eventData_);
    }
    

    /**
     * @dev moves any unmasked earnings to gen vault.  updates earnings mask
     */
    function updateGenVault(uint256 _pID, uint256 _rIDlast)
        private
    {
        uint256 _earnings = calcUnMaskedEarnings(_pID, _rIDlast);
        if (_earnings > 0)
        {
            // put in gen vault
            plyr_[_pID].gen = _earnings.add(plyr_[_pID].gen);
            // zero out their earnings by updating mask
            plyrRnds_[_pID][_rIDlast].mask = _earnings.add(plyrRnds_[_pID][_rIDlast].mask);
        }
    }

    /**
     * @dev updates round timer based on number of whole keys bought.
     */
    function updateTimer(uint256 _keys, uint256 _rID)
        private
    {
        // grab time
        uint256 _now = now;

        // calculate time based on number of keys bought
        uint256 _newTime;
        if (_now > round_[_rID].end && round_[_rID].plyr == 0)
            _newTime = (((_keys) / (1000000000000000000)).mul(rndInc_)).add(_now);
        else
            _newTime = (((_keys) / (1000000000000000000)).mul(rndInc_)).add(round_[_rID].end);

        // compare to max and set new end time
        if (_newTime < (rndMax_).add(_now))
            round_[_rID].end = _newTime;
        else
            round_[_rID].end = rndMax_.add(_now);
    }

   
    /**
     * @dev distributes eth based on fees to com, aff, and pooh
     */
    function distributeExternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, POOHMOXDatasets.EventReturns memory _eventData_)
        private
        returns(POOHMOXDatasets.EventReturns)
    {
        // pay 1% out to dev
        uint256 _dev = _eth / 100;  // 1%

        uint256 _POOH = 0;
        if (!address(admin).call.value(_dev)())
        {
            _POOH = _dev;
            _dev = 0;
        }


        // distribute share to affiliate
        uint256 _aff = _eth / 10;

        // decide what to do with affiliate share of fees
        // affiliate must not be self, and must have a name registered
        if (_affID != _pID && plyr_[_affID].name != '') {
            plyr_[_affID].aff = _aff.add(plyr_[_affID].aff);
            emit POOHMOXevents.onAffiliatePayout(_affID, plyr_[_affID].addr, plyr_[_affID].name, _rID, _pID, _aff, now);
        } else {
            _POOH = _POOH.add(_aff);
        }

        // pay out POOH
        _POOH = _POOH.add((_eth.mul(fees_[_team].pooh)) / (100));
        if (_POOH > 0)
        {

            flushDivs.call.value(_POOH)(bytes4(keccak256("donate()")));

            // set up event data
            _eventData_.POOHAmount = _POOH.add(_eventData_.POOHAmount);
        }

        return(_eventData_);
    }

    function potSwap()
        external
        payable
    {
       //you shouldn't be using this method
       admin.transfer(msg.value);
    }

    /**
     * @dev distributes eth based on fees to gen and pot
     */
    function distributeInternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _team, uint256 _keys, POOHMOXDatasets.EventReturns memory _eventData_)
        private
        returns(POOHMOXDatasets.EventReturns)
    {
        // calculate gen share
        uint256 _gen = (_eth.mul(fees_[_team].gen)) / 100;


        // update eth balance (eth = eth - (com share + pot swap share + aff share + p3d share + airdrop pot share))
        _eth = _eth.sub(((_eth.mul(14)) / 100).add((_eth.mul(fees_[_team].pooh)) / 100));

        // calculate pot
        uint256 _pot = _eth.sub(_gen);

        // distribute gen share (thats what updateMasks() does) and adjust
        // balances for dust.
        uint256 _dust = updateMasks(_rID, _pID, _gen, _keys);
        if (_dust > 0)
            _gen = _gen.sub(_dust);

        // add eth to pot
        round_[_rID].pot = _pot.add(_dust).add(round_[_rID].pot);

        // set up event data
        _eventData_.genAmount = _gen.add(_eventData_.genAmount);
        _eventData_.potAmount = _pot;

        return(_eventData_);
    }

    /**
     * @dev updates masks for round and player when keys are bought
     * @return dust left over
     */
    function updateMasks(uint256 _rID, uint256 _pID, 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)
        uint256 _ppt = (_gen.mul(1000000000000000000)) / (round_[_rID].keys);
        round_[_rID].mask = _ppt.add(round_[_rID].mask);

        // 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);
        plyrRnds_[_pID][_rID].mask = (((round_[_rID].mask.mul(_keys)) / (1000000000000000000)).sub(_pearn)).add(plyrRnds_[_pID][_rID].mask);

        // calculate & return dust
        return(_gen.sub((_ppt.mul(round_[_rID].keys)) / (1000000000000000000)));
    }

    /**
     * @dev adds up unmasked earnings, & vault earnings, sets them all to 0
     * @return earnings in wei format
     */
    function withdrawEarnings(uint256 _pID)
        private
        returns(uint256)
    {
        // update gen vault
        updateGenVault(_pID, plyr_[_pID].lrnd);

        // from vaults
        uint256 _earnings = (plyr_[_pID].win).add(plyr_[_pID].gen).add(plyr_[_pID].aff);
        if (_earnings > 0)
        {
            plyr_[_pID].win = 0;
            plyr_[_pID].gen = 0;
            plyr_[_pID].aff = 0;
        }

        return(_earnings);
    }

    /**
     * @dev prepares compression data and fires event for buy or reload tx's
     */
    function endTx(uint256 _pID, uint256 _team, uint256 _eth, uint256 _keys, POOHMOXDatasets.EventReturns memory _eventData_)
        private
    {
        _eventData_.compressedData = _eventData_.compressedData + (now * 1000000000000000000) + (_team * 100000000000000000000000000000);
        _eventData_.compressedIDs = _eventData_.compressedIDs + _pID + (rID_ * 10000000000000000000000000000000000000000000000000000);

        emit POOHMOXevents.onEndTx
        (
            _eventData_.compressedData,
            _eventData_.compressedIDs,
            plyr_[_pID].name,
            msg.sender,
            _eth,
            _keys,
            _eventData_.winnerAddr,
            _eventData_.winnerName,
            _eventData_.amountWon,
            _eventData_.newPot,
            _eventData_.POOHAmount,
            _eventData_.genAmount,
            _eventData_.potAmount
        );
    }
//==============================================================================
//    (~ _  _    _._|_    .
//    _)(/_(_|_|| | | \/  .
//====================/=========================================================
    /** upon contract deploy, it will be deactivated.  this is a one time
     * use function that will activate the contract.  we do this so devs
     * have time to set things up on the web end                            **/
    bool public activated_ = false;
    function activate()
        public
    {
        // only team just can activate
        require(msg.sender == admin);


        // can only be ran once
        require(activated_ == false);

        // activate the contract
        activated_ = true;

        // lets start first round
        rID_ = 1;
            round_[1].strt = now + rndExtra_ - rndGap_;
            round_[1].end = now + rndInit_ + rndExtra_;
    }

    /** Upon game death, there might be some ETH still locked in contract.  
     * This is a one time use function that will empty the contract and 
     * send the eth to POOH tokenholders.
    **/
    function whenGameDies()
        public
    {
        // only team just can activate
        require(msg.sender == admin);

        //take any black-holed eth left in contract and send to pooh whale
         flushDivs.call.value(address(this).balance)(bytes4(keccak256("donate()")));
     }

        

}

//==============================================================================
//   __|_ _    __|_ _  .
//  _\ | | |_|(_ | _\  .
//==============================================================================
library POOHMOXDatasets {
    
    struct EventReturns {
        uint256 compressedData;
        uint256 compressedIDs;
        address winnerAddr;         // winner address
        bytes32 winnerName;         // winner name
        uint256 amountWon;          // amount won
        uint256 newPot;             // amount in new pot
        uint256 POOHAmount;          // amount distributed to p3d
        uint256 genAmount;          // amount distributed to gen
        uint256 potAmount;          // amount added to pot
    }
    struct Player {
        address addr;   // player address
        bytes32 name;   // player name
        uint256 win;    // winnings vault
        uint256 gen;    // general vault
        uint256 aff;    // affiliate vault
        uint256 lrnd;   // last round played
        uint256 laff;   // last affiliate id used
    }
    struct PlayerRounds {
        uint256 eth;    // eth player has added to round (used for eth limiter)
        uint256 keys;   // keys
        uint256 mask;   // player mask
        uint256 ico;    // ICO phase investment
    }
    struct Round {
        uint256 plyr;   // pID of player in lead
        uint256 team;   // tID of team in lead
        uint256 end;    // time ends/ended
        bool ended;     // has round end function been ran
        uint256 strt;   // time round started
        uint256 keys;   // keys
        uint256 eth;    // total eth in
        uint256 pot;    // eth to pot (during round) / final amount paid to winner (after round ends)
        uint256 mask;   // global mask
        uint256 ico;    // total eth sent in during ICO phase
        uint256 icoGen; // total eth for gen during ICO phase
        uint256 icoAvg; // average key price for ICO phase
    }
    struct TeamFee {
        uint256 gen;    // % of buy in thats paid to key holders of current round
        uint256 pooh;    // % of buy in thats paid to POOH holders
    }
    struct PotSplit {
        uint256 gen;    // % of pot thats paid to key holders of current round
        uint256 pooh;    // % of pot thats paid to POOH holders
    }
}

//==============================================================================
//  |  _      _ _ | _  .
//  |<(/_\/  (_(_||(_  .
//=======/======================================================================
library KeysCalc {
    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(200000000000000000000000000000000)).add(2500000000000000000000000000000000000000000000000000000000000000)).sqrt()).sub(50000000000000000000000000000000)) / (100000000000000);
        return (_eth / 0.01 ether) * 1e18;
    }

    /**
     * @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 _keys.mul(0.01 ether)  / 1e18;
       //return ((50000000000000).mul(_keys.sq()).add(((100000000000000).mul(_keys.mul(1000000000000000000))) / (2))) / ((1000000000000000000).sq());
    }
}

//==============================================================================
//  . _ _|_ _  _ |` _  _ _  _  .
//  || | | (/_| ~|~(_|(_(/__\  .
//==============================================================================

interface PlayerBookInterface {
    function getPlayerID(address _addr) external returns (uint256);
    function getPlayerName(uint256 _pID) external view returns (bytes32);
    function getPlayerLAff(uint256 _pID) external view returns (uint256);
    function getPlayerAddr(uint256 _pID) external view returns (address);
    function getNameFee() external view returns (uint256);
    function registerNameXIDFromDapp(address _addr, bytes32 _name, uint256 _affCode, bool _all) external payable returns(bool, uint256);
    function registerNameXaddrFromDapp(address _addr, bytes32 _name, address _affCode, bool _all) external payable returns(bool, uint256);
    function registerNameXnameFromDapp(address _addr, bytes32 _name, bytes32 _affCode, bool _all) external payable returns(bool, uint256);
}


library NameFilter {
    /**
     * @dev filters name strings
     * -converts uppercase to lower case.
     * -makes sure it does not start/end with a space
     * -makes sure it does not contain multiple spaces in a row
     * -cannot be only numbers
     * -cannot start with 0x
     * -restricts characters to A-Z, a-z, 0-9, and space.
     * @return reprocessed string in bytes32 format
     */
    function nameFilter(string _input)
        internal
        pure
        returns(bytes32)
    {
        bytes memory _temp = bytes(_input);
        uint256 _length = _temp.length;

        //sorry limited to 32 characters
        require (_length <= 32 && _length > 0);
        // make sure it doesnt start with or end with space
        require(_temp[0] != 0x20 && _temp[_length-1] != 0x20);
        // make sure first two characters are not 0x
        if (_temp[0] == 0x30)
        {
            require(_temp[1] != 0x78);
            require(_temp[1] != 0x58);
        }

        // create a bool to track if we have a non number character
        bool _hasNonNumber;

        // convert & check
        for (uint256 i = 0; i < _length; i++)
        {
            // if its uppercase A-Z
            if (_temp[i] > 0x40 && _temp[i] < 0x5b)
            {
                // convert to lower case a-z
                _temp[i] = byte(uint(_temp[i]) + 32);

                // we have a non number
                if (_hasNonNumber == false)
                    _hasNonNumber = true;
            } else {
                require
                (
                    // require character is a space
                    _temp[i] == 0x20 ||
                    // OR lowercase a-z
                    (_temp[i] > 0x60 && _temp[i] < 0x7b) ||
                    // or 0-9
                    (_temp[i] > 0x2f && _temp[i] < 0x3a));
                // make sure theres not 2x spaces in a row
                if (_temp[i] == 0x20)
                    require( _temp[i+1] != 0x20);

                // see if we have a character other than a number
                if (_hasNonNumber == false && (_temp[i] < 0x30 || _temp[i] > 0x39))
                    _hasNonNumber = true;
            }
        }

        require(_hasNonNumber == true);

        bytes32 _ret;
        assembly {
            _ret := mload(add(_temp, 32))
        }
        return (_ret);
    }
}

/**
 * @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

API
[{"constant":false,"inputs":[{"name":"_affCode","type":"address"},{"name":"_eth","type":"uint256"}],"name":"reLoadXaddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getBuyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"activate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"pIDxAddr_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"round_","outputs":[{"name":"plyr","type":"uint256"},{"name":"team","type":"uint256"},{"name":"end","type":"uint256"},{"name":"ended","type":"bool"},{"name":"strt","type":"uint256"},{"name":"keys","type":"uint256"},{"name":"eth","type":"uint256"},{"name":"pot","type":"uint256"},{"name":"mask","type":"uint256"},{"name":"ico","type":"uint256"},{"name":"icoGen","type":"uint256"},{"name":"icoAvg","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"bytes32"}],"name":"plyrNames_","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"fees_","outputs":[{"name":"gen","type":"uint256"},{"name":"pooh","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"pIDxName_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nameString","type":"string"},{"name":"_affCode","type":"address"},{"name":"_all","type":"bool"}],"name":"registerNameXaddr","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_affCode","type":"bytes32"}],"name":"buyXname","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_pID","type":"uint256"},{"name":"_addr","type":"address"},{"name":"_name","type":"bytes32"},{"name":"_laff","type":"uint256"}],"name":"receivePlayerInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"rndTmEth_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rID_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_pID","type":"uint256"}],"name":"getPlayerVaults","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_nameString","type":"string"},{"name":"_affCode","type":"bytes32"},{"name":"_all","type":"bool"}],"name":"registerNameXname","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentRoundInfo","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"address"},{"name":"","type":"bytes32"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_pID","type":"uint256"},{"name":"_name","type":"bytes32"}],"name":"receivePlayerNameList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_affCode","type":"uint256"},{"name":"_eth","type":"uint256"}],"name":"reLoadXid","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nameString","type":"string"},{"name":"_affCode","type":"uint256"},{"name":"_all","type":"bool"}],"name":"registerNameXID","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"plyrRnds_","outputs":[{"name":"eth","type":"uint256"},{"name":"keys","type":"uint256"},{"name":"mask","type":"uint256"},{"name":"ico","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"whenGameDies","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_affCode","type":"address"}],"name":"buyXaddr","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"potSplit_","outputs":[{"name":"gen","type":"uint256"},{"name":"pooh","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTimeLeft","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_affCode","type":"uint256"}],"name":"buyXid","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_rID","type":"uint256"},{"name":"_eth","type":"uint256"}],"name":"calcKeysReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_keys","type":"uint256"}],"name":"iWantXKeys","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"activated_","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"plyr_","outputs":[{"name":"addr","type":"address"},{"name":"name","type":"bytes32"},{"name":"win","type":"uint256"},{"name":"gen","type":"uint256"},{"name":"aff","type":"uint256"},{"name":"lrnd","type":"uint256"},{"name":"laff","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"potSwap","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"getPlayerInfoByAddress","outputs":[{"name":"","type":"uint256"},{"name":"","type":"bytes32"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_affCode","type":"bytes32"},{"name":"_eth","type":"uint256"}],"name":"reLoadXname","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"whaleContract","type":"address"},{"name":"playerbook","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"playerID","type":"uint256"},{"indexed":true,"name":"playerAddress","type":"address"},{"indexed":true,"name":"playerName","type":"bytes32"},{"indexed":false,"name":"isNewPlayer","type":"bool"},{"indexed":false,"name":"affiliateID","type":"uint256"},{"indexed":false,"name":"affiliateAddress","type":"address"},{"indexed":false,"name":"affiliateName","type":"bytes32"},{"indexed":false,"name":"amountPaid","type":"uint256"},{"indexed":false,"name":"timeStamp","type":"uint256"}],"name":"onNewName","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"compressedData","type":"uint256"},{"indexed":false,"name":"compressedIDs","type":"uint256"},{"indexed":false,"name":"playerName","type":"bytes32"},{"indexed":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"ethIn","type":"uint256"},{"indexed":false,"name":"keysBought","type":"uint256"},{"indexed":false,"name":"winnerAddr","type":"address"},{"indexed":false,"name":"winnerName","type":"bytes32"},{"indexed":false,"name":"amountWon","type":"uint256"},{"indexed":false,"name":"newPot","type":"uint256"},{"indexed":false,"name":"POOHAmount","type":"uint256"},{"indexed":false,"name":"genAmount","type":"uint256"},{"indexed":false,"name":"potAmount","type":"uint256"}],"name":"onEndTx","type":"event"},{"anonymous":false,"inputs":[{"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":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"playerName","type":"bytes32"},{"indexed":false,"name":"ethOut","type":"uint256"},{"indexed":false,"name":"compressedData","type":"uint256"},{"indexed":false,"name":"compressedIDs","type":"uint256"},{"indexed":false,"name":"winnerAddr","type":"address"},{"indexed":false,"name":"winnerName","type":"bytes32"},{"indexed":false,"name":"amountWon","type":"uint256"},{"indexed":false,"name":"newPot","type":"uint256"},{"indexed":false,"name":"POOHAmount","type":"uint256"},{"indexed":false,"name":"genAmount","type":"uint256"}],"name":"onWithdrawAndDistribute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"playerName","type":"bytes32"},{"indexed":false,"name":"ethIn","type":"uint256"},{"indexed":false,"name":"compressedData","type":"uint256"},{"indexed":false,"name":"compressedIDs","type":"uint256"},{"indexed":false,"name":"winnerAddr","type":"address"},{"indexed":false,"name":"winnerName","type":"bytes32"},{"indexed":false,"name":"amountWon","type":"uint256"},{"indexed":false,"name":"newPot","type":"uint256"},{"indexed":false,"name":"POOHAmount","type":"uint256"},{"indexed":false,"name":"genAmount","type":"uint256"}],"name":"onBuyAndDistribute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"playerAddress","type":"address"},{"indexed":false,"name":"playerName","type":"bytes32"},{"indexed":false,"name":"compressedData","type":"uint256"},{"indexed":false,"name":"compressedIDs","type":"uint256"},{"indexed":false,"name":"winnerAddr","type":"address"},{"indexed":false,"name":"winnerName","type":"bytes32"},{"indexed":false,"name":"amountWon","type":"uint256"},{"indexed":false,"name":"newPot","type":"uint256"},{"indexed":false,"name":"POOHAmount","type":"uint256"},{"indexed":false,"name":"genAmount","type":"uint256"}],"name":"onReLoadAndDistribute","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"affiliateID","type":"uint256"},{"indexed":false,"name":"affiliateAddress","type":"address"},{"indexed":false,"name":"affiliateName","type":"bytes32"},{"indexed":true,"name":"roundID","type":"uint256"},{"indexed":true,"name":"buyerID","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"timeStamp","type":"uint256"}],"name":"onAffiliatePayout","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"roundID","type":"uint256"},{"indexed":false,"name":"amountAddedToPot","type":"uint256"}],"name":"onPotSwapDeposit","type":"event"}]

608060405260018054600160a060020a03191633178155600381905560045561012c60058190556006556011805460ff1916905534801561003f57600080fd5b50604051604080614031833981016040818152825160209384015160028054600160a060020a03938416600160a060020a031991821617909155600080549390921692169190911781558183018252602783526014848401908152818052600f80865293517ff4803e074bd026baaf6ed2e288c9515f68c72fb7216eebdd7cae1718a53ec37555517ff4803e074bd026baaf6ed2e288c9515f68c72fb7216eebdd7cae1718a53ec376558151808301909252918152600a818401908152918052601090925290517f6e0956cda88cad152e89927e53611735b61a5c762d1428573c6931b0a5efcb0155517f6e0956cda88cad152e89927e53611735b61a5c762d1428573c6931b0a5efcb0255613ed78061015a6000396000f30060806040526004361061019d5763ffffffff60e060020a600035041663015008b1811461024b578063018a25e81461027157806306fdde03146102985780630f15f4c01461032257806310f01eba1461033757806324c33d33146103585780632660316e146103cf5780632ce21999146103fe5780632e19ebdc1461042f5780633ccfd60b146104475780633ddd46981461045c578063438d359e146104b857806349cc635d146104c35780635893d481146104ed578063624ae5c014610508578063630664341461051d578063685ffd8314610553578063747dff42146105a65780638f7140ea146106295780638f8a583214610644578063921dec211461065f57806395d89b4114610298578063a2bccae9146106b2578063aa462a5a146106f3578063aeeed0db14610708578063c519500e1461071c578063c7e284b814610734578063cd133c8f14610749578063ce89c80c14610754578063cf8080001461076f578063d53b267914610787578063de7874f31461079c578063ed78cf4a146107f6578063ee0b5d8b146107fe578063fb9073eb14610857575b6101a5613e52565b60115460009060ff1615156001146101bc57600080fd5b33803b80156101ca57600080fd5b600160a060020a03821632146101df57600080fd5b34633b9aca008110156101f157600080fd5b69152d02c7e14af680000081111561020857600080fd5b61021185610872565b33600090815260086020908152604080832054808452600a90925290912060060154919650945061024490859087610b17565b5050505050005b34801561025757600080fd5b5061026f600160a060020a0360043516602435610d52565b005b34801561027d57600080fd5b50610286610e6c565b60408051918252519081900360200190f35b3480156102a457600080fd5b506102ad610e77565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102e75781810151838201526020016102cf565b50505050905090810190601f1680156103145780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032e57600080fd5b5061026f610eae565b34801561034357600080fd5b50610286600160a060020a0360043516610f4e565b34801561036457600080fd5b50610370600435610f60565b604080519c8d5260208d019b909b528b8b019990995296151560608b015260808a019590955260a089019390935260c088019190915260e087015261010086015261012085015261014084015261016083015251908190036101800190f35b3480156103db57600080fd5b506103ea600435602435610fc3565b604080519115158252519081900360200190f35b34801561040a57600080fd5b50610416600435610fe3565b6040805192835260208301919091528051918290030190f35b34801561043b57600080fd5b50610286600435610ffc565b34801561045357600080fd5b5061026f61100e565b6040805160206004803580820135601f810184900484028501840190955284845261026f94369492936024939284019190819084018382808284375094975050600160a060020a0385351695505050505060200135151561131e565b61026f6004356114a7565b3480156104cf57600080fd5b5061026f600435600160a060020a03602435166044356064356115b7565b3480156104f957600080fd5b5061028660043560243561172e565b34801561051457600080fd5b5061028661174b565b34801561052957600080fd5b50610535600435611751565b60408051938452602084019290925282820152519081900360600190f35b6040805160206004803580820135601f810184900484028501840190955284845261026f9436949293602493928401919081908401838280828437509497505084359550505050506020013515156118f7565b3480156105b257600080fd5b506105bb6119ad565b604080519d8e5260208e019c909c528c8c019a909a5260608c019890985260808b019690965260a08a019490945260c0890192909252600160a060020a031660e088015261010087015261012086015261014085015261016084015261018083015251908190036101a00190f35b34801561063557600080fd5b5061026f600435602435611b9b565b34801561065057600080fd5b5061026f600435602435611bfe565b6040805160206004803580820135601f810184900484028501840190955284845261026f943694929360249392840191908190840183828082843750949750508435955050505050602001351515611cde565b3480156106be57600080fd5b506106cd600435602435611d94565b604080519485526020850193909352838301919091526060830152519081900360800190f35b3480156106ff57600080fd5b5061026f611dc6565b61026f600160a060020a0360043516611e55565b34801561072857600080fd5b50610416600435611f6f565b34801561074057600080fd5b50610286611f88565b61026f600435612021565b34801561076057600080fd5b50610286600435602435612114565b34801561077b57600080fd5b506102866004356121bb565b34801561079357600080fd5b506103ea61227a565b3480156107a857600080fd5b506107b4600435612283565b60408051600160a060020a0390981688526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b61026f6122ca565b34801561080a57600080fd5b5061081f600160a060020a0360043516612306565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b34801561086357600080fd5b5061026f6004356024356123db565b61087a613e52565b336000908152600860205260408120549080821515610b0e5760008054604080517fe56556a90000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a039092169263e56556a9926024808401936020939083900390910190829087803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b505050506040513d602081101561092457600080fd5b505160008054604080517f82e37b2c000000000000000000000000000000000000000000000000000000008152600481018590529051939650600160a060020a03909116926382e37b2c92602480840193602093929083900390910190829087803b15801561099257600080fd5b505af11580156109a6573d6000803e3d6000fd5b505050506040513d60208110156109bc57600080fd5b505160008054604080517fe3c08adf000000000000000000000000000000000000000000000000000000008152600481018890529051939550600160a060020a039091169263e3c08adf92602480840193602093929083900390910190829087803b158015610a2a57600080fd5b505af1158015610a3e573d6000803e3d6000fd5b505050506040513d6020811015610a5457600080fd5b5051336000818152600860209081526040808320889055878352600a9091529020805473ffffffffffffffffffffffffffffffffffffffff1916909117905590508115610add576000828152600960209081526040808320869055858352600a82528083206001908101869055600c8352818420868552909252909120805460ff191690911790555b8015801590610aec5750828114155b15610b06576000838152600a602052604090206006018190555b845160010185525b50929392505050565b600754600480546000838152600d602052604090209091015442910181118015610b8357506000828152600d602052604090206002015481111580610b8357506000828152600d602052604090206002015481118015610b8357506000828152600d6020526040902054155b15610b9c57610b97828634876000886124df565b610d4b565b6000828152600d602052604090206002015481118015610bce57506000828152600d602052604090206003015460ff16155b15610d16576000828152600d60205260409020600301805460ff19166001179055610bf883612702565b925080670de0b6b3a764000002836000015101836000018181525050848360200151018360200181815250507fa7801a70b37e729a11492aad44fd3dba89b4149f0609dc0f6837bf9e57e2671a33600a6000888152602001908152602001600020600101543486600001518760200151886040015189606001518a608001518b60a001518c60c001518d60e00151604051808c600160a060020a0316600160a060020a031681526020018b600019166000191681526020018a815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405180910390a15b6000858152600a6020526040902060030154610d38903463ffffffff612b2316565b6000868152600a60205260409020600301555b5050505050565b610d5a613e52565b601154600090819060ff161515600114610d7357600080fd5b33803b8015610d8157600080fd5b600160a060020a0382163214610d9657600080fd5b85633b9aca00811015610da857600080fd5b69152d02c7e14af6800000811115610dbf57600080fd5b336000908152600860205260409020549450600160a060020a0388161580610def5750600160a060020a03881633145b15610e0d576000858152600a60205260409020600601549350610e56565b600160a060020a038816600090815260086020908152604080832054888452600a909252909120600601549094508414610e56576000858152600a602052604090206006018490555b610e6285858989612b9b565b5050505050505050565b662386f26fc1000090565b60408051808201909152600781527f504f4f484d4f5800000000000000000000000000000000000000000000000000602082015281565b600154600160a060020a03163314610ec557600080fd5b60115460ff1615610ed557600080fd5b6011805460ff191660019081179091556007819055600454600354600092909252600d60205242808301919091037ffd54ff1ed53f34a900b24c5ba64f85761163b5d82d98a47b9bd80e45466993c95560055401017ffd54ff1ed53f34a900b24c5ba64f85761163b5d82d98a47b9bd80e45466993c755565b60086020526000908152604090205481565b600d60205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b909b0154999a9899979860ff909716979596949593949293919290918c565b600c60209081526000928352604080842090915290825290205460ff1681565b600f602052600090815260409020805460019091015482565b60096020526000908152604090205481565b60008060008061101c613e52565b60115460ff16151560011461103057600080fd5b33803b801561103e57600080fd5b600160a060020a038216321461105357600080fd5b60075433600090815260086020908152604080832054848452600d909252909120600201549198504297509550861180156110a057506000878152600d602052604090206003015460ff16155b80156110b957506000878152600d602052604090205415155b1561125f576000878152600d60205260409020600301805460ff191660011790556110e383612702565b92506110ee85612dc0565b9350600084111561113f576000858152600a6020526040808220549051600160a060020a039091169186156108fc02918791818181858888f1935050505015801561113d573d6000803e3d6000fd5b505b85670de0b6b3a764000002836000015101836000018181525050848360200151018360200181815250507f0bd0dba8ab932212fa78150cdb7b0275da72e255875967b5cad11464cf71bedc33600a6000888152602001908152602001600020600101548686600001518760200151886040015189606001518a608001518b60a001518c60c001518d60e00151604051808c600160a060020a0316600160a060020a031681526020018b600019166000191681526020018a815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405180910390a1611315565b61126885612dc0565b935060008411156112b9576000858152600a6020526040808220549051600160a060020a039091169186156108fc02918791818181858888f193505050501580156112b7573d6000803e3d6000fd5b505b6000858152600a60209081526040918290206001015482513381529182015280820186905260608101889052905186917f8f36579a548bc439baa172a6521207464154da77f411e2da3db2f53affe6cc3a919081900360800190a25b50505050505050565b6000808080808033803b801561133357600080fd5b600160a060020a038216321461134857600080fd5b6113518b612e4e565b600054604080517faa4d490b000000000000000000000000000000000000000000000000000000008152336004820181905260248201859052600160a060020a038f811660448401528e151560648401528351959d50909b50349a509092169263aa4d490b928a92608480830193919282900301818588803b1580156113d657600080fd5b505af11580156113ea573d6000803e3d6000fd5b50505050506040513d604081101561140157600080fd5b508051602091820151600160a060020a03808b16600081815260088652604080822054858352600a8852918190208054600190910154825188151581529889018790529416878201526060870193909352608086018c90524260a0870152915193995091975095508a92909186917fdd6176433ff5026bbce96b068584b7bbe3514227e72df9c630b749ae87e64442919081900360c00190a45050505050505050505050565b6114af613e52565b601154600090819060ff1615156001146114c857600080fd5b33803b80156114d657600080fd5b600160a060020a03821632146114eb57600080fd5b34633b9aca008110156114fd57600080fd5b69152d02c7e14af680000081111561151457600080fd5b61151d86610872565b33600090815260086020526040902054909650945086158061154f57506000858152600a602052604090206001015487145b1561156d576000858152600a602052604090206006015493506115ac565b600087815260096020908152604080832054888452600a9092529091206006015490945084146115ac576000858152600a602052604090206006018490555b611315858588610b17565b600054600160a060020a031633146115ce57600080fd5b600160a060020a038316600090815260086020526040902054841461160957600160a060020a03831660009081526008602052604090208490555b60008281526009602052604090205484146116305760008281526009602052604090208490555b6000848152600a6020526040902054600160a060020a03848116911614611686576000848152600a60205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790555b6000848152600a602052604090206001015482146116b3576000848152600a602052604090206001018290555b6000848152600a602052604090206006015481146116e0576000848152600a602052604090206006018190555b6000848152600c6020908152604080832085845290915290205460ff161515611728576000848152600c602090815260408083208584529091529020805460ff191660011790555b50505050565b600e60209081526000928352604080842090915290825290205481565b60075481565b6007546000818152600d6020526040812060020154909182918291904211801561178d57506000818152600d602052604090206003015460ff16155b80156117a657506000818152600d602052604090205415155b156118c7576000818152600d602052604090205485141561188b576000818152600d6020526040902060070154611814906064906117eb90603063ffffffff6133bc16565b8115156117f457fe5b6000888152600a602052604090206002015491900463ffffffff612b2316565b6000868152600b6020908152604080832085845290915290206002015461186d9061184f90611843898661344a565b9063ffffffff61351816565b6000888152600a60205260409020600301549063ffffffff612b2316565b6000878152600a6020526040902060040154919550935091506118ef565b6000858152600a60209081526040808320600290810154600b845282852086865290935292209091015461186d9061184f90611843898661344a565b6000858152600a60205260409020600281015460059091015461186d9061184f90889061358f565b509193909250565b6000808080808033803b801561190c57600080fd5b600160a060020a038216321461192157600080fd5b61192a8b612e4e565b600054604080517f745ea0c1000000000000000000000000000000000000000000000000000000008152336004820181905260248201859052604482018f90528d151560648301528251949c509a50349950600160a060020a039092169263745ea0c1928a92608480830193919282900301818588803b1580156113d657600080fd5b6000806000806000806000806000806000806000806007549050600d60008281526020019081526020016000206009015481600d600084815260200190815260200160002060050154600d600085815260200190815260200160002060020154600d600086815260200190815260200160002060040154600d600087815260200190815260200160002060070154600d600088815260200190815260200160002060000154600a02600d60008981526020019081526020016000206001015401600a6000600d60008b815260200190815260200160002060000154815260200190815260200160002060000160009054906101000a9004600160a060020a0316600a6000600d60008c815260200190815260200160002060000154815260200190815260200160002060010154600e60008b8152602001908152602001600020600080815260200190815260200160002054600e60008c815260200190815260200160002060006001815260200190815260200160002054600e60008d815260200190815260200160002060006002815260200190815260200160002054600e60008e8152602001908152602001600020600060038152602001908152602001600020549d509d509d509d509d509d509d509d509d509d509d509d509d5050909192939495969798999a9b9c565b600054600160a060020a03163314611bb257600080fd5b6000828152600c6020908152604080832084845290915290205460ff161515611bfa576000828152600c602090815260408083208484529091529020805460ff191660011790555b5050565b611c06613e52565b60115460009060ff161515600114611c1d57600080fd5b33803b8015611c2b57600080fd5b600160a060020a0382163214611c4057600080fd5b84633b9aca00811015611c5257600080fd5b69152d02c7e14af6800000811115611c6957600080fd5b336000908152600860205260409020549350861580611c8757508387145b15611ca5576000848152600a60205260409020600601549650611cd2565b6000848152600a60205260409020600601548714611cd2576000848152600a602052604090206006018790555b61131584888888612b9b565b6000808080808033803b8015611cf357600080fd5b600160a060020a0382163214611d0857600080fd5b611d118b612e4e565b600054604080517fc0942dfd000000000000000000000000000000000000000000000000000000008152336004820181905260248201859052604482018f90528d151560648301528251949c509a50349950600160a060020a039092169263c0942dfd928a92608480830193919282900301818588803b1580156113d657600080fd5b600b60209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b600154600160a060020a03163314611ddd57600080fd5b600254604080517f646f6e61746528290000000000000000000000000000000000000000000000008152815190819003600801812063ffffffff60e060020a9182900490811690910282529151600160a060020a0390931692303191600480820192600092909190829003018185885af15050505050565b611e5d613e52565b601154600090819060ff161515600114611e7657600080fd5b33803b8015611e8457600080fd5b600160a060020a0382163214611e9957600080fd5b34633b9aca00811015611eab57600080fd5b69152d02c7e14af6800000811115611ec257600080fd5b611ecb86610872565b336000908152600860205260409020549096509450600160a060020a0387161580611efe5750600160a060020a03871633145b15611f1c576000858152600a602052604090206006015493506115ac565b600160a060020a038716600090815260086020908152604080832054888452600a9092529091206006015490945084146115ac576000858152600a60205260409020600601849055611315858588610b17565b6010602052600090815260409020805460019091015482565b6007546000818152600d6020526040812060020154909190429081101561201757600480546000848152600d602052604090209091015401811115611ff0576000828152600d6020526040902060020154611fe9908263ffffffff61351816565b925061201c565b600480546000848152600d6020526040902090910154611fe991018263ffffffff61351816565b600092505b505090565b612029613e52565b60115460009060ff16151560011461204057600080fd5b33803b801561204e57600080fd5b600160a060020a038216321461206357600080fd5b34633b9aca0081101561207557600080fd5b69152d02c7e14af680000081111561208c57600080fd5b61209585610872565b3360009081526008602052604090205490955093508515806120b657508386145b156120d4576000848152600a60205260409020600601549550612101565b6000848152600a60205260409020600601548614612101576000848152600a602052604090206006018690555b61210c848787610b17565b505050505050565b600480546000848152600d60205260408120909201544291018111801561217d57506000848152600d60205260409020600201548111158061217d57506000848152600d60205260409020600201548111801561217d57506000848152600d6020526040902054155b156121ab576000848152600d60205260409020600601546121a4908463ffffffff6135f316565b91506121b4565b6121a483613614565b5092915050565b600754600480546000838152600d60205260408120909201549192914291018111801561222a57506000828152600d60205260409020600201548111158061222a57506000828152600d60205260409020600201548111801561222a57506000828152600d6020526040902054155b1561226a576000828152600d6020526040902060050154612263908590612257908263ffffffff612b2316565b9063ffffffff61362b16565b9250612273565b6122638461364d565b5050919050565b60115460ff1681565b600a602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154600160a060020a039095169593949293919290919087565b600154604051600160a060020a03909116903480156108fc02916000818181858888f19350505050158015612303573d6000803e3d6000fd5b50565b6000806000806000806000806000600754915050600160a060020a038916600090815260086020908152604080832054808452600a808452828520600180820154600b875285882089895287529487200154958390529352600283015460059093015490938493909161239c9061237e90869061358f565b6000878152600a60205260409020600301549063ffffffff612b2316565b6000958652600a6020908152604080882060040154600b83528189209989529890915290952054939e929d50909b509950919750919550909350915050565b6123e3613e52565b601154600090819060ff1615156001146123fc57600080fd5b33803b801561240a57600080fd5b600160a060020a038216321461241f57600080fd5b85633b9aca0081101561243157600080fd5b69152d02c7e14af680000081111561244857600080fd5b33600090815260086020526040902054945087158061247757506000858152600a602052604090206001015488145b15612495576000858152600a60205260409020600601549350610e56565b600088815260096020908152604080832054888452600a909252909120600601549094508414610e56576000858152600a60205260409020600601849055610e6285858989612b9b565b6000662386f26fc100008510156124f557600080fd5b6000868152600b602090815260408083208a8452909152902060010154151561252557612522868361367f565b91505b6000878152600d6020526040902060060154612547908663ffffffff6135f316565b9050670de0b6b3a764000081106125be5761256281886136de565b6000878152600d60205260409020548614612589576000878152600d602052604090208690555b6000878152600d602052604090206001015483146125b6576000878152600d602052604090206001018390555b815160640182525b6000868152600b602090815260408083208a84529091529020600101546125ec90829063ffffffff612b2316565b6000878152600b602090815260408083208b84529091529020600181019190915554612619908690612b23565b6000878152600b602090815260408083208b8452825280832093909355600d9052206005015461265090829063ffffffff612b2316565b6000888152600d6020526040902060058101919091556006015461267b90869063ffffffff612b2316565b6000888152600d6020908152604080832060060193909355600e8152828220828052905220546126b290869063ffffffff612b2316565b6000888152600e602090815260408083208380529091528120919091556126e1908890889088908890876137be565b91506126f2878787600085876139ce565b9150611315866000878486613b1e565b61270a613e52565b600780546000818152600d602052604081208054600182015491909401549293929091808080808080606461274689603063ffffffff6133bc16565b81151561274f57fe5b04965060328860008b815260106020526040902054919004965060649061277d908a9063ffffffff6133bc16565b81151561278657fe5b60008b81526010602052604090206001015491900495506064906127b1908a9063ffffffff6133bc16565b8115156127ba57fe5b0493506127d58461184387818a818e8e63ffffffff61351816565b60008c8152600d602052604090206005015490935061280286670de0b6b3a764000063ffffffff6133bc16565b81151561280b57fe5b60008d8152600d6020526040902060050154919004925061285990670de0b6b3a76400009061284190859063ffffffff6133bc16565b81151561284a57fe5b8791900463ffffffff61351816565b9050600081111561288957612874858263ffffffff61351816565b9450612886838263ffffffff612b2316565b92505b60008a8152600a60205260409020600201546128ac90889063ffffffff612b2316565b60008b8152600a6020526040808220600201929092556001549151600160a060020a039092169188156108fc0291899190818181858888f193505050501580156128fa573d6000803e3d6000fd5b50600260009054906101000a9004600160a060020a0316600160a060020a03168460405180807f646f6e61746528290000000000000000000000000000000000000000000000008152506008019050604051809103902060e060020a9004906040518263ffffffff1660e060020a02815260040160006040518083038185885af150505060008d8152600d60205260409020600801546129a3925084915063ffffffff612b2316565b600d60008d815260200190815260200160002060080181905550600d60008c815260200190815260200160002060020154620f4240028d60000151018d60000181815250508867016345785d8a0000028a6a52b7d2dcc80cd2e4000000028e6020015101018d6020018181525050600a60008b815260200190815260200160002060000160009054906101000a9004600160a060020a03168d60400190600160a060020a03169081600160a060020a031681525050600a60008b8152602001908152602001600020600101548d606001906000191690816000191681525050868d6080018181525050848d60e0018181525050838d60c0018181525050828d60a00181815250506007600081548092919060010191905055508a806001019b505042600d60008d815260200190815260200160002060040181905550612af460065442612b2390919063ffffffff16565b60008c8152600d6020526040902060028101919091556007018390558c9b505050505050505050505050919050565b81810182811015612b9557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b600754600480546000838152600d602052604090209091015442910181118015612c0757506000828152600d602052604090206002015481111580612c0757506000828152600d602052604090206002015481118015612c0757506000828152600d6020526040902054155b15612c4757612c198461184388612dc0565b600a600088815260200190815260200160002060030181905550612c42828786886000886124df565b61210c565b6000828152600d602052604090206002015481118015612c7957506000828152600d602052604090206003015460ff16155b1561210c576000828152600d60205260409020600301805460ff19166001179055612ca383612702565b925080670de0b6b3a764000002836000015101836000018181525050858360200151018360200181815250507f88261ac70d02d5ea73e54fa6da17043c974de1021109573ec1f6f57111c823dd33600a600089815260200190815260200160002060010154856000015186602001518760400151886060015189608001518a60a001518b60c001518c60e00151604051808b600160a060020a0316600160a060020a031681526020018a6000191660001916815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019a505050505050505050505060405180910390a1505050505050565b6000818152600a60205260408120600501548190612ddf908490613c82565b6000838152600a6020526040902060048101546003820154600290920154612e1d92612e11919063ffffffff612b2316565b9063ffffffff612b2316565b90506000811115612b95576000838152600a6020526040812060028101829055600381018290556004015592915050565b8051600090829082808060208411801590612e695750600084115b1515612e7457600080fd5b846000815181101515612e8357fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214158015612eea57508460018503815181101515612ec257fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214155b1515612ef557600080fd5b846000815181101515612f0457fe5b90602001015160f860020a900460f860020a02600160f860020a031916603060f860020a021415612fb157846001815181101515612f3e57fe5b90602001015160f860020a900460f860020a02600160f860020a031916607860f860020a0214151515612f7057600080fd5b846001815181101515612f7f57fe5b90602001015160f860020a900460f860020a02600160f860020a031916605860f860020a0214151515612fb157600080fd5b600091505b8382101561339f5784517f400000000000000000000000000000000000000000000000000000000000000090869084908110612fee57fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015613062575084517f5b000000000000000000000000000000000000000000000000000000000000009086908490811061304357fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b156130cf57848281518110151561307557fe5b90602001015160f860020a900460f860020a0260f860020a900460200160f860020a0285838151811015156130a657fe5b906020010190600160f860020a031916908160001a9053508215156130ca57600192505b613394565b84828151811015156130dd57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214806131ad575084517f60000000000000000000000000000000000000000000000000000000000000009086908490811061313957fe5b90602001015160f860020a900460f860020a02600160f860020a0319161180156131ad575084517f7b000000000000000000000000000000000000000000000000000000000000009086908490811061318e57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b80613257575084517f2f00000000000000000000000000000000000000000000000000000000000000908690849081106131e357fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015613257575084517f3a000000000000000000000000000000000000000000000000000000000000009086908490811061323857fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b151561326257600080fd5b848281518110151561327057fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214156132de5784826001018151811015156132ac57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a02141515156132de57600080fd5b8215801561338a575084517f30000000000000000000000000000000000000000000000000000000000000009086908490811061331757fe5b90602001015160f860020a900460f860020a02600160f860020a031916108061338a575084517f39000000000000000000000000000000000000000000000000000000000000009086908490811061336b57fe5b90602001015160f860020a900460f860020a02600160f860020a031916115b1561339457600192505b600190910190612fb6565b6001831515146133ae57600080fd5b505050506020015192915050565b60008215156133cd57506000612b95565b508181028183828115156133dd57fe5b0414612b9557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b6000828152600b602090815260408083208484528252808320600190810154600d808552838620600581015493810154875260108652938620548787529452600790920154670de0b6b3a76400009361350793926134fb9290916134d29187916064916134bc9163ffffffff6133bc16565b8115156134c557fe5b049063ffffffff6133bc16565b8115156134db57fe5b6000888152600d602052604090206008015491900463ffffffff612b2316565b9063ffffffff6133bc16565b81151561351057fe5b049392505050565b60008282111561358957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b6000828152600b6020908152604080832084845282528083206002810154600190910154600d909352908320600801546135ec92670de0b6b3a7640000916135d6916133bc565b8115156135df57fe5b049063ffffffff61351816565b9392505050565b60006135ec61360184613614565b611843613614868663ffffffff612b2316565b662386f26fc100009004670de0b6b3a76400000290565b60006135ec613648613643858563ffffffff61351816565b61364d565b611843855b6000670de0b6b3a764000061366f83662386f26fc1000063ffffffff6133bc16565b81151561367857fe5b0492915050565b613687613e52565b6000838152600a6020526040902060050154156136bb576000838152600a60205260409020600501546136bb908490613c82565b506007546000928352600a60208190526040909320600501558051909101815290565b6000818152600d60205260408120600201544291908211801561370d57506000838152600d6020526040902054155b156137325761372b82612e1161012c670de0b6b3a7640000886134c5565b9050613760565b6000838152600d602052604090206002015461375d90612e1161012c670de0b6b3a7640000886134c5565b90505b600654613773908363ffffffff612b2316565b811015613793576000838152600d60205260409020600201819055611728565b6006546137a6908363ffffffff612b2316565b6000848152600d602052604090206002015550505050565b6137c6613e52565b60015460405160648704916000918291600160a060020a03169084908381818185875af19250505015156137fa5760009291505b50600a870486891480159061381f57506000878152600a602052604090206001015415155b156138bf576000878152600a602052604090206004015461384790829063ffffffff612b2316565b6000888152600a6020908152604091829020600481019390935582546001909301548251600160a060020a03909416845290830152818101839052426060830152518a918c918a917f590bbc0fc16915a85269a48f74783c39842b7ae9eceb7c295c95dbe8b3ec7331919081900360800190a46138d2565b6138cf828263ffffffff612b2316565b91505b6000868152600f6020526040902060010154613914906064906138fc908b9063ffffffff6133bc16565b81151561390557fe5b8491900463ffffffff612b2316565b915060008211156139c057600260009054906101000a9004600160a060020a0316600160a060020a03168260405180807f646f6e61746528290000000000000000000000000000000000000000000000008152506008019050604051809103902060e060020a9004906040518263ffffffff1660e060020a02815260040160006040518083038185885af150505060c08701516139ba925084915063ffffffff612b2316565b60c08601525b509298975050505050505050565b6139d6613e52565b6000848152600f6020526040812054819081906064906139fd908a9063ffffffff6133bc16565b811515613a0657fe5b049250613a7a613a6d6064613a3a600f60008c8152602001908152602001600020600101548c6133bc90919063ffffffff16565b811515613a4357fe5b046064613a578c600e63ffffffff6133bc16565b811515613a6057fe5b049063ffffffff612b2316565b899063ffffffff61351816565b9750613a8c888463ffffffff61351816565b9150613a9a8a8a8589613d19565b90506000811115613ab857613ab5838263ffffffff61351816565b92505b60008a8152600d6020526040902060070154613ade90612e11848463ffffffff612b2316565b60008b8152600d602052604090206007015560e0850151613b0690849063ffffffff612b2316565b60e08601525061010084015250909695505050505050565b836c01431e0fae6d7217caa00000000242670de0b6b3a76400000282600001510101816000018181525050600754751aba4714957d300d0e549208b31adb100000000000000285826020015101018160200181815250507f3671a735b2c7f1e43f1ab4385d4c5b480bbff437ad893b703fb0dfdbd24679e281600001518260200151600a6000898152602001908152602001600020600101543387878760400151886060015189608001518a60a001518b60c001518c60e001518d6101000151604051808e81526020018d81526020018c600019166000191681526020018b600160a060020a0316600160a060020a031681526020018a815260200189815260200188600160a060020a0316600160a060020a0316815260200187600019166000191681526020018681526020018581526020018481526020018381526020018281526020019d505050505050505050505050505060405180910390a15050505050565b6000613c8e838361358f565b90506000811115613d14576000838152600a6020526040902060030154613cbc90829063ffffffff612b2316565b6000848152600a6020908152604080832060030193909355600b815282822085835290522060020154613cf690829063ffffffff612b2316565b6000848152600b602090815260408083208684529091529020600201555b505050565b6000848152600d602052604081206005015481908190613d4786670de0b6b3a764000063ffffffff6133bc16565b811515613d5057fe5b6000898152600d60205260409020600801549190049250613d7890839063ffffffff612b2316565b6000888152600d6020526040902060080155670de0b6b3a7640000613da3838663ffffffff6133bc16565b811515613dac57fe5b6000888152600b602090815260408083208c8452825280832060020154600d90925290912060080154929091049250613dff91612e11908490670de0b6b3a7640000906135d6908a63ffffffff6133bc16565b6000878152600b602090815260408083208b8452825280832060020193909355600d90522060050154613e4790670de0b6b3a76400009061284190859063ffffffff6133bc16565b979650505050505050565b6101206040519081016040528060008152602001600081526020016000600160a060020a0316815260200160008019168152602001600081526020016000815260200160008152602001600081526020016000815250905600a165627a7a72305820720af32ce999a6dc5d8acdf33c15482245de84b4b35f4731c7f7fb047e5bf8530029000000000000000000000000dcbb703095c4b7fae2a44ea0acffc53d97acde0e0000000000000000000000009ffbbea8028165c97ba98a7e0dd367a2ce6788e2

Deployed Bytecode

0x60806040526004361061019d5763ffffffff60e060020a600035041663015008b1811461024b578063018a25e81461027157806306fdde03146102985780630f15f4c01461032257806310f01eba1461033757806324c33d33146103585780632660316e146103cf5780632ce21999146103fe5780632e19ebdc1461042f5780633ccfd60b146104475780633ddd46981461045c578063438d359e146104b857806349cc635d146104c35780635893d481146104ed578063624ae5c014610508578063630664341461051d578063685ffd8314610553578063747dff42146105a65780638f7140ea146106295780638f8a583214610644578063921dec211461065f57806395d89b4114610298578063a2bccae9146106b2578063aa462a5a146106f3578063aeeed0db14610708578063c519500e1461071c578063c7e284b814610734578063cd133c8f14610749578063ce89c80c14610754578063cf8080001461076f578063d53b267914610787578063de7874f31461079c578063ed78cf4a146107f6578063ee0b5d8b146107fe578063fb9073eb14610857575b6101a5613e52565b60115460009060ff1615156001146101bc57600080fd5b33803b80156101ca57600080fd5b600160a060020a03821632146101df57600080fd5b34633b9aca008110156101f157600080fd5b69152d02c7e14af680000081111561020857600080fd5b61021185610872565b33600090815260086020908152604080832054808452600a90925290912060060154919650945061024490859087610b17565b5050505050005b34801561025757600080fd5b5061026f600160a060020a0360043516602435610d52565b005b34801561027d57600080fd5b50610286610e6c565b60408051918252519081900360200190f35b3480156102a457600080fd5b506102ad610e77565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102e75781810151838201526020016102cf565b50505050905090810190601f1680156103145780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032e57600080fd5b5061026f610eae565b34801561034357600080fd5b50610286600160a060020a0360043516610f4e565b34801561036457600080fd5b50610370600435610f60565b604080519c8d5260208d019b909b528b8b019990995296151560608b015260808a019590955260a089019390935260c088019190915260e087015261010086015261012085015261014084015261016083015251908190036101800190f35b3480156103db57600080fd5b506103ea600435602435610fc3565b604080519115158252519081900360200190f35b34801561040a57600080fd5b50610416600435610fe3565b6040805192835260208301919091528051918290030190f35b34801561043b57600080fd5b50610286600435610ffc565b34801561045357600080fd5b5061026f61100e565b6040805160206004803580820135601f810184900484028501840190955284845261026f94369492936024939284019190819084018382808284375094975050600160a060020a0385351695505050505060200135151561131e565b61026f6004356114a7565b3480156104cf57600080fd5b5061026f600435600160a060020a03602435166044356064356115b7565b3480156104f957600080fd5b5061028660043560243561172e565b34801561051457600080fd5b5061028661174b565b34801561052957600080fd5b50610535600435611751565b60408051938452602084019290925282820152519081900360600190f35b6040805160206004803580820135601f810184900484028501840190955284845261026f9436949293602493928401919081908401838280828437509497505084359550505050506020013515156118f7565b3480156105b257600080fd5b506105bb6119ad565b604080519d8e5260208e019c909c528c8c019a909a5260608c019890985260808b019690965260a08a019490945260c0890192909252600160a060020a031660e088015261010087015261012086015261014085015261016084015261018083015251908190036101a00190f35b34801561063557600080fd5b5061026f600435602435611b9b565b34801561065057600080fd5b5061026f600435602435611bfe565b6040805160206004803580820135601f810184900484028501840190955284845261026f943694929360249392840191908190840183828082843750949750508435955050505050602001351515611cde565b3480156106be57600080fd5b506106cd600435602435611d94565b604080519485526020850193909352838301919091526060830152519081900360800190f35b3480156106ff57600080fd5b5061026f611dc6565b61026f600160a060020a0360043516611e55565b34801561072857600080fd5b50610416600435611f6f565b34801561074057600080fd5b50610286611f88565b61026f600435612021565b34801561076057600080fd5b50610286600435602435612114565b34801561077b57600080fd5b506102866004356121bb565b34801561079357600080fd5b506103ea61227a565b3480156107a857600080fd5b506107b4600435612283565b60408051600160a060020a0390981688526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b61026f6122ca565b34801561080a57600080fd5b5061081f600160a060020a0360043516612306565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b34801561086357600080fd5b5061026f6004356024356123db565b61087a613e52565b336000908152600860205260408120549080821515610b0e5760008054604080517fe56556a90000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a039092169263e56556a9926024808401936020939083900390910190829087803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b505050506040513d602081101561092457600080fd5b505160008054604080517f82e37b2c000000000000000000000000000000000000000000000000000000008152600481018590529051939650600160a060020a03909116926382e37b2c92602480840193602093929083900390910190829087803b15801561099257600080fd5b505af11580156109a6573d6000803e3d6000fd5b505050506040513d60208110156109bc57600080fd5b505160008054604080517fe3c08adf000000000000000000000000000000000000000000000000000000008152600481018890529051939550600160a060020a039091169263e3c08adf92602480840193602093929083900390910190829087803b158015610a2a57600080fd5b505af1158015610a3e573d6000803e3d6000fd5b505050506040513d6020811015610a5457600080fd5b5051336000818152600860209081526040808320889055878352600a9091529020805473ffffffffffffffffffffffffffffffffffffffff1916909117905590508115610add576000828152600960209081526040808320869055858352600a82528083206001908101869055600c8352818420868552909252909120805460ff191690911790555b8015801590610aec5750828114155b15610b06576000838152600a602052604090206006018190555b845160010185525b50929392505050565b600754600480546000838152600d602052604090209091015442910181118015610b8357506000828152600d602052604090206002015481111580610b8357506000828152600d602052604090206002015481118015610b8357506000828152600d6020526040902054155b15610b9c57610b97828634876000886124df565b610d4b565b6000828152600d602052604090206002015481118015610bce57506000828152600d602052604090206003015460ff16155b15610d16576000828152600d60205260409020600301805460ff19166001179055610bf883612702565b925080670de0b6b3a764000002836000015101836000018181525050848360200151018360200181815250507fa7801a70b37e729a11492aad44fd3dba89b4149f0609dc0f6837bf9e57e2671a33600a6000888152602001908152602001600020600101543486600001518760200151886040015189606001518a608001518b60a001518c60c001518d60e00151604051808c600160a060020a0316600160a060020a031681526020018b600019166000191681526020018a815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405180910390a15b6000858152600a6020526040902060030154610d38903463ffffffff612b2316565b6000868152600a60205260409020600301555b5050505050565b610d5a613e52565b601154600090819060ff161515600114610d7357600080fd5b33803b8015610d8157600080fd5b600160a060020a0382163214610d9657600080fd5b85633b9aca00811015610da857600080fd5b69152d02c7e14af6800000811115610dbf57600080fd5b336000908152600860205260409020549450600160a060020a0388161580610def5750600160a060020a03881633145b15610e0d576000858152600a60205260409020600601549350610e56565b600160a060020a038816600090815260086020908152604080832054888452600a909252909120600601549094508414610e56576000858152600a602052604090206006018490555b610e6285858989612b9b565b5050505050505050565b662386f26fc1000090565b60408051808201909152600781527f504f4f484d4f5800000000000000000000000000000000000000000000000000602082015281565b600154600160a060020a03163314610ec557600080fd5b60115460ff1615610ed557600080fd5b6011805460ff191660019081179091556007819055600454600354600092909252600d60205242808301919091037ffd54ff1ed53f34a900b24c5ba64f85761163b5d82d98a47b9bd80e45466993c95560055401017ffd54ff1ed53f34a900b24c5ba64f85761163b5d82d98a47b9bd80e45466993c755565b60086020526000908152604090205481565b600d60205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b909b0154999a9899979860ff909716979596949593949293919290918c565b600c60209081526000928352604080842090915290825290205460ff1681565b600f602052600090815260409020805460019091015482565b60096020526000908152604090205481565b60008060008061101c613e52565b60115460ff16151560011461103057600080fd5b33803b801561103e57600080fd5b600160a060020a038216321461105357600080fd5b60075433600090815260086020908152604080832054848452600d909252909120600201549198504297509550861180156110a057506000878152600d602052604090206003015460ff16155b80156110b957506000878152600d602052604090205415155b1561125f576000878152600d60205260409020600301805460ff191660011790556110e383612702565b92506110ee85612dc0565b9350600084111561113f576000858152600a6020526040808220549051600160a060020a039091169186156108fc02918791818181858888f1935050505015801561113d573d6000803e3d6000fd5b505b85670de0b6b3a764000002836000015101836000018181525050848360200151018360200181815250507f0bd0dba8ab932212fa78150cdb7b0275da72e255875967b5cad11464cf71bedc33600a6000888152602001908152602001600020600101548686600001518760200151886040015189606001518a608001518b60a001518c60c001518d60e00151604051808c600160a060020a0316600160a060020a031681526020018b600019166000191681526020018a815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019b50505050505050505050505060405180910390a1611315565b61126885612dc0565b935060008411156112b9576000858152600a6020526040808220549051600160a060020a039091169186156108fc02918791818181858888f193505050501580156112b7573d6000803e3d6000fd5b505b6000858152600a60209081526040918290206001015482513381529182015280820186905260608101889052905186917f8f36579a548bc439baa172a6521207464154da77f411e2da3db2f53affe6cc3a919081900360800190a25b50505050505050565b6000808080808033803b801561133357600080fd5b600160a060020a038216321461134857600080fd5b6113518b612e4e565b600054604080517faa4d490b000000000000000000000000000000000000000000000000000000008152336004820181905260248201859052600160a060020a038f811660448401528e151560648401528351959d50909b50349a509092169263aa4d490b928a92608480830193919282900301818588803b1580156113d657600080fd5b505af11580156113ea573d6000803e3d6000fd5b50505050506040513d604081101561140157600080fd5b508051602091820151600160a060020a03808b16600081815260088652604080822054858352600a8852918190208054600190910154825188151581529889018790529416878201526060870193909352608086018c90524260a0870152915193995091975095508a92909186917fdd6176433ff5026bbce96b068584b7bbe3514227e72df9c630b749ae87e64442919081900360c00190a45050505050505050505050565b6114af613e52565b601154600090819060ff1615156001146114c857600080fd5b33803b80156114d657600080fd5b600160a060020a03821632146114eb57600080fd5b34633b9aca008110156114fd57600080fd5b69152d02c7e14af680000081111561151457600080fd5b61151d86610872565b33600090815260086020526040902054909650945086158061154f57506000858152600a602052604090206001015487145b1561156d576000858152600a602052604090206006015493506115ac565b600087815260096020908152604080832054888452600a9092529091206006015490945084146115ac576000858152600a602052604090206006018490555b611315858588610b17565b600054600160a060020a031633146115ce57600080fd5b600160a060020a038316600090815260086020526040902054841461160957600160a060020a03831660009081526008602052604090208490555b60008281526009602052604090205484146116305760008281526009602052604090208490555b6000848152600a6020526040902054600160a060020a03848116911614611686576000848152600a60205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790555b6000848152600a602052604090206001015482146116b3576000848152600a602052604090206001018290555b6000848152600a602052604090206006015481146116e0576000848152600a602052604090206006018190555b6000848152600c6020908152604080832085845290915290205460ff161515611728576000848152600c602090815260408083208584529091529020805460ff191660011790555b50505050565b600e60209081526000928352604080842090915290825290205481565b60075481565b6007546000818152600d6020526040812060020154909182918291904211801561178d57506000818152600d602052604090206003015460ff16155b80156117a657506000818152600d602052604090205415155b156118c7576000818152600d602052604090205485141561188b576000818152600d6020526040902060070154611814906064906117eb90603063ffffffff6133bc16565b8115156117f457fe5b6000888152600a602052604090206002015491900463ffffffff612b2316565b6000868152600b6020908152604080832085845290915290206002015461186d9061184f90611843898661344a565b9063ffffffff61351816565b6000888152600a60205260409020600301549063ffffffff612b2316565b6000878152600a6020526040902060040154919550935091506118ef565b6000858152600a60209081526040808320600290810154600b845282852086865290935292209091015461186d9061184f90611843898661344a565b6000858152600a60205260409020600281015460059091015461186d9061184f90889061358f565b509193909250565b6000808080808033803b801561190c57600080fd5b600160a060020a038216321461192157600080fd5b61192a8b612e4e565b600054604080517f745ea0c1000000000000000000000000000000000000000000000000000000008152336004820181905260248201859052604482018f90528d151560648301528251949c509a50349950600160a060020a039092169263745ea0c1928a92608480830193919282900301818588803b1580156113d657600080fd5b6000806000806000806000806000806000806000806007549050600d60008281526020019081526020016000206009015481600d600084815260200190815260200160002060050154600d600085815260200190815260200160002060020154600d600086815260200190815260200160002060040154600d600087815260200190815260200160002060070154600d600088815260200190815260200160002060000154600a02600d60008981526020019081526020016000206001015401600a6000600d60008b815260200190815260200160002060000154815260200190815260200160002060000160009054906101000a9004600160a060020a0316600a6000600d60008c815260200190815260200160002060000154815260200190815260200160002060010154600e60008b8152602001908152602001600020600080815260200190815260200160002054600e60008c815260200190815260200160002060006001815260200190815260200160002054600e60008d815260200190815260200160002060006002815260200190815260200160002054600e60008e8152602001908152602001600020600060038152602001908152602001600020549d509d509d509d509d509d509d509d509d509d509d509d509d5050909192939495969798999a9b9c565b600054600160a060020a03163314611bb257600080fd5b6000828152600c6020908152604080832084845290915290205460ff161515611bfa576000828152600c602090815260408083208484529091529020805460ff191660011790555b5050565b611c06613e52565b60115460009060ff161515600114611c1d57600080fd5b33803b8015611c2b57600080fd5b600160a060020a0382163214611c4057600080fd5b84633b9aca00811015611c5257600080fd5b69152d02c7e14af6800000811115611c6957600080fd5b336000908152600860205260409020549350861580611c8757508387145b15611ca5576000848152600a60205260409020600601549650611cd2565b6000848152600a60205260409020600601548714611cd2576000848152600a602052604090206006018790555b61131584888888612b9b565b6000808080808033803b8015611cf357600080fd5b600160a060020a0382163214611d0857600080fd5b611d118b612e4e565b600054604080517fc0942dfd000000000000000000000000000000000000000000000000000000008152336004820181905260248201859052604482018f90528d151560648301528251949c509a50349950600160a060020a039092169263c0942dfd928a92608480830193919282900301818588803b1580156113d657600080fd5b600b60209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b600154600160a060020a03163314611ddd57600080fd5b600254604080517f646f6e61746528290000000000000000000000000000000000000000000000008152815190819003600801812063ffffffff60e060020a9182900490811690910282529151600160a060020a0390931692303191600480820192600092909190829003018185885af15050505050565b611e5d613e52565b601154600090819060ff161515600114611e7657600080fd5b33803b8015611e8457600080fd5b600160a060020a0382163214611e9957600080fd5b34633b9aca00811015611eab57600080fd5b69152d02c7e14af6800000811115611ec257600080fd5b611ecb86610872565b336000908152600860205260409020549096509450600160a060020a0387161580611efe5750600160a060020a03871633145b15611f1c576000858152600a602052604090206006015493506115ac565b600160a060020a038716600090815260086020908152604080832054888452600a9092529091206006015490945084146115ac576000858152600a60205260409020600601849055611315858588610b17565b6010602052600090815260409020805460019091015482565b6007546000818152600d6020526040812060020154909190429081101561201757600480546000848152600d602052604090209091015401811115611ff0576000828152600d6020526040902060020154611fe9908263ffffffff61351816565b925061201c565b600480546000848152600d6020526040902090910154611fe991018263ffffffff61351816565b600092505b505090565b612029613e52565b60115460009060ff16151560011461204057600080fd5b33803b801561204e57600080fd5b600160a060020a038216321461206357600080fd5b34633b9aca0081101561207557600080fd5b69152d02c7e14af680000081111561208c57600080fd5b61209585610872565b3360009081526008602052604090205490955093508515806120b657508386145b156120d4576000848152600a60205260409020600601549550612101565b6000848152600a60205260409020600601548614612101576000848152600a602052604090206006018690555b61210c848787610b17565b505050505050565b600480546000848152600d60205260408120909201544291018111801561217d57506000848152600d60205260409020600201548111158061217d57506000848152600d60205260409020600201548111801561217d57506000848152600d6020526040902054155b156121ab576000848152600d60205260409020600601546121a4908463ffffffff6135f316565b91506121b4565b6121a483613614565b5092915050565b600754600480546000838152600d60205260408120909201549192914291018111801561222a57506000828152600d60205260409020600201548111158061222a57506000828152600d60205260409020600201548111801561222a57506000828152600d6020526040902054155b1561226a576000828152600d6020526040902060050154612263908590612257908263ffffffff612b2316565b9063ffffffff61362b16565b9250612273565b6122638461364d565b5050919050565b60115460ff1681565b600a602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154600160a060020a039095169593949293919290919087565b600154604051600160a060020a03909116903480156108fc02916000818181858888f19350505050158015612303573d6000803e3d6000fd5b50565b6000806000806000806000806000600754915050600160a060020a038916600090815260086020908152604080832054808452600a808452828520600180820154600b875285882089895287529487200154958390529352600283015460059093015490938493909161239c9061237e90869061358f565b6000878152600a60205260409020600301549063ffffffff612b2316565b6000958652600a6020908152604080882060040154600b83528189209989529890915290952054939e929d50909b509950919750919550909350915050565b6123e3613e52565b601154600090819060ff1615156001146123fc57600080fd5b33803b801561240a57600080fd5b600160a060020a038216321461241f57600080fd5b85633b9aca0081101561243157600080fd5b69152d02c7e14af680000081111561244857600080fd5b33600090815260086020526040902054945087158061247757506000858152600a602052604090206001015488145b15612495576000858152600a60205260409020600601549350610e56565b600088815260096020908152604080832054888452600a909252909120600601549094508414610e56576000858152600a60205260409020600601849055610e6285858989612b9b565b6000662386f26fc100008510156124f557600080fd5b6000868152600b602090815260408083208a8452909152902060010154151561252557612522868361367f565b91505b6000878152600d6020526040902060060154612547908663ffffffff6135f316565b9050670de0b6b3a764000081106125be5761256281886136de565b6000878152600d60205260409020548614612589576000878152600d602052604090208690555b6000878152600d602052604090206001015483146125b6576000878152600d602052604090206001018390555b815160640182525b6000868152600b602090815260408083208a84529091529020600101546125ec90829063ffffffff612b2316565b6000878152600b602090815260408083208b84529091529020600181019190915554612619908690612b23565b6000878152600b602090815260408083208b8452825280832093909355600d9052206005015461265090829063ffffffff612b2316565b6000888152600d6020526040902060058101919091556006015461267b90869063ffffffff612b2316565b6000888152600d6020908152604080832060060193909355600e8152828220828052905220546126b290869063ffffffff612b2316565b6000888152600e602090815260408083208380529091528120919091556126e1908890889088908890876137be565b91506126f2878787600085876139ce565b9150611315866000878486613b1e565b61270a613e52565b600780546000818152600d602052604081208054600182015491909401549293929091808080808080606461274689603063ffffffff6133bc16565b81151561274f57fe5b04965060328860008b815260106020526040902054919004965060649061277d908a9063ffffffff6133bc16565b81151561278657fe5b60008b81526010602052604090206001015491900495506064906127b1908a9063ffffffff6133bc16565b8115156127ba57fe5b0493506127d58461184387818a818e8e63ffffffff61351816565b60008c8152600d602052604090206005015490935061280286670de0b6b3a764000063ffffffff6133bc16565b81151561280b57fe5b60008d8152600d6020526040902060050154919004925061285990670de0b6b3a76400009061284190859063ffffffff6133bc16565b81151561284a57fe5b8791900463ffffffff61351816565b9050600081111561288957612874858263ffffffff61351816565b9450612886838263ffffffff612b2316565b92505b60008a8152600a60205260409020600201546128ac90889063ffffffff612b2316565b60008b8152600a6020526040808220600201929092556001549151600160a060020a039092169188156108fc0291899190818181858888f193505050501580156128fa573d6000803e3d6000fd5b50600260009054906101000a9004600160a060020a0316600160a060020a03168460405180807f646f6e61746528290000000000000000000000000000000000000000000000008152506008019050604051809103902060e060020a9004906040518263ffffffff1660e060020a02815260040160006040518083038185885af150505060008d8152600d60205260409020600801546129a3925084915063ffffffff612b2316565b600d60008d815260200190815260200160002060080181905550600d60008c815260200190815260200160002060020154620f4240028d60000151018d60000181815250508867016345785d8a0000028a6a52b7d2dcc80cd2e4000000028e6020015101018d6020018181525050600a60008b815260200190815260200160002060000160009054906101000a9004600160a060020a03168d60400190600160a060020a03169081600160a060020a031681525050600a60008b8152602001908152602001600020600101548d606001906000191690816000191681525050868d6080018181525050848d60e0018181525050838d60c0018181525050828d60a00181815250506007600081548092919060010191905055508a806001019b505042600d60008d815260200190815260200160002060040181905550612af460065442612b2390919063ffffffff16565b60008c8152600d6020526040902060028101919091556007018390558c9b505050505050505050505050919050565b81810182811015612b9557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b600754600480546000838152600d602052604090209091015442910181118015612c0757506000828152600d602052604090206002015481111580612c0757506000828152600d602052604090206002015481118015612c0757506000828152600d6020526040902054155b15612c4757612c198461184388612dc0565b600a600088815260200190815260200160002060030181905550612c42828786886000886124df565b61210c565b6000828152600d602052604090206002015481118015612c7957506000828152600d602052604090206003015460ff16155b1561210c576000828152600d60205260409020600301805460ff19166001179055612ca383612702565b925080670de0b6b3a764000002836000015101836000018181525050858360200151018360200181815250507f88261ac70d02d5ea73e54fa6da17043c974de1021109573ec1f6f57111c823dd33600a600089815260200190815260200160002060010154856000015186602001518760400151886060015189608001518a60a001518b60c001518c60e00151604051808b600160a060020a0316600160a060020a031681526020018a6000191660001916815260200189815260200188815260200187600160a060020a0316600160a060020a0316815260200186600019166000191681526020018581526020018481526020018381526020018281526020019a505050505050505050505060405180910390a1505050505050565b6000818152600a60205260408120600501548190612ddf908490613c82565b6000838152600a6020526040902060048101546003820154600290920154612e1d92612e11919063ffffffff612b2316565b9063ffffffff612b2316565b90506000811115612b95576000838152600a6020526040812060028101829055600381018290556004015592915050565b8051600090829082808060208411801590612e695750600084115b1515612e7457600080fd5b846000815181101515612e8357fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214158015612eea57508460018503815181101515612ec257fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214155b1515612ef557600080fd5b846000815181101515612f0457fe5b90602001015160f860020a900460f860020a02600160f860020a031916603060f860020a021415612fb157846001815181101515612f3e57fe5b90602001015160f860020a900460f860020a02600160f860020a031916607860f860020a0214151515612f7057600080fd5b846001815181101515612f7f57fe5b90602001015160f860020a900460f860020a02600160f860020a031916605860f860020a0214151515612fb157600080fd5b600091505b8382101561339f5784517f400000000000000000000000000000000000000000000000000000000000000090869084908110612fee57fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015613062575084517f5b000000000000000000000000000000000000000000000000000000000000009086908490811061304357fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b156130cf57848281518110151561307557fe5b90602001015160f860020a900460f860020a0260f860020a900460200160f860020a0285838151811015156130a657fe5b906020010190600160f860020a031916908160001a9053508215156130ca57600192505b613394565b84828151811015156130dd57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214806131ad575084517f60000000000000000000000000000000000000000000000000000000000000009086908490811061313957fe5b90602001015160f860020a900460f860020a02600160f860020a0319161180156131ad575084517f7b000000000000000000000000000000000000000000000000000000000000009086908490811061318e57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b80613257575084517f2f00000000000000000000000000000000000000000000000000000000000000908690849081106131e357fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015613257575084517f3a000000000000000000000000000000000000000000000000000000000000009086908490811061323857fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b151561326257600080fd5b848281518110151561327057fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214156132de5784826001018151811015156132ac57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a02141515156132de57600080fd5b8215801561338a575084517f30000000000000000000000000000000000000000000000000000000000000009086908490811061331757fe5b90602001015160f860020a900460f860020a02600160f860020a031916108061338a575084517f39000000000000000000000000000000000000000000000000000000000000009086908490811061336b57fe5b90602001015160f860020a900460f860020a02600160f860020a031916115b1561339457600192505b600190910190612fb6565b6001831515146133ae57600080fd5b505050506020015192915050565b60008215156133cd57506000612b95565b508181028183828115156133dd57fe5b0414612b9557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b6000828152600b602090815260408083208484528252808320600190810154600d808552838620600581015493810154875260108652938620548787529452600790920154670de0b6b3a76400009361350793926134fb9290916134d29187916064916134bc9163ffffffff6133bc16565b8115156134c557fe5b049063ffffffff6133bc16565b8115156134db57fe5b6000888152600d602052604090206008015491900463ffffffff612b2316565b9063ffffffff6133bc16565b81151561351057fe5b049392505050565b60008282111561358957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b6000828152600b6020908152604080832084845282528083206002810154600190910154600d909352908320600801546135ec92670de0b6b3a7640000916135d6916133bc565b8115156135df57fe5b049063ffffffff61351816565b9392505050565b60006135ec61360184613614565b611843613614868663ffffffff612b2316565b662386f26fc100009004670de0b6b3a76400000290565b60006135ec613648613643858563ffffffff61351816565b61364d565b611843855b6000670de0b6b3a764000061366f83662386f26fc1000063ffffffff6133bc16565b81151561367857fe5b0492915050565b613687613e52565b6000838152600a6020526040902060050154156136bb576000838152600a60205260409020600501546136bb908490613c82565b506007546000928352600a60208190526040909320600501558051909101815290565b6000818152600d60205260408120600201544291908211801561370d57506000838152600d6020526040902054155b156137325761372b82612e1161012c670de0b6b3a7640000886134c5565b9050613760565b6000838152600d602052604090206002015461375d90612e1161012c670de0b6b3a7640000886134c5565b90505b600654613773908363ffffffff612b2316565b811015613793576000838152600d60205260409020600201819055611728565b6006546137a6908363ffffffff612b2316565b6000848152600d602052604090206002015550505050565b6137c6613e52565b60015460405160648704916000918291600160a060020a03169084908381818185875af19250505015156137fa5760009291505b50600a870486891480159061381f57506000878152600a602052604090206001015415155b156138bf576000878152600a602052604090206004015461384790829063ffffffff612b2316565b6000888152600a6020908152604091829020600481019390935582546001909301548251600160a060020a03909416845290830152818101839052426060830152518a918c918a917f590bbc0fc16915a85269a48f74783c39842b7ae9eceb7c295c95dbe8b3ec7331919081900360800190a46138d2565b6138cf828263ffffffff612b2316565b91505b6000868152600f6020526040902060010154613914906064906138fc908b9063ffffffff6133bc16565b81151561390557fe5b8491900463ffffffff612b2316565b915060008211156139c057600260009054906101000a9004600160a060020a0316600160a060020a03168260405180807f646f6e61746528290000000000000000000000000000000000000000000000008152506008019050604051809103902060e060020a9004906040518263ffffffff1660e060020a02815260040160006040518083038185885af150505060c08701516139ba925084915063ffffffff612b2316565b60c08601525b509298975050505050505050565b6139d6613e52565b6000848152600f6020526040812054819081906064906139fd908a9063ffffffff6133bc16565b811515613a0657fe5b049250613a7a613a6d6064613a3a600f60008c8152602001908152602001600020600101548c6133bc90919063ffffffff16565b811515613a4357fe5b046064613a578c600e63ffffffff6133bc16565b811515613a6057fe5b049063ffffffff612b2316565b899063ffffffff61351816565b9750613a8c888463ffffffff61351816565b9150613a9a8a8a8589613d19565b90506000811115613ab857613ab5838263ffffffff61351816565b92505b60008a8152600d6020526040902060070154613ade90612e11848463ffffffff612b2316565b60008b8152600d602052604090206007015560e0850151613b0690849063ffffffff612b2316565b60e08601525061010084015250909695505050505050565b836c01431e0fae6d7217caa00000000242670de0b6b3a76400000282600001510101816000018181525050600754751aba4714957d300d0e549208b31adb100000000000000285826020015101018160200181815250507f3671a735b2c7f1e43f1ab4385d4c5b480bbff437ad893b703fb0dfdbd24679e281600001518260200151600a6000898152602001908152602001600020600101543387878760400151886060015189608001518a60a001518b60c001518c60e001518d6101000151604051808e81526020018d81526020018c600019166000191681526020018b600160a060020a0316600160a060020a031681526020018a815260200189815260200188600160a060020a0316600160a060020a0316815260200187600019166000191681526020018681526020018581526020018481526020018381526020018281526020019d505050505050505050505050505060405180910390a15050505050565b6000613c8e838361358f565b90506000811115613d14576000838152600a6020526040902060030154613cbc90829063ffffffff612b2316565b6000848152600a6020908152604080832060030193909355600b815282822085835290522060020154613cf690829063ffffffff612b2316565b6000848152600b602090815260408083208684529091529020600201555b505050565b6000848152600d602052604081206005015481908190613d4786670de0b6b3a764000063ffffffff6133bc16565b811515613d5057fe5b6000898152600d60205260409020600801549190049250613d7890839063ffffffff612b2316565b6000888152600d6020526040902060080155670de0b6b3a7640000613da3838663ffffffff6133bc16565b811515613dac57fe5b6000888152600b602090815260408083208c8452825280832060020154600d90925290912060080154929091049250613dff91612e11908490670de0b6b3a7640000906135d6908a63ffffffff6133bc16565b6000878152600b602090815260408083208b8452825280832060020193909355600d90522060050154613e4790670de0b6b3a76400009061284190859063ffffffff6133bc16565b979650505050505050565b6101206040519081016040528060008152602001600081526020016000600160a060020a0316815260200160008019168152602001600081526020016000815260200160008152602001600081526020016000815250905600a165627a7a72305820720af32ce999a6dc5d8acdf33c15482245de84b4b35f4731c7f7fb047e5bf8530029

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

000000000000000000000000dcbb703095c4b7fae2a44ea0acffc53d97acde0e0000000000000000000000009ffbbea8028165c97ba98a7e0dd367a2ce6788e2

-----Decoded View---------------
Arg [0] : whaleContract (address): 0xdcbB703095C4B7FaE2a44EA0AcfFc53d97ACDe0e
Arg [1] : playerbook (address): 0x9FFBbEA8028165c97ba98a7E0dd367A2Ce6788e2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000dcbb703095c4b7fae2a44ea0acffc53d97acde0e
Arg [1] : 0000000000000000000000009ffbbea8028165c97ba98a7e0dd367a2ce6788e2


Swarm Source

bzzr://720af32ce999a6dc5d8acdf33c15482245de84b4b35f4731c7f7fb047e5bf853

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.