ETH Price: $3,555.48 (-0.53%)

Contract

0x66E2C30609e9661f52E5d46e1F0f2e6955FdA71e
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Upgrade Contract79537612019-06-14 1:13:592227 days ago1560474839IN
0x66E2C306...955FdA71e
0 ETH0.000096013
Dev Withdraw79537522019-06-14 1:11:162227 days ago1560474676IN
0x66E2C306...955FdA71e
0 ETH0.000059423
Pause79537512019-06-14 1:11:142227 days ago1560474674IN
0x66E2C306...955FdA71e
0 ETH0.00008483
Withdraw Funds64933622018-10-11 5:48:372473 days ago1539236917IN
0x66E2C306...955FdA71e
0 ETH0.000087134
Withdraw Funds55292322018-04-30 0:20:572637 days ago1525047657IN
0x66E2C306...955FdA71e
0 ETH0.000082264
Withdraw Funds55141252018-04-27 9:36:312640 days ago1524821791IN
0x66E2C306...955FdA71e
0 ETH0.000043182.1
Withdraw Funds55026342018-04-25 9:59:492642 days ago1524650389IN
0x66E2C306...955FdA71e
0 ETH0.00005272.5625
Withdraw Funds54950152018-04-24 2:14:182643 days ago1524536058IN
0x66E2C306...955FdA71e
0 ETH0.000063753.1
Withdraw Funds54945232018-04-24 0:09:152643 days ago1524528555IN
0x66E2C306...955FdA71e
0 ETH0.000012540.61
Purchase Phoenix54944022018-04-23 23:41:272643 days ago1524526887IN
0x66E2C306...955FdA71e
0.00375 ETH0.000024711.1
Withdraw Funds54939162018-04-23 21:41:362643 days ago1524519696IN
0x66E2C306...955FdA71e
0 ETH0.000082264
Withdraw Funds54938542018-04-23 21:26:482643 days ago1524518808IN
0x66E2C306...955FdA71e
0 ETH0.000041132
End Game54938342018-04-23 21:22:222643 days ago1524518542IN
0x66E2C306...955FdA71e
0 ETH0.001392633
Purchase Phoenix54931872018-04-23 18:45:332643 days ago1524509133IN
0x66E2C306...955FdA71e
0.00375 ETH0.000024961.1
Purchase Phoenix54931452018-04-23 18:33:042643 days ago1524508384IN
0x66E2C306...955FdA71e
0.00375 ETH0.000024961.1
Use Captain Abil...54931132018-04-23 18:25:282643 days ago1524507928IN
0x66E2C306...955FdA71e
0 ETH0.000024741.1
Withdraw Funds54930832018-04-23 18:15:342643 days ago1524507334IN
0x66E2C306...955FdA71e
0 ETH0.000010480.51
Use Captain Abil...54930782018-04-23 18:14:522643 days ago1524507292IN
0x66E2C306...955FdA71e
0 ETH0.000024741.1
Purchase Phoenix54930452018-04-23 18:04:582644 days ago1524506698IN
0x66E2C306...955FdA71e
0.00375 ETH0.000068073
Purchase Phoenix54929052018-04-23 17:31:252644 days ago1524504685IN
0x66E2C306...955FdA71e
0.00375 ETH0.000204222
Purchase Phoenix54926372018-04-23 16:18:532644 days ago1524500333IN
0x66E2C306...955FdA71e
0.0025 ETH0.000205242.01
Purchase Phoenix54925982018-04-23 16:08:372644 days ago1524499717IN
0x66E2C306...955FdA71e
0.0025 ETH0.000026141.1
Purchase Phoenix54925812018-04-23 16:04:172644 days ago1524499457IN
0x66E2C306...955FdA71e
0.0025 ETH0.000047762.01
Purchase Phoenix54925762018-04-23 16:03:342644 days ago1524499414IN
0x66E2C306...955FdA71e
0.0025 ETH0.000112351.1
Purchase Phoenix54925682018-04-23 16:01:352644 days ago1524499295IN
0x66E2C306...955FdA71e
0.0025 ETH0.000205242.01
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
-79537612019-06-14 1:13:592227 days ago1560474839
0x66E2C306...955FdA71e
0.2146244 ETH
-79537522019-06-14 1:11:162227 days ago1560474676
0x66E2C306...955FdA71e
0.41353853 ETH
Transfer55292322018-04-30 0:20:572637 days ago1525047657
0x66E2C306...955FdA71e
0.04151319 ETH
Transfer55141252018-04-27 9:36:312640 days ago1524821791
0x66E2C306...955FdA71e
0.00341116 ETH
Transfer55026342018-04-25 9:59:492642 days ago1524650389
0x66E2C306...955FdA71e
0.0021089 ETH
Transfer54950152018-04-24 2:14:182643 days ago1524536058
0x66E2C306...955FdA71e
0.00359465 ETH
Transfer54945232018-04-24 0:09:152643 days ago1524528555
0x66E2C306...955FdA71e
0.02665452 ETH
Transfer54939162018-04-23 21:41:362643 days ago1524519696
0x66E2C306...955FdA71e
0.03494828 ETH
Transfer54938542018-04-23 21:26:482643 days ago1524518808
0x66E2C306...955FdA71e
0.02293681 ETH
Transfer54930832018-04-23 18:15:342643 days ago1524507334
0x66E2C306...955FdA71e
0.00169375 ETH
Transfer54929052018-04-23 17:31:252644 days ago1524504685
0x66E2C306...955FdA71e
0.003 ETH
Transfer54926372018-04-23 16:18:532644 days ago1524500333
0x66E2C306...955FdA71e
0.002 ETH
Transfer54925762018-04-23 16:03:342644 days ago1524499414
0x66E2C306...955FdA71e
0.002 ETH
Transfer54925682018-04-23 16:01:352644 days ago1524499295
0x66E2C306...955FdA71e
0.002 ETH
Transfer54925512018-04-23 15:56:062644 days ago1524498966
0x66E2C306...955FdA71e
0.002 ETH
Transfer54925262018-04-23 15:49:472644 days ago1524498587
0x66E2C306...955FdA71e
0.002 ETH
Transfer54922682018-04-23 14:43:232644 days ago1524494603
0x66E2C306...955FdA71e
0.00576456 ETH
Transfer54922642018-04-23 14:42:332644 days ago1524494553
0x66E2C306...955FdA71e
0.00598566 ETH
Transfer54922602018-04-23 14:41:472644 days ago1524494507
0x66E2C306...955FdA71e
0.00765805 ETH
Transfer54917592018-04-23 12:40:492644 days ago1524487249
0x66E2C306...955FdA71e
0.002 ETH
Transfer54914272018-04-23 11:19:282644 days ago1524482368
0x66E2C306...955FdA71e
0.00492578 ETH
Transfer54913452018-04-23 10:56:502644 days ago1524481010
0x66E2C306...955FdA71e
0.002 ETH
Transfer54913432018-04-23 10:56:212644 days ago1524480981
0x66E2C306...955FdA71e
0.002 ETH
Transfer54913372018-04-23 10:54:532644 days ago1524480893
0x66E2C306...955FdA71e
0.00669011 ETH
Transfer54913292018-04-23 10:53:412644 days ago1524480821
0x66E2C306...955FdA71e
0.002 ETH
View All Internal 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:
CryptoPhoenixesCivilWar

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

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

pragma solidity
^0.4.21;

/*
http://www.cryptophoenixes.fun/
CryptoPhoenixes: Civil War Edition

Original game design and website development by Anyhowclick.
Art design by Tilly.
*/

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;

  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }
  
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

contract CryptoPhoenixesCivilWar is Ownable, Pausable {
  using SafeMath for uint256;

  address public subDevOne;
  address public subDevTwo;
  
  Phoenix[] public PHOENIXES;
  /*
  id 0: Rainbow Phoenix
  ids 1-2: Red / Blue capt respectively
  ids 3-6: Red bombers
  ids 7-10: Red thieves
  ids 11-14: Blue bombers
  ids 15-18: Blue thieves
  */
  
  uint256 public DENOMINATOR = 10000; //Eg explosivePower = 300 -> 3%
  
  uint256[2] public POOLS; //0 = red, 1 = blue
  uint256[2] public SCORES; //0 = red, 1 = blue
  
  bool public GAME_STARTED = false;
  uint public GAME_END = 0;
  
  // devFunds
  mapping (address => uint256) public devFunds;

  // userFunds
  mapping (address => uint256) public userFunds;

  // Constant
  uint256 constant public BASE_PRICE = 0.0025 ether;
  
  //Permission control
  modifier onlyAuthorized() {
      require(msg.sender == owner || msg.sender == subDevOne); //subDevTwo is NOT authorized
      _;
  }
  
  //to check that a game has ended
  modifier gameHasEnded() {
      require(GAME_STARTED); //Check if a game was started in the first place
      require(now >= GAME_END); //Check if game has ended
      _;
  }
  
  //to check that a game is in progress
  modifier gameInProgress() {
      require(GAME_STARTED);
      require(now <= GAME_END);
      _;
  }
  
  //to check the reverse, that no game is in progress
  modifier noGameInProgress() {
      require(!GAME_STARTED);
      _;
  }
  
  // Events
  event GameStarted();
      
  event PhoenixPurchased(
      uint256 phoenixID,
      address newOwner,
      uint256 price,
      uint256 nextPrice,
      uint256 currentPower,
      uint abilityAvailTime
  );

  event CaptainAbilityUsed(
      uint256 captainID
  );
  
  event PhoenixAbilityUsed(
      uint256 phoenixID,
      uint256 payout,
      uint256 price,
      uint256 currentPower,
      uint abilityAvailTime,
      address previousOwner
  );
  
  event GameEnded();

  event WithdrewFunds(
    address owner
  );
  
  // Struct to store Phoenix Data
  struct Phoenix {
    uint256 price;  // Current price of phoenix
    uint256 payoutPercentage; // The percent of the funds awarded upon explosion / steal / end game
    uint abilityAvailTime; // Time when phoenix's ability is available
    uint cooldown; // Time to add after cooldown
    uint cooldownDecreaseAmt; // Amt of time to decrease upon each flip
    uint basePower; // Starting exploding / stealing power of phoenix
    uint currentPower; // Current exploding / stealing power of phoenix
    uint powerIncreaseAmt; // Amt of power to increase with every flip
    uint powerDrop; // Power drop of phoenix upon ability usage
    uint powerCap; // Power should not exceed this amount
    address previousOwner;  // Owner of phoenix in previous round
    address currentOwner; // Current owner of phoenix
  }
  
// Main function to set the beta period and sub developer
  function CryptoPhoenixesCivilWar(address _subDevOne, address _subDevTwo) {
    subDevOne = _subDevOne;
    subDevTwo = _subDevTwo;
    createPhoenixes();
  }

  function createPhoenixes() private {
      //First, create rainbow phoenix and captains
      for (uint256 i = 0; i < 3; i++) {
          Phoenix memory phoenix = Phoenix({
              price: 0.005 ether,
              payoutPercentage: 2400, //redundant for rainbow phoenix. Set to 24% for captains
              cooldown: 20 hours, //redundant for rainbow phoenix
              abilityAvailTime: 0, //will be set when game starts
              //Everything else not used
              cooldownDecreaseAmt: 0,
              basePower: 0,
              currentPower: 0,
              powerIncreaseAmt: 0,
              powerDrop: 0,
              powerCap: 0,
              previousOwner: address(0),
              currentOwner: address(0)
          });
          
          PHOENIXES.push(phoenix);
      }
      
      //set rainbow phoenix price to 0.01 ether
      PHOENIXES[0].price = 0.01 ether;
      
      //Now, for normal phoenixes
      uint16[4] memory PAYOUTS = [400,700,1100,1600]; //4%, 7%, 11%, 16%
      uint16[4] memory COOLDOWN = [2 hours, 4 hours, 8 hours, 16 hours];
      uint16[4] memory COOLDOWN_DECREASE = [9 minutes, 15 minutes, 26 minutes, 45 minutes];
      uint8[4] memory POWER_INC_AMT = [25,50,100,175]; //0.25%, 0.5%, 1%, 1.75%
      uint16[4] memory POWER_DROP = [150,300,600,1000]; //1.5%, 3%, 6%, 10%
      uint16[4] memory CAPPED_POWER = [800,1500,3000,5000]; //8%, 15%, 30%, 50%
      
      
      for (i = 0; i < 4; i++) {
          for (uint256 j = 0; j < 4; j++) {
              phoenix = Phoenix({
              price: BASE_PRICE,
              payoutPercentage: PAYOUTS[j],
              abilityAvailTime: 0,
              cooldown: COOLDOWN[j],
              cooldownDecreaseAmt: COOLDOWN_DECREASE[j],
              basePower: (j+1)*100, //100, 200, 300, 400 = 1%, 2%, 3%, 4%
              currentPower: (j+1)*100,
              powerIncreaseAmt: POWER_INC_AMT[j],
              powerDrop: POWER_DROP[j],
              powerCap: CAPPED_POWER[j],
              previousOwner: address(0),
              currentOwner: address(0)
              });
              
              PHOENIXES.push(phoenix);
          }
      }
  }
  
  function startGame() public noGameInProgress onlyAuthorized {
      //reset scores
      SCORES[0] = 0;
      SCORES[1] = 0;
      
      //reset normal phoenixes' abilityAvailTimes
      for (uint i = 1; i < 19; i++) {
          PHOENIXES[i].abilityAvailTime = now + PHOENIXES[i].cooldown;
      }
      
      GAME_STARTED = true;
      //set game duration to be 1 day
      GAME_END = now + 1 days;
      emit GameStarted();
  }
  
  //Set bag holders from version 1.0
  function setPhoenixOwners(address[19] _owners) onlyOwner public {
      require(PHOENIXES[0].previousOwner == address(0)); //Just need check once
      for (uint256 i = 0; i < 19; i++) {
          Phoenix storage phoenix = PHOENIXES[i];
          phoenix.previousOwner = _owners[i];
          phoenix.currentOwner = _owners[i];
      }
  }

function purchasePhoenix(uint256 _phoenixID) whenNotPaused gameInProgress public payable {
      //checking prerequisite
      require(_phoenixID < 19);
    
      Phoenix storage phoenix = PHOENIXES[_phoenixID];
      //Get current price of phoenix
      uint256 price = phoenix.price;
      
      //checking more prerequisites
      require(phoenix.currentOwner != address(0)); //check if phoenix was initialised
      require(msg.value >= phoenix.price);
      require(phoenix.currentOwner != msg.sender); //prevent consecutive purchases
      
      uint256 outgoingOwnerCut;
      uint256 purchaseExcess;
      uint256 poolCut;
      uint256 rainbowCut;
      uint256 captainCut;
      
      (outgoingOwnerCut, 
      purchaseExcess, 
      poolCut,
      rainbowCut,
      captainCut) = calculateCuts(msg.value,price);
      
      //give 1% for previous owner, abusing variable name here
      userFunds[phoenix.previousOwner] = userFunds[phoenix.previousOwner].add(captainCut); 
      
      //If purchasing rainbow phoenix, give the 2% rainbowCut and 1% captainCut to outgoingOwner
      if (_phoenixID == 0) {
          outgoingOwnerCut = outgoingOwnerCut.add(rainbowCut).add(captainCut);
          rainbowCut = 0; //necessary to set to zero since variable is used for other cases
          poolCut = poolCut.div(2); //split poolCut equally into 2, distribute to both POOLS
          POOLS[0] = POOLS[0].add(poolCut); //add pool cut to red team
          POOLS[1] = POOLS[1].add(poolCut); //add pool cut to blue team
          
      } else if (_phoenixID < 3) { //if captain, return 1% captainCut to outgoingOwner
          outgoingOwnerCut = outgoingOwnerCut.add(captainCut);
          uint256 poolID = _phoenixID.sub(1); //1 --> 0, 2--> 1 (detemine which pool to add pool cut to)
          POOLS[poolID] = POOLS[poolID].add(poolCut);
          
      } else if (_phoenixID < 11) { //for normal red phoenixes, set captain and adjust stats
          //transfer 1% captainCut to red captain
          userFunds[PHOENIXES[1].currentOwner] = userFunds[PHOENIXES[1].currentOwner].add(captainCut);
          upgradePhoenixStats(_phoenixID);
          POOLS[0] = POOLS[0].add(poolCut); //add pool cut to red team
      } else {
          //transfer 1% captainCut to blue captain
          userFunds[PHOENIXES[2].currentOwner] = userFunds[PHOENIXES[2].currentOwner].add(captainCut);
          upgradePhoenixStats(_phoenixID);
          POOLS[1] = POOLS[1].add(poolCut); //add pool cut to blue team
      }
      
      //transfer rainbowCut to rainbow phoenix owner
      userFunds[PHOENIXES[0].currentOwner] = userFunds[PHOENIXES[0].currentOwner].add(rainbowCut);

      // set new price
      phoenix.price = getNextPrice(price);
      
      // send funds to old owner 
      sendFunds(phoenix.currentOwner, outgoingOwnerCut);
    
      // set new owner
      phoenix.currentOwner = msg.sender;

      // Send refund to owner if needed
      if (purchaseExcess > 0) {
        sendFunds(msg.sender,purchaseExcess);
      }
      
      // raise event
      emit PhoenixPurchased(_phoenixID, msg.sender, price, phoenix.price, phoenix.currentPower, phoenix.abilityAvailTime);
  }
  
  function calculateCuts(
      uint256 _amtPaid,
      uint256 _price
      )
      private
      returns (uint256 outgoingOwnerCut, uint256 purchaseExcess, uint256 poolCut, uint256 rainbowCut, uint256 captainCut)
      {
      outgoingOwnerCut = _price;
      purchaseExcess = _amtPaid.sub(_price);
      
      //Take 5% cut from excess
      uint256 excessPoolCut = purchaseExcess.div(20); //5%, will be added to poolCut
      purchaseExcess = purchaseExcess.sub(excessPoolCut);
      
      //3% of price to devs
      uint256 cut = _price.mul(3).div(100); //3%
      outgoingOwnerCut = outgoingOwnerCut.sub(cut);
      distributeDevCut(cut);
      
      //1% of price to owner in previous round, 1% to captain (if applicable)
      //abusing variable name to use for previous owner and captain fees, since they are the same
      captainCut = _price.div(100); //1%
      outgoingOwnerCut = outgoingOwnerCut.sub(captainCut).sub(captainCut); //subtract twice, reason as explained
      
      //2% of price to rainbow (if applicable)
      rainbowCut = _price.mul(2).div(100); //2%
      outgoingOwnerCut = outgoingOwnerCut.sub(rainbowCut);
      
      //11-13% of price will go to the respective team pools
      poolCut = calculatePoolCut(_price);
      outgoingOwnerCut = outgoingOwnerCut.sub(poolCut);
      /*
      add the poolCut and excessPoolCut together
      so poolCut = 11-13% of price + 5% of purchaseExcess
      */
      poolCut = poolCut.add(excessPoolCut);
  }
  
  function distributeDevCut(uint256 _cut) private {
      devFunds[owner] = devFunds[owner].add(_cut.div(2)); //50% to owner
      devFunds[subDevOne] = devFunds[subDevOne].add(_cut.div(4)); //25% to subDevOne
      devFunds[subDevTwo] = devFunds[subDevTwo].add(_cut.div(4)); //25% to subDevTwo
  }
  
/**
  * @dev Determines next price of phoenix
*/
  function getNextPrice (uint256 _price) private pure returns (uint256 _nextPrice) {
    if (_price < 0.25 ether) {
      return _price.mul(3).div(2); //1.5x
    } else if (_price < 1 ether) {
      return _price.mul(14).div(10); //1.4x
    } else {
      return _price.mul(13).div(10); //1.3x
    }
  }
  
  function calculatePoolCut (uint256 _price) private pure returns (uint256 poolCut) {
      if (_price < 0.25 ether) {
          poolCut = _price.mul(13).div(100); //13%
      } else if (_price < 1 ether) {
          poolCut = _price.mul(12).div(100); //12%
      } else {
          poolCut = _price.mul(11).div(100); //11%
      }
  }
 
  function upgradePhoenixStats(uint256 _phoenixID) private {
      Phoenix storage phoenix = PHOENIXES[_phoenixID];
      //increase current power of phoenix
      phoenix.currentPower = phoenix.currentPower.add(phoenix.powerIncreaseAmt);
      //handle boundary case where current power exceeds cap
      if (phoenix.currentPower > phoenix.powerCap) {
          phoenix.currentPower = phoenix.powerCap;
      }
      //decrease cooldown of phoenix
      //no base case to take care off. Time shouldnt decrease too much to ever reach zero
      phoenix.abilityAvailTime = phoenix.abilityAvailTime.sub(phoenix.cooldownDecreaseAmt);
  }
  
  function useCaptainAbility(uint256 _captainID) whenNotPaused gameInProgress public {
      require(_captainID > 0 && _captainID < 3); //either 1 or 2
      Phoenix storage captain = PHOENIXES[_captainID];
      require(msg.sender == captain.currentOwner); //Only owner of captain can use ability
      require(now >= captain.abilityAvailTime); //Ability must be available for use
      
      if (_captainID == 1) { //red team
          uint groupIDStart = 3; //Start index of _groupID in PHOENIXES
          uint groupIDEnd = 11; //End index (excluding) of _groupID in PHOENIXES
      } else {
          groupIDStart = 11; 
          groupIDEnd = 19; 
      }
      
      for (uint i = groupIDStart; i < groupIDEnd; i++) {
          //Multiply team power by 1.5x
          PHOENIXES[i].currentPower = PHOENIXES[i].currentPower.mul(3).div(2); 
          //ensure cap not breached
          if (PHOENIXES[i].currentPower > PHOENIXES[i].powerCap) {
              PHOENIXES[i].currentPower = PHOENIXES[i].powerCap;
          }
      }
      
      captain.abilityAvailTime = GAME_END + 10 seconds; //Prevent ability from being used again in current round
      
      emit CaptainAbilityUsed(_captainID);
  }
  
  function useAbility(uint256 _phoenixID) whenNotPaused gameInProgress public {
      //phoenixID must be between 3 to 18
      require(_phoenixID > 2);
      require(_phoenixID < 19);
      
      Phoenix storage phoenix = PHOENIXES[_phoenixID];
      require(msg.sender == phoenix.currentOwner); //Only owner of phoenix can use ability
      require(now >= phoenix.abilityAvailTime); //Ability must be available for use

      //calculate which pool to take from
      //ids 3-6, 15-18 --> red
      //ids 7-14 --> blue
      if (_phoenixID >=7 &&  _phoenixID <= 14) {
          require(POOLS[1] > 0); //blue pool
          uint256 payout = POOLS[1].mul(phoenix.currentPower).div(DENOMINATOR); //calculate payout
          POOLS[1] = POOLS[1].sub(payout); //subtract from pool
      } else {
          require(POOLS[0] > 0); //red pool
          payout = POOLS[0].mul(phoenix.currentPower).div(DENOMINATOR);
          POOLS[0] = POOLS[0].sub(payout);
      }
      
      //determine which team the phoenix is on
      if (_phoenixID < 11) { //red team
          bool isRed = true; //to determine which team to distribute the 9% payout to
          SCORES[0] = SCORES[0].add(payout); //add payout to score (ie. payout is the score)
      } else {
          //blue team
          isRed = false;
          SCORES[1] = SCORES[1].add(payout);
      }
      
      uint256 ownerCut = payout;
      
      //drop power of phoenix
      decreasePower(_phoenixID);
      
      //decrease phoenix price
      decreasePrice(_phoenixID);
      
      //reset cooldown
      phoenix.abilityAvailTime = now + phoenix.cooldown;

      // set previous owner to be current owner, so he can get the 1% dividend from subsequent purchases
      phoenix.previousOwner = msg.sender;
      
      // Calculate the different cuts
      // 2% to rainbow
      uint256 cut = payout.div(50); //2%
      ownerCut = ownerCut.sub(cut);
      userFunds[PHOENIXES[0].currentOwner] = userFunds[PHOENIXES[0].currentOwner].add(cut);
      
      // 1% to dev
      cut = payout.div(100); //1%
      ownerCut = ownerCut.sub(cut);
      distributeDevCut(cut);
      
      //9% to team
      cut = payout.mul(9).div(100); //9%
      ownerCut = ownerCut.sub(cut);
      distributeTeamCut(isRed,cut);
      
      //Finally, send money to user
      sendFunds(msg.sender,ownerCut);
      
      emit PhoenixAbilityUsed(_phoenixID,ownerCut,phoenix.price,phoenix.currentPower,phoenix.abilityAvailTime,phoenix.previousOwner);
  }
  
  function decreasePrice(uint256 _phoenixID) private {
      Phoenix storage phoenix = PHOENIXES[_phoenixID];
      if (phoenix.price >= 0.75 ether) {
        phoenix.price = phoenix.price.mul(20).div(100); //drop to 20%
      } else {
        phoenix.price = phoenix.price.mul(10).div(100); //drop to 10%
        if (phoenix.price < BASE_PRICE) {
          phoenix.price = BASE_PRICE;
          }
      }
  }
  
  function decreasePower(uint256 _phoenixID) private {
      Phoenix storage phoenix = PHOENIXES[_phoenixID];
      phoenix.currentPower = phoenix.currentPower.sub(phoenix.powerDrop);
      //handle boundary case where currentPower is below basePower
      if (phoenix.currentPower < phoenix.basePower) {
          phoenix.currentPower = phoenix.basePower; 
      }
  }
  
  function distributeTeamCut(bool _isRed, uint256 _cut) private {
      /* 
      Note that captain + phoenixes payout percentages add up to 100%.
      Captain: 24%
      Phoenix 1 & 5: 4% x 2 = 8%
      Phoenix 2 & 6: 7% x 2 = 14%
      Phoenix 3 & 7: 11% x 2 = 22%
      Phoenix 4 & 8: 16% x 2 = 32%
      */
      
      if (_isRed) {
          uint captainID = 1;
          uint groupIDStart = 3;
          uint groupIDEnd = 11;
      } else {
          captainID = 2;
          groupIDStart = 11;
          groupIDEnd = 19;
      }
      
      //calculate and transfer capt payout
      uint256 payout = PHOENIXES[captainID].payoutPercentage.mul(_cut).div(DENOMINATOR);
      userFunds[PHOENIXES[captainID].currentOwner] = userFunds[PHOENIXES[captainID].currentOwner].add(payout);
      
      for (uint i = groupIDStart; i < groupIDEnd; i++) {
          //calculate how much to pay to each phoenix owner in the team
          payout = PHOENIXES[i].payoutPercentage.mul(_cut).div(DENOMINATOR);
          //transfer payout
          userFunds[PHOENIXES[i].currentOwner] = userFunds[PHOENIXES[i].currentOwner].add(payout);
      }
  }
  
  function endGame() gameHasEnded public {
      GAME_STARTED = false; //to allow this function to only be called once after the end of every round
      uint256 remainingPoolAmt = POOLS[0].add(POOLS[1]); //add the 2 pools together
      
      //Distribution structure -> 15% rainbow, 75% teams, 10% for next game
      uint256 rainbowCut = remainingPoolAmt.mul(15).div(100); //15% to rainbow
      uint256 teamCut = remainingPoolAmt.mul(75).div(100); //75% to teams
      remainingPoolAmt = remainingPoolAmt.sub(rainbowCut).sub(teamCut);
      
      //distribute 15% to rainbow phoenix owner
      userFunds[PHOENIXES[0].currentOwner] = userFunds[PHOENIXES[0].currentOwner].add(rainbowCut);
      
      //distribute 75% to teams
      //in the unlikely event of a draw, split evenly, so 37.5% cut to each team
      if (SCORES[0] == SCORES[1]) {
          teamCut = teamCut.div(2);
          distributeTeamCut(true,teamCut); //redTeam
          distributeTeamCut(false,teamCut); //blueTeam
      } else {
          //25% to losing team
          uint256 losingTeamCut = teamCut.div(3); // 1 third of 75% = 25%
          //SCORES[0] = red, SCORES[1] = blue
          //if red > blue, then award to redTeam, so bool _isRed = red > blue
          distributeTeamCut((SCORES[0] > SCORES[1]),losingTeamCut);
          
          //50% to winning team
          teamCut = teamCut.sub(losingTeamCut); //take the remainder
          //inverse of the winning condition
          distributeTeamCut(!(SCORES[0] > SCORES[1]),teamCut); 
      }
      
      // 5% to each pool for next game
      POOLS[0] = remainingPoolAmt.div(2);
      POOLS[1] = POOLS[0];
      
      resetPhoenixes();
      emit GameEnded();
  }
  
  function resetPhoenixes() private {
      //reset attributes of phoenixes
      PHOENIXES[0].price = 0.01 ether;
      PHOENIXES[1].price = 0.005 ether;
      PHOENIXES[2].price = 0.005 ether;
      
      for (uint i = 0; i < 3; i++) {
          PHOENIXES[i].previousOwner = PHOENIXES[i].currentOwner;
      }
      
      for (i = 3; i < 19; i++) {
          //Reset price and power levels of phoenixes
          //Ability time will be set during game start
          Phoenix storage phoenix = PHOENIXES[i];
          phoenix.price = BASE_PRICE;
          phoenix.currentPower = phoenix.basePower;
          phoenix.previousOwner = phoenix.currentOwner;
      }
  }
  
/**
* @dev Try to send funds immediately
* If it fails, user has to manually withdraw.
*/
  function sendFunds(address _user, uint256 _payout) private {
    if (!_user.send(_payout)) {
      userFunds[_user] = userFunds[_user].add(_payout);
    }
  }

/**
* @dev Withdraw dev cut.
*/
  function devWithdraw() public {
    uint256 funds = devFunds[msg.sender];
    require(funds > 0);
    devFunds[msg.sender] = 0;
    msg.sender.transfer(funds);
  }

/**
* @dev Users can withdraw their funds
*/
  function withdrawFunds() public {
    uint256 funds = userFunds[msg.sender];
    require(funds > 0);
    userFunds[msg.sender] = 0;
    msg.sender.transfer(funds);
    emit WithdrewFunds(msg.sender);
  }

/**
* @dev Transfer contract balance in case of bug or contract upgrade
*/ 
 function upgradeContract(address _newContract) public onlyOwner whenPaused {
        _newContract.transfer(address(this).balance);
 }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"SCORES","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_phoenixID","type":"uint256"}],"name":"useAbility","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"endGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_captainID","type":"uint256"}],"name":"useCaptainAbility","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"devFunds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"userFunds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"subDevOne","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DENOMINATOR","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"PHOENIXES","outputs":[{"name":"price","type":"uint256"},{"name":"payoutPercentage","type":"uint256"},{"name":"abilityAvailTime","type":"uint256"},{"name":"cooldown","type":"uint256"},{"name":"cooldownDecreaseAmt","type":"uint256"},{"name":"basePower","type":"uint256"},{"name":"currentPower","type":"uint256"},{"name":"powerIncreaseAmt","type":"uint256"},{"name":"powerDrop","type":"uint256"},{"name":"powerCap","type":"uint256"},{"name":"previousOwner","type":"address"},{"name":"currentOwner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owners","type":"address[19]"}],"name":"setPhoenixOwners","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_phoenixID","type":"uint256"}],"name":"purchasePhoenix","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"GAME_STARTED","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"POOLS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"devWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"startGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"GAME_END","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newContract","type":"address"}],"name":"upgradeContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"BASE_PRICE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"subDevTwo","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_subDevOne","type":"address"},{"name":"_subDevTwo","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"GameStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"phoenixID","type":"uint256"},{"indexed":false,"name":"newOwner","type":"address"},{"indexed":false,"name":"price","type":"uint256"},{"indexed":false,"name":"nextPrice","type":"uint256"},{"indexed":false,"name":"currentPower","type":"uint256"},{"indexed":false,"name":"abilityAvailTime","type":"uint256"}],"name":"PhoenixPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"captainID","type":"uint256"}],"name":"CaptainAbilityUsed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"phoenixID","type":"uint256"},{"indexed":false,"name":"payout","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"},{"indexed":false,"name":"currentPower","type":"uint256"},{"indexed":false,"name":"abilityAvailTime","type":"uint256"},{"indexed":false,"name":"previousOwner","type":"address"}],"name":"PhoenixAbilityUsed","type":"event"},{"anonymous":false,"inputs":[],"name":"GameEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"}],"name":"WithdrewFunds","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]

60606040526000805460a060020a60ff02191681556127106004556009805460ff19169055600a5534156200003357600080fd5b604051604080620029f0833981016040528080519190602001805160008054600160a060020a03338116600160a060020a0319928316179092556001805487841690831617905560028054928416929091169190911790559150620000a7905064010000000062001cde620000af82021704565b5050620006dc565b6000620000bb62000589565b620000c5620005fd565b620000cf620005fd565b620000d9620005fd565b620000e3620005fd565b620000ed620005fd565b620000f7620005fd565b60008098505b60038910156200026957610180604051908101604052806611c37937e0800081526020016109608152602001600081526020016201194081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600160a060020a031681526020016000600160a060020a031681525097506003805480600101828162000199919062000626565b600092835260209092208a91600c0201815181556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801556101208201518160090155610140820151600a82018054600160a060020a031916600160a060020a0392909216919091179055610160820151600b919091018054600160a060020a031916600160a060020a03909216919091179055505060019890980197620000fd565b662386f26fc10000600360008154811015156200028257fe5b60009182526020909120600c90910201556080604051908101604090815261019082526102bc602083015261044c818301526106406060830152909750608090519081016040908152611c20825261384060208301526170808183015261e100606083015290965060809051908101604090815261021c8252610384602083015261061881830152610a8c6060830152909550608090519081016040908152601982526032602083015260648183015260af60608301529094506080905190810160409081526096825261012c6020830152610258818301526103e8606083015290935060809051908101604090815261032082526105dc6020830152610bb89082015261138860608201526000995091505b60048910156200057e575060005b600481101562000572576101806040519081016040526608e1bc9bf04000815260208101888360048110620003d457fe5b602002015161ffff16815260006020820152604001878360048110620003f657fe5b602002015161ffff1681526020018683600481106200041157fe5b602002015161ffff168152606460018401026020820181905260408201526060018583600481106200043f57fe5b602002015160ff1681526020018483600481106200045957fe5b602002015161ffff1681526020018383600481106200047457fe5b602002015161ffff168152600060208201819052604090910152600380549199509060018101620004a6838262000626565b600092835260209092208a91600c0201815181556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801556101208201518160090155610140820151600a82018054600160a060020a031916600160a060020a0392909216919091179055610160820151600b919091018054600160a060020a031916600160a060020a039092169190911790555050600101620003a3565b60019098019762000395565b505050505050505050565b61018060405190810160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600160a060020a031681526020016000600160a060020a031681525090565b60806040519081016040526004815b6000815260001990910190602001816200060c5790505090565b8154818355818115116200065557600c0281600c0283600052602060002091820191016200065591906200065a565b505050565b620006d991905b80821115620006d557600080825560018201819055600282018190556003820181905560048201819055600582018190556006820181905560078201819055600882018190556009820155600a81018054600160a060020a0319908116909155600b820180549091169055600c0162000661565b5090565b90565b61230480620006ec6000396000f30060606040526004361061013d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166307374c29811461014257806324600fc31461016a5780633f4ba83a1461017f5780635c975abb146101925780635d161c3f146101b95780636cbc2ded146101cf57806371ee329f146101e257806373e945f6146101f85780638387c6e1146102175780638456cb591461023657806388301f57146102495780638da5cb5b14610278578063918f86741461028b578063a25601051461029e578063a340295a14610324578063a48296d914610360578063a71962c21461036b578063a8423c081461037e578063ad606c7214610394578063d65ab5f2146103a7578063da5f3ac1146103ba578063eb2c0223146103cd578063f86325ed146103ec578063f892ee05146103ff575b600080fd5b341561014d57600080fd5b610158600435610412565b60405190815260200160405180910390f35b341561017557600080fd5b61017d610426565b005b341561018a57600080fd5b61017d6104cf565b341561019d57600080fd5b6101a561054e565b604051901515815260200160405180910390f35b34156101c457600080fd5b61017d60043561055e565b34156101da57600080fd5b61017d6108e8565b34156101ed57600080fd5b61017d600435610ab0565b341561020357600080fd5b610158600160a060020a0360043516610cb5565b341561022257600080fd5b610158600160a060020a0360043516610cc7565b341561024157600080fd5b61017d610cd9565b341561025457600080fd5b61025c610d5d565b604051600160a060020a03909116815260200160405180910390f35b341561028357600080fd5b61025c610d6c565b341561029657600080fd5b610158610d7b565b34156102a957600080fd5b6102b4600435610d81565b6040519b8c5260208c019a909a526040808c019990995260608b019790975260808a019590955260a089019390935260c088019190915260e0870152610100860152610120850152600160a060020a03908116610140850152909116610160830152610180909101905180910390f35b341561032f57600080fd5b61017d6004610264816013610260604051908101604052919082826102608082843750939550610dfc945050505050565b61017d600435610ef8565b341561037657600080fd5b6101a56112f1565b341561038957600080fd5b6101586004356112fa565b341561039f57600080fd5b61017d611307565b34156103b257600080fd5b61017d611373565b34156103c557600080fd5b610158611465565b34156103d857600080fd5b61017d600160a060020a036004351661146b565b34156103f757600080fd5b6101586114db565b341561040a57600080fd5b61025c6114e6565b6007816002811061041f57fe5b0154905081565b600160a060020a0333166000908152600c602052604081205490811161044b57600080fd5b600160a060020a0333166000818152600c60205260408082209190915582156108fc0290839051600060405180830381858888f19350505050151561048f57600080fd5b7f361d758177a1a273ab3bf5e9ae4cc4f6923af295c0e99ad3d02593c5ab8e62d433604051600160a060020a03909116815260200160405180910390a150565b60005433600160a060020a039081169116146104ea57600080fd5b60005460a060020a900460ff16151561050257600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60005460a060020a900460ff1681565b60008054819081908190819060a060020a900460ff161561057e57600080fd5b60095460ff16151561058f57600080fd5b600a5442111561059e57600080fd5b600286116105ab57600080fd5b601386106105b857600080fd5b60038054879081106105c657fe5b60009182526020909120600b600c909202019081015490955033600160a060020a039081169116146105f757600080fd5b600285015442101561060857600080fd5b6007861015801561061a5750600e8611155b15610680576006546000901161062f57600080fd5b600454600686015461065f919061065390600560015b01549063ffffffff6114f516565b9063ffffffff61152016565b935061067884600560015b01549063ffffffff61153716565b6006556106bd565b6005546000901161069057600080fd5b60045460068601546106aa91906106539060056000610645565b93506106b9846005600061066a565b6005555b600b8610156106e957600192506106e184600760005b01549063ffffffff61154916565b6007556106fe565b600092506106fa84600760016106d3565b6008555b83915061070a86611558565b610713866115b6565b600385015442016002860155600a85018054600160a060020a03191633600160a060020a0316179055610747846032611520565b9050610759828263ffffffff61153716565b91506107ad81600c60006003600081548110151561077357fe5b60009182526020808320600b600c909302019190910154600160a060020a031683528201929092526040019020549063ffffffff61154916565b600c6000600360008154811015156107c157fe5b60009182526020808320600b600c909302019190910154600160a060020a0316835282019290925260400190205561080084606463ffffffff61152016565b9050610812828263ffffffff61153716565b915061081d81611646565b610833606461065386600963ffffffff6114f516565b9050610845828263ffffffff61153716565b91506108518382611747565b61085b3383611895565b845460068601546002870154600a8801547fb5012bca5322f6d77217cb1675c23aa4769fef13554da00a280399ea4cfe1a25938a9387939192909190600160a060020a0316604051958652602086019490945260408086019390935260608501919091526080840152600160a060020a0390911660a083015260c0909101905180910390a1505050505050565b60095460009081908190819060ff16151561090257600080fd5b600a5442101561091157600080fd5b6009805460ff1916905560065461092b90600560006106d3565b9350610943606461065386600f63ffffffff6114f516565b925061095b606461065386604b63ffffffff6114f516565b915061097d82610971868663ffffffff61153716565b9063ffffffff61153716565b935061099783600c60006003600081548110151561077357fe5b600c6000600360008154811015156109ab57fe5b60009182526020808320600c92909202909101600b0154600160a060020a031683528201929092526040019020556008546007541415610a13576109f682600263ffffffff61152016565b9150610a03600183611747565b610a0e600083611747565b610a5d565b610a2482600363ffffffff61152016565b600854600754919250610a38911182611747565b610a48828263ffffffff61153716565b600854600754919350610a5d91111583611747565b610a6e84600263ffffffff61152016565b6005819055600655610a7e611907565b7f1084d47e99647565312e58bba004b0fc3088c683fa22f3925f1cf5fb0955402960405160405180910390a150505050565b6000805481908190819060a060020a900460ff1615610ace57600080fd5b60095460ff161515610adf57600080fd5b600a54421115610aee57600080fd5b600085118015610afe5750600385105b1515610b0957600080fd5b6003805486908110610b1757fe5b60009182526020909120600b600c909202019081015490945033600160a060020a03908116911614610b4857600080fd5b6002840154421015610b5957600080fd5b8460011415610b6f5760039250600b9150610b78565b600b9250601391505b50815b81811015610c7157610bbb600261065360038085815481101515610b9b57fe5b90600052602060002090600c0201600601546114f590919063ffffffff16565b6003805483908110610bc957fe5b600091825260209091206006600c9092020101556003805482908110610beb57fe5b90600052602060002090600c020160090154600382815481101515610c0c57fe5b90600052602060002090600c0201600601541115610c69576003805482908110610c3257fe5b90600052602060002090600c020160090154600382815481101515610c5357fe5b90600052602060002090600c0201600601819055505b600101610b7b565b600a80540160028501557febb24605ed23cfc6f6f793e969b97a4d4fca76b1a8096cd1c2e9324a8b8c1afc8560405190815260200160405180910390a15050505050565b600b6020526000908152604090205481565b600c6020526000908152604090205481565b60005433600160a060020a03908116911614610cf457600080fd5b60005460a060020a900460ff1615610d0b57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600154600160a060020a031681565b600054600160a060020a031681565b60045481565b6003805482908110610d8f57fe5b60009182526020909120600c9091020180546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b909b0154999b5097999698959794969395929491939092600160a060020a0391821691168c565b60008054819033600160a060020a03908116911614610e1a57600080fd5b600380546000919082908110610e2c57fe5b60009182526020909120600a600c909202010154600160a060020a031614610e5357600080fd5b600091505b6013821015610ef3576003805483908110610e6f57fe5b90600052602060002090600c020190508282601381101515610e8d57fe5b6020020151600a82018054600160a060020a031916600160a060020a0392909216919091179055828260138110610ec057fe5b6020020151600b82018054600160a060020a031916600160a060020a039290921691909117905560019190910190610e58565b505050565b600080600080600080600080600060149054906101000a900460ff16151515610f2057600080fd5b60095460ff161515610f3157600080fd5b600a54421115610f4057600080fd5b60138910610f4d57600080fd5b600380548a908110610f5b57fe5b60009182526020909120600c909102018054600b8201549199509750600160a060020a03161515610f8b57600080fd5b8754341015610f9957600080fd5b600b88015433600160a060020a0390811691161415610fb757600080fd5b610fc13488611a88565b600a8d0154600160a060020a03166000908152600c6020526040902054949a5092985090965094509250610ffb908363ffffffff61154916565b600a890154600160a060020a03166000908152600c60205260409020558815156110845761103f82611033888663ffffffff61154916565b9063ffffffff61154916565b95506000925061105684600263ffffffff61152016565b935061106584600560006106d3565b60056000015561107884600560016106d3565b600560015b01556111c6565b60038910156110d05761109d868363ffffffff61154916565b95506110b089600163ffffffff61153716565b90506110c384600583600281106106d357fe5b6005826002811061107d57fe5b600b891015611152576110f182600c60006003600181548110151561077357fe5b600c60006003600181548110151561110557fe5b60009182526020808320600b600c909302019190910154600160a060020a0316835282019290925260400190205561113c89611b88565b61114984600560006106d3565b6005600061107d565b61116a82600c60006003600281548110151561077357fe5b600c60006003600281548110151561117e57fe5b60009182526020808320600b600c909302019190910154600160a060020a031683528201929092526040019020556111b589611b88565b6111c284600560016106d3565b6006555b6111de83600c60006003600081548110151561077357fe5b600c6000600360008154811015156111f257fe5b60009182526020808320600b600c909302019190910154600160a060020a0316835282019290925260400190205561122987611c04565b8855600b88015461124390600160a060020a031687611895565b600b88018054600160a060020a03191633600160a060020a03161790556000851115611273576112733386611895565b7f31b0c37055c09a82147f98b0fb00974d36a4de6c5b6f0107567736e312a57f7e8933898b600001548c600601548d60020154604051958652600160a060020a0390941660208601526040808601939093526060850191909152608084015260a083019190915260c0909101905180910390a1505050505050505050565b60095460ff1681565b6005816002811061041f57fe5b600160a060020a0333166000908152600b602052604081205490811161132c57600080fd5b600160a060020a0333166000818152600b60205260408082209190915582156108fc0290839051600060405180830381858888f19350505050151561137057600080fd5b50565b60095460009060ff161561138657600080fd5b60005433600160a060020a03908116911614806113b1575060015433600160a060020a039081169116145b15156113bc57600080fd5b506000600781905560085560015b60138110156114205760038054829081106113e157fe5b90600052602060002090600c020160030154420160038281548110151561140457fe5b600091825260209091206002600c9092020101556001016113ca565b6009805460ff19166001179055620151804201600a557f762f260439bb4be3ef6e4dc2786e2e7bd187d3d80b79057d7a424fe98563e33560405160405180910390a150565b600a5481565b60005433600160a060020a0390811691161461148657600080fd5b60005460a060020a900460ff16151561149e57600080fd5b80600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f19350505050151561137057600080fd5b6608e1bc9bf0400081565b600254600160a060020a031681565b6000828202831580611511575082848281151561150e57fe5b04145b151561151957fe5b9392505050565b600080828481151561152e57fe5b04949350505050565b60008282111561154357fe5b50900390565b60008282018381101561151957fe5b600060038281548110151561156957fe5b90600052602060002090600c020190506115948160080154826006015461153790919063ffffffff16565b6006820181905560058201549010156115b257600581015460068201555b5050565b60006003828154811015156115c757fe5b90600052602060002090600c02019050670a688906bd8b0000816000015410151561160d5780546116069060649061065390601463ffffffff6114f516565b81556115b2565b80546116279060649061065390600a63ffffffff6114f516565b8082556608e1bc9bf040009010156115b2576608e1bc9bf04000905550565b61167f61165a82600263ffffffff61152016565b60008054600160a060020a03168152600b60205260409020549063ffffffff61154916565b60008054600160a060020a03168152600b60205260409020556116d36116ac82600463ffffffff61152016565b600154600160a060020a03166000908152600b60205260409020549063ffffffff61154916565b600154600160a060020a03166000908152600b602052604090205561172961170282600463ffffffff61152016565b600254600160a060020a03166000908152600b60205260409020549063ffffffff61154916565b600254600160a060020a03166000908152600b602052604090205550565b60008060008060008615611766576001945060039350600b9250611773565b60029450600b9350601392505b6117ac6004546106538860038981548110151561178c57fe5b90600052602060002090600c0201600101546114f590919063ffffffff16565b91506117c582600c600060038981548110151561077357fe5b600c60006003888154811015156117d857fe5b60009182526020808320600b600c909302019190910154600160a060020a0316835282019290925260400190205550825b8281101561188c5761182a6004546106538860038581548110151561178c57fe5b915061184382600c600060038581548110151561077357fe5b600c600060038481548110151561185657fe5b60009182526020808320600b600c909302019190910154600160a060020a03168352820192909252604001902055600101611809565b50505050505050565b600160a060020a03821681156108fc0282604051600060405180830381858888f1935050505015156115b257600160a060020a0382166000908152600c60205260409020546118ea908263ffffffff61154916565b600160a060020a0383166000908152600c60205260409020555050565b600080662386f26fc100006003600081548110151561192257fe5b60009182526020909120600c9091020155600380546611c37937e080009190600190811061194c57fe5b60009182526020909120600c9091020155600380546611c37937e080009190600290811061197657fe5b600091825260208220600c909102019190915591505b6003821015611a135760038054839081106119a357fe5b60009182526020909120600b600c90920201015460038054600160a060020a0390921691849081106119d157fe5b90600052602060002090600c0201600a0160006101000a815481600160a060020a030219169083600160a060020a03160217905550818060010192505061198c565b600391505b60138210156115b2576003805483908110611a2f57fe5b600091825260209091206608e1bc9bf04000600c9092020190815560058101546006820155600b810154600a82018054600160a060020a031916600160a060020a03909216919091179055600192909201919050611a18565b8060008080808080611aa0898863ffffffff61153716565b9550611ab386601463ffffffff61152016565b9150611ac5868363ffffffff61153716565b9550611add60646106538a600363ffffffff6114f516565b9050611aef878263ffffffff61153716565b9650611afa81611646565b611b0b88606463ffffffff61152016565b9250611b2183610971898263ffffffff61153716565b9650611b3960646106538a600263ffffffff6114f516565b9350611b4b878563ffffffff61153716565b9650611b5688611c74565b9450611b68878663ffffffff61153716565b9650611b7a858363ffffffff61154916565b945050509295509295909350565b6000600382815481101515611b9957fe5b90600052602060002090600c02019050611bc48160070154826006015461154990919063ffffffff16565b600682018190556009820154901115611be257600981015460068201555b60048101546002820154611bfb9163ffffffff61153716565b60029091015550565b60006703782dace9d90000821015611c3357611c2c600261065384600363ffffffff6114f516565b9050611c6f565b670de0b6b3a7640000821015611c5957611c2c600a61065384600e63ffffffff6114f516565b611c2c600a61065384600d63ffffffff6114f516565b919050565b60006703782dace9d90000821015611c9c57611c2c606461065384600d63ffffffff6114f516565b670de0b6b3a7640000821015611cc257611c2c606461065384600c63ffffffff6114f516565b611cd8606461065384600b63ffffffff6114f516565b92915050565b6000611ce8612199565b611cf061220d565b611cf861220d565b611d0061220d565b611d0861220d565b611d1061220d565b611d1861220d565b60008098505b6003891015611e8657610180604051908101604052806611c37937e0800081526020016109608152602001600081526020016201194081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600160a060020a031681526020016000600160a060020a0316815250975060038054806001018281611db79190612235565b600092835260209092208a91600c0201815181556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801556101208201518160090155610140820151600a82018054600160a060020a031916600160a060020a0392909216919091179055610160820151600b919091018054600160a060020a031916600160a060020a03909216919091179055505060019890980197611d1e565b662386f26fc1000060036000815481101515611e9e57fe5b60009182526020909120600c90910201556080604051908101604090815261019082526102bc602083015261044c818301526106406060830152909750608090519081016040908152611c20825261384060208301526170808183015261e100606083015290965060809051908101604090815261021c8252610384602083015261061881830152610a8c6060830152909550608090519081016040908152601982526032602083015260648183015260af60608301529094506080905190810160409081526096825261012c6020830152610258818301526103e8606083015290935060809051908101604090815261032082526105dc6020830152610bb89082015261138860608201526000995091505b600489101561218e575060005b6004811015612183576101806040519081016040526608e1bc9bf04000815260208101888360048110611fed57fe5b602002015161ffff1681526000602082015260400187836004811061200e57fe5b602002015161ffff16815260200186836004811061202857fe5b602002015161ffff1681526064600184010260208201819052604082015260600185836004811061205557fe5b602002015160ff16815260200184836004811061206e57fe5b602002015161ffff16815260200183836004811061208857fe5b602002015161ffff1681526000602082018190526040909101526003805491995090600181016120b88382612235565b600092835260209092208a91600c0201815181556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801556101208201518160090155610140820151600a82018054600160a060020a031916600160a060020a0392909216919091179055610160820151600b919091018054600160a060020a031916600160a060020a039092169190911790555050600101611fbe565b600190980197611fb1565b505050505050505050565b61018060405190810160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600160a060020a031681526020016000600160a060020a031681525090565b60806040519081016040526004815b60008152600019909101906020018161221c5790505090565b815481835581811511610ef357600083815260209020610ef3916122d591600c9182028101918502015b808211156122d157600080825560018201819055600282018190556003820181905560048201819055600582018190556006820181905560078201819055600882018190556009820155600a81018054600160a060020a0319908116909155600b820180549091169055600c0161225f565b5090565b905600a165627a7a723058202c7336572c7e8c2bc850adaa4f892121789e74630b487d53a609af3fc736d6b0002900000000000000000000000096c3170d0981b7321c618ff35aade41dffedaac90000000000000000000000000a8831f8dc2d96501571fa25b8ce32c673639123

Deployed Bytecode

0x60606040526004361061013d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166307374c29811461014257806324600fc31461016a5780633f4ba83a1461017f5780635c975abb146101925780635d161c3f146101b95780636cbc2ded146101cf57806371ee329f146101e257806373e945f6146101f85780638387c6e1146102175780638456cb591461023657806388301f57146102495780638da5cb5b14610278578063918f86741461028b578063a25601051461029e578063a340295a14610324578063a48296d914610360578063a71962c21461036b578063a8423c081461037e578063ad606c7214610394578063d65ab5f2146103a7578063da5f3ac1146103ba578063eb2c0223146103cd578063f86325ed146103ec578063f892ee05146103ff575b600080fd5b341561014d57600080fd5b610158600435610412565b60405190815260200160405180910390f35b341561017557600080fd5b61017d610426565b005b341561018a57600080fd5b61017d6104cf565b341561019d57600080fd5b6101a561054e565b604051901515815260200160405180910390f35b34156101c457600080fd5b61017d60043561055e565b34156101da57600080fd5b61017d6108e8565b34156101ed57600080fd5b61017d600435610ab0565b341561020357600080fd5b610158600160a060020a0360043516610cb5565b341561022257600080fd5b610158600160a060020a0360043516610cc7565b341561024157600080fd5b61017d610cd9565b341561025457600080fd5b61025c610d5d565b604051600160a060020a03909116815260200160405180910390f35b341561028357600080fd5b61025c610d6c565b341561029657600080fd5b610158610d7b565b34156102a957600080fd5b6102b4600435610d81565b6040519b8c5260208c019a909a526040808c019990995260608b019790975260808a019590955260a089019390935260c088019190915260e0870152610100860152610120850152600160a060020a03908116610140850152909116610160830152610180909101905180910390f35b341561032f57600080fd5b61017d6004610264816013610260604051908101604052919082826102608082843750939550610dfc945050505050565b61017d600435610ef8565b341561037657600080fd5b6101a56112f1565b341561038957600080fd5b6101586004356112fa565b341561039f57600080fd5b61017d611307565b34156103b257600080fd5b61017d611373565b34156103c557600080fd5b610158611465565b34156103d857600080fd5b61017d600160a060020a036004351661146b565b34156103f757600080fd5b6101586114db565b341561040a57600080fd5b61025c6114e6565b6007816002811061041f57fe5b0154905081565b600160a060020a0333166000908152600c602052604081205490811161044b57600080fd5b600160a060020a0333166000818152600c60205260408082209190915582156108fc0290839051600060405180830381858888f19350505050151561048f57600080fd5b7f361d758177a1a273ab3bf5e9ae4cc4f6923af295c0e99ad3d02593c5ab8e62d433604051600160a060020a03909116815260200160405180910390a150565b60005433600160a060020a039081169116146104ea57600080fd5b60005460a060020a900460ff16151561050257600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60005460a060020a900460ff1681565b60008054819081908190819060a060020a900460ff161561057e57600080fd5b60095460ff16151561058f57600080fd5b600a5442111561059e57600080fd5b600286116105ab57600080fd5b601386106105b857600080fd5b60038054879081106105c657fe5b60009182526020909120600b600c909202019081015490955033600160a060020a039081169116146105f757600080fd5b600285015442101561060857600080fd5b6007861015801561061a5750600e8611155b15610680576006546000901161062f57600080fd5b600454600686015461065f919061065390600560015b01549063ffffffff6114f516565b9063ffffffff61152016565b935061067884600560015b01549063ffffffff61153716565b6006556106bd565b6005546000901161069057600080fd5b60045460068601546106aa91906106539060056000610645565b93506106b9846005600061066a565b6005555b600b8610156106e957600192506106e184600760005b01549063ffffffff61154916565b6007556106fe565b600092506106fa84600760016106d3565b6008555b83915061070a86611558565b610713866115b6565b600385015442016002860155600a85018054600160a060020a03191633600160a060020a0316179055610747846032611520565b9050610759828263ffffffff61153716565b91506107ad81600c60006003600081548110151561077357fe5b60009182526020808320600b600c909302019190910154600160a060020a031683528201929092526040019020549063ffffffff61154916565b600c6000600360008154811015156107c157fe5b60009182526020808320600b600c909302019190910154600160a060020a0316835282019290925260400190205561080084606463ffffffff61152016565b9050610812828263ffffffff61153716565b915061081d81611646565b610833606461065386600963ffffffff6114f516565b9050610845828263ffffffff61153716565b91506108518382611747565b61085b3383611895565b845460068601546002870154600a8801547fb5012bca5322f6d77217cb1675c23aa4769fef13554da00a280399ea4cfe1a25938a9387939192909190600160a060020a0316604051958652602086019490945260408086019390935260608501919091526080840152600160a060020a0390911660a083015260c0909101905180910390a1505050505050565b60095460009081908190819060ff16151561090257600080fd5b600a5442101561091157600080fd5b6009805460ff1916905560065461092b90600560006106d3565b9350610943606461065386600f63ffffffff6114f516565b925061095b606461065386604b63ffffffff6114f516565b915061097d82610971868663ffffffff61153716565b9063ffffffff61153716565b935061099783600c60006003600081548110151561077357fe5b600c6000600360008154811015156109ab57fe5b60009182526020808320600c92909202909101600b0154600160a060020a031683528201929092526040019020556008546007541415610a13576109f682600263ffffffff61152016565b9150610a03600183611747565b610a0e600083611747565b610a5d565b610a2482600363ffffffff61152016565b600854600754919250610a38911182611747565b610a48828263ffffffff61153716565b600854600754919350610a5d91111583611747565b610a6e84600263ffffffff61152016565b6005819055600655610a7e611907565b7f1084d47e99647565312e58bba004b0fc3088c683fa22f3925f1cf5fb0955402960405160405180910390a150505050565b6000805481908190819060a060020a900460ff1615610ace57600080fd5b60095460ff161515610adf57600080fd5b600a54421115610aee57600080fd5b600085118015610afe5750600385105b1515610b0957600080fd5b6003805486908110610b1757fe5b60009182526020909120600b600c909202019081015490945033600160a060020a03908116911614610b4857600080fd5b6002840154421015610b5957600080fd5b8460011415610b6f5760039250600b9150610b78565b600b9250601391505b50815b81811015610c7157610bbb600261065360038085815481101515610b9b57fe5b90600052602060002090600c0201600601546114f590919063ffffffff16565b6003805483908110610bc957fe5b600091825260209091206006600c9092020101556003805482908110610beb57fe5b90600052602060002090600c020160090154600382815481101515610c0c57fe5b90600052602060002090600c0201600601541115610c69576003805482908110610c3257fe5b90600052602060002090600c020160090154600382815481101515610c5357fe5b90600052602060002090600c0201600601819055505b600101610b7b565b600a80540160028501557febb24605ed23cfc6f6f793e969b97a4d4fca76b1a8096cd1c2e9324a8b8c1afc8560405190815260200160405180910390a15050505050565b600b6020526000908152604090205481565b600c6020526000908152604090205481565b60005433600160a060020a03908116911614610cf457600080fd5b60005460a060020a900460ff1615610d0b57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600154600160a060020a031681565b600054600160a060020a031681565b60045481565b6003805482908110610d8f57fe5b60009182526020909120600c9091020180546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a8b0154600b909b0154999b5097999698959794969395929491939092600160a060020a0391821691168c565b60008054819033600160a060020a03908116911614610e1a57600080fd5b600380546000919082908110610e2c57fe5b60009182526020909120600a600c909202010154600160a060020a031614610e5357600080fd5b600091505b6013821015610ef3576003805483908110610e6f57fe5b90600052602060002090600c020190508282601381101515610e8d57fe5b6020020151600a82018054600160a060020a031916600160a060020a0392909216919091179055828260138110610ec057fe5b6020020151600b82018054600160a060020a031916600160a060020a039290921691909117905560019190910190610e58565b505050565b600080600080600080600080600060149054906101000a900460ff16151515610f2057600080fd5b60095460ff161515610f3157600080fd5b600a54421115610f4057600080fd5b60138910610f4d57600080fd5b600380548a908110610f5b57fe5b60009182526020909120600c909102018054600b8201549199509750600160a060020a03161515610f8b57600080fd5b8754341015610f9957600080fd5b600b88015433600160a060020a0390811691161415610fb757600080fd5b610fc13488611a88565b600a8d0154600160a060020a03166000908152600c6020526040902054949a5092985090965094509250610ffb908363ffffffff61154916565b600a890154600160a060020a03166000908152600c60205260409020558815156110845761103f82611033888663ffffffff61154916565b9063ffffffff61154916565b95506000925061105684600263ffffffff61152016565b935061106584600560006106d3565b60056000015561107884600560016106d3565b600560015b01556111c6565b60038910156110d05761109d868363ffffffff61154916565b95506110b089600163ffffffff61153716565b90506110c384600583600281106106d357fe5b6005826002811061107d57fe5b600b891015611152576110f182600c60006003600181548110151561077357fe5b600c60006003600181548110151561110557fe5b60009182526020808320600b600c909302019190910154600160a060020a0316835282019290925260400190205561113c89611b88565b61114984600560006106d3565b6005600061107d565b61116a82600c60006003600281548110151561077357fe5b600c60006003600281548110151561117e57fe5b60009182526020808320600b600c909302019190910154600160a060020a031683528201929092526040019020556111b589611b88565b6111c284600560016106d3565b6006555b6111de83600c60006003600081548110151561077357fe5b600c6000600360008154811015156111f257fe5b60009182526020808320600b600c909302019190910154600160a060020a0316835282019290925260400190205561122987611c04565b8855600b88015461124390600160a060020a031687611895565b600b88018054600160a060020a03191633600160a060020a03161790556000851115611273576112733386611895565b7f31b0c37055c09a82147f98b0fb00974d36a4de6c5b6f0107567736e312a57f7e8933898b600001548c600601548d60020154604051958652600160a060020a0390941660208601526040808601939093526060850191909152608084015260a083019190915260c0909101905180910390a1505050505050505050565b60095460ff1681565b6005816002811061041f57fe5b600160a060020a0333166000908152600b602052604081205490811161132c57600080fd5b600160a060020a0333166000818152600b60205260408082209190915582156108fc0290839051600060405180830381858888f19350505050151561137057600080fd5b50565b60095460009060ff161561138657600080fd5b60005433600160a060020a03908116911614806113b1575060015433600160a060020a039081169116145b15156113bc57600080fd5b506000600781905560085560015b60138110156114205760038054829081106113e157fe5b90600052602060002090600c020160030154420160038281548110151561140457fe5b600091825260209091206002600c9092020101556001016113ca565b6009805460ff19166001179055620151804201600a557f762f260439bb4be3ef6e4dc2786e2e7bd187d3d80b79057d7a424fe98563e33560405160405180910390a150565b600a5481565b60005433600160a060020a0390811691161461148657600080fd5b60005460a060020a900460ff16151561149e57600080fd5b80600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f19350505050151561137057600080fd5b6608e1bc9bf0400081565b600254600160a060020a031681565b6000828202831580611511575082848281151561150e57fe5b04145b151561151957fe5b9392505050565b600080828481151561152e57fe5b04949350505050565b60008282111561154357fe5b50900390565b60008282018381101561151957fe5b600060038281548110151561156957fe5b90600052602060002090600c020190506115948160080154826006015461153790919063ffffffff16565b6006820181905560058201549010156115b257600581015460068201555b5050565b60006003828154811015156115c757fe5b90600052602060002090600c02019050670a688906bd8b0000816000015410151561160d5780546116069060649061065390601463ffffffff6114f516565b81556115b2565b80546116279060649061065390600a63ffffffff6114f516565b8082556608e1bc9bf040009010156115b2576608e1bc9bf04000905550565b61167f61165a82600263ffffffff61152016565b60008054600160a060020a03168152600b60205260409020549063ffffffff61154916565b60008054600160a060020a03168152600b60205260409020556116d36116ac82600463ffffffff61152016565b600154600160a060020a03166000908152600b60205260409020549063ffffffff61154916565b600154600160a060020a03166000908152600b602052604090205561172961170282600463ffffffff61152016565b600254600160a060020a03166000908152600b60205260409020549063ffffffff61154916565b600254600160a060020a03166000908152600b602052604090205550565b60008060008060008615611766576001945060039350600b9250611773565b60029450600b9350601392505b6117ac6004546106538860038981548110151561178c57fe5b90600052602060002090600c0201600101546114f590919063ffffffff16565b91506117c582600c600060038981548110151561077357fe5b600c60006003888154811015156117d857fe5b60009182526020808320600b600c909302019190910154600160a060020a0316835282019290925260400190205550825b8281101561188c5761182a6004546106538860038581548110151561178c57fe5b915061184382600c600060038581548110151561077357fe5b600c600060038481548110151561185657fe5b60009182526020808320600b600c909302019190910154600160a060020a03168352820192909252604001902055600101611809565b50505050505050565b600160a060020a03821681156108fc0282604051600060405180830381858888f1935050505015156115b257600160a060020a0382166000908152600c60205260409020546118ea908263ffffffff61154916565b600160a060020a0383166000908152600c60205260409020555050565b600080662386f26fc100006003600081548110151561192257fe5b60009182526020909120600c9091020155600380546611c37937e080009190600190811061194c57fe5b60009182526020909120600c9091020155600380546611c37937e080009190600290811061197657fe5b600091825260208220600c909102019190915591505b6003821015611a135760038054839081106119a357fe5b60009182526020909120600b600c90920201015460038054600160a060020a0390921691849081106119d157fe5b90600052602060002090600c0201600a0160006101000a815481600160a060020a030219169083600160a060020a03160217905550818060010192505061198c565b600391505b60138210156115b2576003805483908110611a2f57fe5b600091825260209091206608e1bc9bf04000600c9092020190815560058101546006820155600b810154600a82018054600160a060020a031916600160a060020a03909216919091179055600192909201919050611a18565b8060008080808080611aa0898863ffffffff61153716565b9550611ab386601463ffffffff61152016565b9150611ac5868363ffffffff61153716565b9550611add60646106538a600363ffffffff6114f516565b9050611aef878263ffffffff61153716565b9650611afa81611646565b611b0b88606463ffffffff61152016565b9250611b2183610971898263ffffffff61153716565b9650611b3960646106538a600263ffffffff6114f516565b9350611b4b878563ffffffff61153716565b9650611b5688611c74565b9450611b68878663ffffffff61153716565b9650611b7a858363ffffffff61154916565b945050509295509295909350565b6000600382815481101515611b9957fe5b90600052602060002090600c02019050611bc48160070154826006015461154990919063ffffffff16565b600682018190556009820154901115611be257600981015460068201555b60048101546002820154611bfb9163ffffffff61153716565b60029091015550565b60006703782dace9d90000821015611c3357611c2c600261065384600363ffffffff6114f516565b9050611c6f565b670de0b6b3a7640000821015611c5957611c2c600a61065384600e63ffffffff6114f516565b611c2c600a61065384600d63ffffffff6114f516565b919050565b60006703782dace9d90000821015611c9c57611c2c606461065384600d63ffffffff6114f516565b670de0b6b3a7640000821015611cc257611c2c606461065384600c63ffffffff6114f516565b611cd8606461065384600b63ffffffff6114f516565b92915050565b6000611ce8612199565b611cf061220d565b611cf861220d565b611d0061220d565b611d0861220d565b611d1061220d565b611d1861220d565b60008098505b6003891015611e8657610180604051908101604052806611c37937e0800081526020016109608152602001600081526020016201194081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600160a060020a031681526020016000600160a060020a0316815250975060038054806001018281611db79190612235565b600092835260209092208a91600c0201815181556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801556101208201518160090155610140820151600a82018054600160a060020a031916600160a060020a0392909216919091179055610160820151600b919091018054600160a060020a031916600160a060020a03909216919091179055505060019890980197611d1e565b662386f26fc1000060036000815481101515611e9e57fe5b60009182526020909120600c90910201556080604051908101604090815261019082526102bc602083015261044c818301526106406060830152909750608090519081016040908152611c20825261384060208301526170808183015261e100606083015290965060809051908101604090815261021c8252610384602083015261061881830152610a8c6060830152909550608090519081016040908152601982526032602083015260648183015260af60608301529094506080905190810160409081526096825261012c6020830152610258818301526103e8606083015290935060809051908101604090815261032082526105dc6020830152610bb89082015261138860608201526000995091505b600489101561218e575060005b6004811015612183576101806040519081016040526608e1bc9bf04000815260208101888360048110611fed57fe5b602002015161ffff1681526000602082015260400187836004811061200e57fe5b602002015161ffff16815260200186836004811061202857fe5b602002015161ffff1681526064600184010260208201819052604082015260600185836004811061205557fe5b602002015160ff16815260200184836004811061206e57fe5b602002015161ffff16815260200183836004811061208857fe5b602002015161ffff1681526000602082018190526040909101526003805491995090600181016120b88382612235565b600092835260209092208a91600c0201815181556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801556101208201518160090155610140820151600a82018054600160a060020a031916600160a060020a0392909216919091179055610160820151600b919091018054600160a060020a031916600160a060020a039092169190911790555050600101611fbe565b600190980197611fb1565b505050505050505050565b61018060405190810160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600160a060020a031681526020016000600160a060020a031681525090565b60806040519081016040526004815b60008152600019909101906020018161221c5790505090565b815481835581811511610ef357600083815260209020610ef3916122d591600c9182028101918502015b808211156122d157600080825560018201819055600282018190556003820181905560048201819055600582018190556006820181905560078201819055600882018190556009820155600a81018054600160a060020a0319908116909155600b820180549091169055600c0161225f565b5090565b905600a165627a7a723058202c7336572c7e8c2bc850adaa4f892121789e74630b487d53a609af3fc736d6b00029

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

00000000000000000000000096c3170d0981b7321c618ff35aade41dffedaac90000000000000000000000000a8831f8dc2d96501571fa25b8ce32c673639123

-----Decoded View---------------
Arg [0] : _subDevOne (address): 0x96C3170D0981b7321c618Ff35AaDE41DfFEDAAC9
Arg [1] : _subDevTwo (address): 0x0A8831f8dC2D96501571fa25b8CE32c673639123

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000096c3170d0981b7321c618ff35aade41dffedaac9
Arg [1] : 0000000000000000000000000a8831f8dc2d96501571fa25b8ce32c673639123


Swarm Source

bzzr://2c7336572c7e8c2bc850adaa4f892121789e74630b487d53a609af3fc736d6b0

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.