Contract 0x9106708eB08A6fca144BCb45F8bcD020F903C0f5

 

Contract Overview

CryptoFightersBattleCore
Balance:
0 Ether

EtherValue:
$0.00

Token:
 
Txn Hash
Method
Block
From
To
Value
0xecfa325f5df87afe676a680de6f49ffb2ed667b62571d5c784a7d2f1f4e4321bPause130043192021-08-11 14:00:59370 days 5 hrs agoCryptoFighters: Deployer IN  CryptoFightersBattleCore0 Ether0.‍0019227768.‍66556945
0xe7965d1b7da5dac190d22013652443d52e9ff83ab578fec0a496ebf4755c502bBattle129902752021-08-09 10:10:30372 days 9 hrs ago0x22204f13489b373cc0a591d5639e30fde2a44ae9 IN  CryptoFightersBattleCore0 Ether0.‍0128618133.‍39836818
0x4bfff61200eb6c43ba5a10430abe5cd7b1f8aa8a81199b01714ac7616a35dab1Battle129901262021-08-09 9:36:26372 days 10 hrs ago0x22204f13489b373cc0a591d5639e30fde2a44ae9 IN  CryptoFightersBattleCore0 Ether0.‍0166338342.‍4945982
0x2611eb46b83a800eeddc43ab7812520b19b0642f7df75cc9bec7b6936f94a1f3Create Team129899052021-08-09 8:46:33372 days 11 hrs ago0x22204f13489b373cc0a591d5639e30fde2a44ae9 IN  CryptoFightersBattleCore0 Ether0.‍008715934.‍02180327
0x347a0241c779c945319b164fc808bd99ca1c404e5c457d1db924d7dc1e1c24efCreate Team129405342021-08-01 15:55:41380 days 3 hrs ago0x9877534fb2fb9dc23c8867718bf954fa721215b5 IN  CryptoFightersBattleCore0 Ether0.‍0051740135
0x099fd0a0431a28c4607c5d888069afc6fd76dec6589320476ae71c0f38baf057Battle129218692021-07-29 16:51:54383 days 2 hrs ago0x170d0aef651aab65d3a9a8ece2447472dad84b77 IN  CryptoFightersBattleCore0 Ether0.‍010018435
0x835cb041d2db73e2e1b92d7eb4dc256f66434e7dac5504432992b4ab461e4cddCreate Team129193142021-07-29 7:10:44383 days 12 hrs ago0x170d0aef651aab65d3a9a8ece2447472dad84b77 IN  CryptoFightersBattleCore0 Ether0.‍0032522322
0xacb4de7eb05f10a7bde4334e1d4ae2a09475608b890275e3572d989457f5abacCreate Team128245302021-07-14 10:12:49398 days 9 hrs ago0x63671ff45823b9f49523150914abbe058a40abde IN  CryptoFightersBattleCore0 Ether0.‍001066128.‍00000145
0x96e8ebfcb5d310f2e62d604a0b11b6386c59a10a08482a0d15bd01a9e19e6289Create Team128245302021-07-14 10:12:49398 days 9 hrs ago0x63671ff45823b9f49523150914abbe058a40abde IN  CryptoFightersBattleCore0 Ether0.‍008279324
0x4d13638267e08ff0d48884b34e77b68c9e990b9f99d08d2fdacc05ed799e8f63Create Team128176552021-07-13 8:13:35399 days 11 hrs ago0xc7f30a12fd907fecd4121d03f32ef2091288b1a8 IN  CryptoFightersBattleCore0 Ether0.‍0038435526.‍00000145
0x85c19b49430ce9bea3222fa30ff4c798841bb7d05fb5d466b1a73b5203991739Create Team127524502021-07-03 4:12:00409 days 15 hrs ago0xac8e78d3afdf931514df9addb7357771a1b0c862 IN  CryptoFightersBattleCore0 Ether0.‍00169736.‍9
0xededbbc32b1442a0d5443c95667d6b252b9f278cbffe64c9ad49a46e056c4c01Create Team127399732021-07-01 5:44:13411 days 14 hrs ago0xb1b5fe66152882dfcceb8662a2da879dd1e852b0 IN  CryptoFightersBattleCore0 Ether0.‍001411769.‍55000167
0x807ffff4d447755389e0a230482c5dee32cd461a98f8fdb3f5608cb9c2f24b88Create Team127334912021-06-30 5:25:41412 days 14 hrs ago0xbc26d2878fc44eb74501b88de803ff130852111b IN  CryptoFightersBattleCore0 Ether0.‍0004493112
0xf07dd539adff41fa06c84c7c4dca4095de7238d083ab5db9ad2da3796224a3d7Create Team127334792021-06-30 5:22:49412 days 14 hrs ago0xbc26d2878fc44eb74501b88de803ff130852111b IN  CryptoFightersBattleCore0 Ether0.‍0016261111
0xc6ac68592620d7988239ec3c8dea27b8251e78ae4ef612004bc12349f26be0ceBattle127334752021-06-30 5:21:39412 days 14 hrs ago0xbc26d2878fc44eb74501b88de803ff130852111b IN  CryptoFightersBattleCore0 Ether0.‍0031519511
0xdf1c956d0903cf2480e33c80d70b3cb1c23145cb592d73b83c99654fc5e9b20fCreate Team126314022021-06-14 8:08:11428 days 11 hrs ago0x42153f76aeb9586d7e22a7cef6cc83e5ee3af265 IN  CryptoFightersBattleCore0 Ether0.‍0021648411
0x98119cd49e43d58eab68e220e7a32c8242972d1fac64675c09afd00a5168a101Delete Team124437412021-05-16 5:46:20457 days 14 hrs ago0xeb9a42ce1e7026c7886b9db6316044b847a50a0c IN  CryptoFightersBattleCore0 Ether0.‍0017593842
0xf0a75d510790e30ab691ba07fb73b24d44bd8316e4d9e39c6ba297de765f5c71Create Team122034912021-04-09 4:29:40494 days 15 hrs ago0xeb9a42ce1e7026c7886b9db6316044b847a50a0c IN  CryptoFightersBattleCore0 Ether0.‍0130875294
0x1433affde6154ccea6f95a545b45ecc1f752c55c417e9819582a9786ac72f462Create Team120791552021-03-21 1:09:32513 days 18 hrs ago0xb1752b55332e00f5a52ee3f85a075285ca59b40e IN  CryptoFightersBattleCore0 Ether0.‍0130875294
0x55338a4d3e7f2a92c677a44ec732c1279f7bd6c4c9096e56e552be2e8e1b2de3Delete Team120743192021-03-20 7:18:41514 days 12 hrs ago0x694e64d4ad77e0c234b7b1c55ac40302ad86ce3f IN  CryptoFightersBattleCore0 Ether0.‍00682973101.‍5
0xfb93ee12d967fed2c0277ac34e4adde45ed1c8d66fcdb76ec1912b2b0d2be09fCreate Team120729662021-03-20 2:27:38514 days 17 hrs ago0x694e64d4ad77e0c234b7b1c55ac40302ad86ce3f IN  CryptoFightersBattleCore0 Ether0.‍0403212124.‍00000145
0xd5fa506fa33ade13dd96227c0b2d56b23a78c3324b277b07fc8ce5cab064beb6Battle120494392021-03-16 11:47:35518 days 8 hrs ago0xe2b2a924ed2c7835c14cadb026a5fe4fd4f1e4be IN  CryptoFightersBattleCore0 Ether0.‍11023952134
0x38cd587d87a2ef27eae81ab22b9be2ff110512e7c6510ec95b114f5e0f9a4042Battle120473672021-03-16 3:53:55518 days 15 hrs ago0xe2b2a924ed2c7835c14cadb026a5fe4fd4f1e4be IN  CryptoFightersBattleCore0 Ether0.‍12062563149.‍00000145
0xe2936b3368673ccb6569433afdcfb17fcac3559294feb37f24105ce818d48327Battle120473542021-03-16 3:51:20518 days 15 hrs ago0xe2b2a924ed2c7835c14cadb026a5fe4fd4f1e4be IN  CryptoFightersBattleCore0 Ether0.‍15052799149.‍00000145
0xdcccf9b271c7fd7348816542757df3793fa203c6b12afced466c5a8984e1ab86Battle120442272021-03-15 16:28:12519 days 3 hrs ago0xe2b2a924ed2c7835c14cadb026a5fe4fd4f1e4be IN  CryptoFightersBattleCore0 Ether0.‍15777768198
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BattleCore

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-02-20
*/

pragma solidity ^0.4.19;

// File: contracts/ERC721Draft.sol

/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
contract ERC721 {
    function implementsERC721() public pure returns (bool);
    function totalSupply() public view returns (uint256 total);
    function balanceOf(address _owner) public view returns (uint256 balance);
    function ownerOf(uint256 _tokenId) public view returns (address owner);
    function approve(address _to, uint256 _tokenId) public;
    function transferFrom(address _from, address _to, uint256 _tokenId) public;
    function transfer(address _to, uint256 _tokenId) public;
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    // Optional
    // function name() public view returns (string name);
    // function symbol() public view returns (string symbol);
    // function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
    // function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}

// File: contracts/FighterCoreInterface.sol

contract FighterCoreInterface is ERC721 {
    function getFighter(uint256 _id)
        public
        view
        returns (
        uint256 prizeCooldownEndTime,
        uint256 battleCooldownEndTime,
        uint256 prizeCooldownIndex,
        uint256 battlesFought,
        uint256 battlesWon,
        uint256 generation,
        uint256 genes,
        uint256 dexterity,
        uint256 strength,
        uint256 vitality,
        uint256 luck,
        uint256 experience
    );
    
    function createPrizeFighter(
        uint16 _generation,
        uint256 _genes,
        uint8 _dexterity,
        uint8 _strength,
        uint8 _vitality,
        uint8 _luck,
        address _owner
    ) public;
    
    function updateFighter(
        uint256 _fighterId,
        uint8 _dexterity,
        uint8 _strength,
        uint8 _vitality,
        uint8 _luck,
        uint32 _experience,
        uint64 _prizeCooldownEndTime,
        uint16 _prizeCooldownIndex,
        uint64 _battleCooldownEndTime,
        uint16 _battlesFought,
        uint16 _battlesWon
    ) public;

    function updateFighterBattleStats(
        uint256 _fighterId,
        uint64 _prizeCooldownEndTime,
        uint16 _prizeCooldownIndex,
        uint64 _battleCooldownEndTime,
        uint16 _battlesFought,
        uint16 _battlesWon
    ) public;

    function updateDexterity(uint256 _fighterId, uint8 _dexterity) public;
    function updateStrength(uint256 _fighterId, uint8 _strength) public;
    function updateVitality(uint256 _fighterId, uint8 _vitality) public;
    function updateLuck(uint256 _fighterId, uint8 _luck) public;
    function updateExperience(uint256 _fighterId, uint32 _experience) public;
}

// File: contracts/Battle/BattleDeciderInterface.sol

contract BattleDeciderInterface {
    function isBattleDecider() public pure returns (bool);
    function determineWinner(uint256[7][] teamAttacker, uint256[7][] teamDefender) public returns (
        bool attackerWon,
        uint256 xpForAttacker,
        uint256 xpForDefender
    );
}

// File: contracts/Ownable.sol

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


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  /**
   * @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);
    _;
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

// File: contracts/Pausable.sol

/**
 * @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;
    Pause();
  }

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

// File: contracts/Battle/GeneScienceInterface.sol

/// @title defined the interface that will be referenced in main Fighter contract
contract GeneScienceInterface {
    /// @dev simply a boolean to indicate this is the contract we expect to be
    function isGeneScience() public pure returns (bool);

    /// @dev given genes of fighter 1 & 2, return a genetic combination - may have a random factor
    /// @param genes1 genes of fighter1
    /// @param genes2 genes of fighter1
    /// @return the genes that are supposed to be passed down the new fighter
    function mixGenes(uint256 genes1, uint256 genes2) public returns (uint256);
}

// File: contracts/Battle/BattleBase.sol

contract BattleBase is Ownable, Pausable {
    event TeamCreated(uint256 indexed teamId, uint256[] fighterIds);
    event TeamDeleted(uint256 indexed teamId, uint256[] fighterIds);
    event BattleResult(address indexed winnerAddress, address indexed loserAddress, uint256[] attackerFighterIds, uint256[] defenderFighterIds, bool attackerWon, uint16 prizeFighterGeneration, uint256 prizeFighterGenes, uint32 attackerXpGained, uint32 defenderXpGained);
    
    struct Team {
        address owner;
        uint256[] fighterIds;
    }

    struct RaceBaseStats {
        uint8 strength;
        uint8 dexterity;
        uint8 vitality;
    }
    
    Team[] public teams;
    // index => base stats (where index represents the race)
    RaceBaseStats[] public raceBaseStats;
    
    uint256 internal randomCounter = 0;
    
    FighterCoreInterface public fighterCore;
    GeneScienceInterface public geneScience;
    BattleDeciderInterface public battleDecider;
    
    mapping (uint256 => uint256) public fighterIndexToTeam;
    mapping (uint256 => bool) public teamIndexToExist;
    // an array of deleted teamIds owned by each address so that we can reuse these again
    // mapping (address => uint256[]) public addressToDeletedTeams;
    
    // an array of deleted teams we can reuse later
    uint256[] public deletedTeamIds;
    
    uint256 public maxPerTeam = 5;

    uint8[] public genBaseStats = [
        16, // gen 0
        12, // gen 1
        10, // gen 2
        8, // gen 3
        7, // gen 4
        6, // gen 5
        5, // gen 6
        4, // gen 7
        3, // gen 8
        2, // gen 9
        1 // gen 10+
    ];
    
    // modifier ownsFighters(uint256[] _fighterIds) {
    //     uint len = _fighterIds.length;
    //     for (uint i = 0; i < len; i++) {
    //       require(fighterCore.ownerOf(_fighterIds[i]) == msg.sender);
    //     }
    //     _;
    // }
    
    modifier onlyTeamOwner(uint256 _teamId) {
        require(teams[_teamId].owner == msg.sender);
        _;
    }

    modifier onlyExistingTeam(uint256 _teamId) {
        require(teamIndexToExist[_teamId] == true);
        _;
    }

    function teamExists(uint256 _teamId) public view returns (bool) {
        return teamIndexToExist[_teamId] == true;
    }

    /// @dev random number from 0 to (_modulus - 1)
    function randMod(uint256 _randCounter, uint _modulus) internal view returns (uint256) { 
        return uint(keccak256(now, msg.sender, _randCounter)) % _modulus;
    }

    function getDeletedTeams() public view returns (uint256[]) {
        // return addressToDeletedTeams[_address];
        return deletedTeamIds;
    }

    function getRaceBaseStats(uint256 _id) public view returns (
        uint256 strength,
        uint256 dexterity,
        uint256 vitality
    ) {
        RaceBaseStats storage race = raceBaseStats[_id];
        
        strength = race.strength;
        dexterity = race.dexterity;
        vitality = race.vitality;
    }
}

// File: contracts/Battle/BattleAdmin.sol

contract BattleAdmin is BattleBase {
    event ContractUpgrade(address newContract);

    address public newContractAddress;
    
    // An approximation of currently how many seconds are in between blocks.
    uint256 public secondsPerBlock = 15;

    uint32[7] public prizeCooldowns = [
        uint32(1 minutes),
        uint32(30 minutes),
        uint32(2 hours),
        uint32(6 hours),
        uint32(12 hours),
        uint32(1 days),
        uint32(3 days)
    ];

    function setFighterCoreAddress(address _address) public onlyOwner {
        _setFighterCoreAddress(_address);
    }

    function _setFighterCoreAddress(address _address) internal {
        FighterCoreInterface candidateContract = FighterCoreInterface(_address);

        require(candidateContract.implementsERC721());

        fighterCore = candidateContract;
    }
    
    function setGeneScienceAddress(address _address) public onlyOwner {
        _setGeneScienceAddress(_address);
    }

    function _setGeneScienceAddress(address _address) internal {
        GeneScienceInterface candidateContract = GeneScienceInterface(_address);

        require(candidateContract.isGeneScience());

        geneScience = candidateContract;
    }

    function setBattleDeciderAddress(address _address) public onlyOwner {
        _setBattleDeciderAddress(_address);
    }

    function _setBattleDeciderAddress(address _address) internal {
        BattleDeciderInterface deciderCandidateContract = BattleDeciderInterface(_address);

        require(deciderCandidateContract.isBattleDecider());

        battleDecider = deciderCandidateContract;
    }

    function addRace(uint8 _strength, uint8 _dexterity, uint8 _vitality) public onlyOwner {
        raceBaseStats.push(RaceBaseStats({
            strength: _strength,
            dexterity: _dexterity,
            vitality: _vitality
        }));
    }

    // in case we ever add a bad race type
    function removeLastRace() public onlyOwner {
        // don't allow the first 4 races to be removed
        require(raceBaseStats.length > 4);
        
        delete raceBaseStats[raceBaseStats.length - 1];
    }

    /// @dev Used to mark the smart contract as upgraded, in case there is a serious
    ///  breaking bug. This method does nothing but keep track of the new contract and
    ///  emit a message indicating that the new address is set. It's up to clients of this
    ///  contract to update to the new contract address in that case.
    /// @param _v2Address new address
    function setNewAddress(address _v2Address) public onlyOwner whenPaused {
        newContractAddress = _v2Address;
        
        ContractUpgrade(_v2Address);
    }

    // Owner can fix how many seconds per blocks are currently observed.
    function setSecondsPerBlock(uint256 _secs) external onlyOwner {
        require(_secs < prizeCooldowns[0]);
        secondsPerBlock = _secs;
    }
}

// File: contracts/Battle/BattlePrize.sol

contract BattlePrize is BattleAdmin {
    // array index is level, value is experience to reach that level
    uint32[50] public stats = [
        0,
        100,
        300,
        600,
        1000,
        1500,
        2100,
        2800,
        3600,
        4500,
        5500,
        6600,
        7800,
        9100,
        10500,
        12000,
        13600,
        15300,
        17100,
        19000,
        21000,
        23100,
        25300,
        27600,
        30000,
        32500,
        35100,
        37800,
        40600,
        43500,
        46500,
        49600,
        52800,
        56100,
        59500,
        63000,
        66600,
        70300,
        74100,
        78000,
        82000,
        86100,
        90300,
        94600,
        99000,
        103500,
        108100,
        112800,
        117600,
        122500
    ];

    uint8[11] public extraStatsForGen = [
        16, // 0 - here for ease of use even though we never create gen0s
        12, // 1
        10, // 2
        8, // 3
        7, // 4
        6, // 5
        5, // 6
        4, // 7
        3, // 8
        2, // 9
        1 // 10+
    ];

    // the number of battles before a delay to gain new exp kicks in
    uint8 public battlesTillBattleCooldown = 5;
    // the number of battles before a delay to gain new exp kicks in
    uint32 public experienceDelay = uint32(6 hours);

    // Luck is determined as follows:
    // Rank 0 (5 stars) - random between 4~5
    // Rank 1-2 (4 stars) - random between 2~4
    // Rank 3-8 (3 stars) - random between 2~3
    // Rank 9-15 (2 stars) - random between 1~3
    // Rank 16+ (1 star) - random between 1~2
    function genToLuck(uint256 _gen, uint256 _rand) public pure returns (uint8) {
        if (_gen >= 1 || _gen <= 2) {
            return 2 + uint8(_rand) % 3; // 2 to 4
        } else if (_gen >= 3 || _gen <= 8) {
            return 2 + uint8(_rand) % 2; // 2 to 3
        }  else if (_gen >= 9 || _gen <= 15) {
            return 1 + uint8(_rand) % 3; // 1 to 3
        } else { // 16+
            return 1 + uint8(_rand) % 2; // 1 to 2
        }
    }

    function raceToBaseStats(uint _race) public view returns (
        uint8 strength,
        uint8 dexterity,
        uint8 vitality
    ) {
        // in case we ever have an unknown race due to new races added
        if (_race >= raceBaseStats.length) {
            _race = 0;
        }

        RaceBaseStats memory raceStats = raceBaseStats[_race];

        strength = raceStats.strength;
        dexterity = raceStats.dexterity;
        vitality = raceStats.vitality;
    }

    function genToExtraStats(uint256 _gen, uint256 _rand) public view returns (
        uint8 extraStrength,
        uint8 extraDexterity,
        uint8 extraVitality
    ) {
        // in case we ever have an unknown race due to new races added
        if (_gen >= 10) {
            _gen = 10;
        }

        uint8 extraStats = extraStatsForGen[_gen];

        uint256 rand1 = _rand & 0xff;
        uint256 rand2 = _rand >> 16 & 0xff;
        uint256 rand3 = _rand >> 16 >> 16 & 0xff;

        uint256 sum = rand1 + rand2 + rand3;

        extraStrength = uint8((extraStats * rand1) / sum);
        extraDexterity = uint8((extraStats * rand2) / sum);
        extraVitality = uint8((extraStats * rand3) / sum);

        uint8 remainder = extraStats - (extraStrength + extraDexterity + extraVitality);

        if (rand1 > rand2 && rand1 > rand3) {
            extraStrength += remainder;
        } else if (rand2 > rand3) {
            extraDexterity += remainder;
        } else {
            extraVitality += remainder;
        }
    }

    function _getStrengthDexterityVitality(uint256 _race, uint256 _generation, uint256 _rand) public view returns (
        uint256 strength,
        uint256 dexterity,
        uint256 vitality
    ) {
        uint8 baseStrength;
        uint8 baseDexterity;
        uint8 baseVitality;
        uint8 extraStrength;
        uint8 extraDexterity;
        uint8 extraVitality;

        (baseStrength, baseDexterity, baseVitality) = raceToBaseStats(_race);
        (extraStrength, extraDexterity, extraVitality) = genToExtraStats(_generation, _rand);

        strength = baseStrength + extraStrength;
        dexterity = baseDexterity + extraDexterity;
        vitality = baseVitality + extraVitality;
    }

    // we return an array here, because we had an issue of too many local variables when returning a tuple
    // function _generateFighterStats(uint256 _attackerLeaderId, uint256 _defenderLeaderId) internal returns (uint256[6]) {
    function _generateFighterStats(uint256 generation1, uint256 genes1, uint256 generation2, uint256 genes2) internal returns (uint256[6]) {
        // uint256 generation1;
        // uint256 genes1;
        // uint256 generation2;
        // uint256 genes2;

        uint256 generation256 = ((generation1 + generation2) / 2) + 1;

        // making sure a gen 65536 doesn't turn out as a gen 0 :)
        if (generation256 > 65535)
            generation256 = 65535;
        
        uint16 generation = uint16(generation256);

        uint256 genes = geneScience.mixGenes(genes1, genes2);

        uint256 strength;
        uint256 dexterity;
        uint256 vitality;

        uint256 rand = uint(keccak256(now, msg.sender, randomCounter++));

        (strength, dexterity, vitality) = _getStrengthDexterityVitality(_getRaceFromGenes(genes), generation, rand);

        uint256 luck = genToLuck(genes, rand);

        return [
            generation,
            genes,
            strength,
            dexterity,
            vitality,
            luck
        ];
    }

    // takes in genes and returns raceId
    // race is first loci after version. 
    // [][]...[][race][version] 
    // each loci = 2B, race is also 2B. father's gene is determining the fighter's race
    function _getRaceFromGenes(uint256 _genes) internal pure returns (uint256) {
        return (_genes >> (16)) & 0xff;
    }

    function experienceToLevel(uint256 _experience) public view returns (uint256) {
        for (uint256 i = 0; i < stats.length; i++) {
            if (stats[i] > _experience) {
                // current level is i
                return i;
            }
        }

        return 50;
    }

    // returns a number between 0 and 4 based on which stat to increase
    // 0 - no stat increase
    // 1 - dexterity
    // 2 - strength
    // 3 - vitality
    // 4 - luck
    function _calculateNewStat(uint32 _currentExperience, uint32 _newExperience) internal returns (uint256) {
        // find current level
        for (uint256 i = 0; i < stats.length; i++) {
            if (stats[i] > _currentExperience) {
                // current level is i
                if (stats[i] <= _newExperience) {
                    // level up a random stat
                    return 1 + randMod(randomCounter++, 4);
                } else {
                    return 0;
                }
            }
        }

        // at max level
        return 0;
    }

    // function _getFighterGenAndGenes(uint256 _fighterId) internal view returns (
    //     uint256 generation,
    //     uint256 genes
    // ) {
    //     (,,,,, generation, genes,,,,,) = fighterCore.getFighter(_fighterId);
    // }

    function _getFighterStatsData(uint256 _fighterId) internal view returns (uint256[6]) {
        uint256 dexterity;
        uint256 strength;
        uint256 vitality;
        uint256 luck;
        uint256 experience;
        uint256 battleCooldownEndTime;
        
        (
            ,
            battleCooldownEndTime,
            ,
            ,
            ,
            ,
            ,
            dexterity,
            strength,
            vitality,
            luck,
            experience
        ) = fighterCore.getFighter(_fighterId);

        return [
            dexterity,
            strength,
            vitality,
            luck,
            experience,
            battleCooldownEndTime
        ];
    }

    function _getFighterBattleData(uint256 _fighterId) internal view returns (uint256[7]) {
        uint256 prizeCooldownEndTime;
        uint256 prizeCooldownIndex;
        uint256 battleCooldownEndTime;
        uint256 battlesFought;
        uint256 battlesWon;
        uint256 generation;
        uint256 genes;
        
        (
            prizeCooldownEndTime,
            battleCooldownEndTime,
            prizeCooldownIndex,
            battlesFought,
            battlesWon,
            generation,
            genes,
            ,
            ,
            ,
            ,
        ) = fighterCore.getFighter(_fighterId);

        return [
            prizeCooldownEndTime,
            prizeCooldownIndex,
            battleCooldownEndTime,
            battlesFought,
            battlesWon,
            generation,
            genes
        ];
    }

    function _increaseFighterStats(
        uint256 _fighterId,
        uint32 _experienceGained,
        uint[6] memory data
    ) internal {
        // dont update if on cooldown
        if (data[5] >= block.number) {
            return;
        }

        uint32 experience = uint32(data[4]);
        uint32 newExperience = experience + _experienceGained;
        uint256 _statIncrease = _calculateNewStat(experience, newExperience);
        
        fighterCore.updateExperience(_fighterId, newExperience);

        if (_statIncrease == 1) {
            fighterCore.updateDexterity(_fighterId, uint8(++data[0]));
        } else if (_statIncrease == 2) {
            fighterCore.updateStrength(_fighterId, uint8(++data[1]));
        } else if (_statIncrease == 3) {
            fighterCore.updateVitality(_fighterId, uint8(++data[2]));
        } else if (_statIncrease == 4) {
            fighterCore.updateLuck(_fighterId, uint8(++data[3]));
        }
    }

    function _increaseTeamFighterStats(uint256[] memory _fighterIds, uint32 _experienceGained) private {
        for (uint i = 0; i < _fighterIds.length; i++) {
            _increaseFighterStats(_fighterIds[i], _experienceGained, _getFighterStatsData(_fighterIds[i]));
        }
    }

    function _updateFighterBattleStats(
        uint256 _fighterId,
        bool _winner,
        bool _leader,
        uint[7] memory data,
        bool _skipAwardPrize
    ) internal {
        uint64 prizeCooldownEndTime = uint64(data[0]);
        uint16 prizeCooldownIndex = uint16(data[1]);
        uint64 battleCooldownEndTime = uint64(data[2]);
        uint16 updatedBattlesFought = uint16(data[3]) + 1;

        // trigger prize cooldown
        if (_winner && _leader && !_skipAwardPrize) {
            prizeCooldownEndTime = uint64((prizeCooldowns[prizeCooldownIndex] / secondsPerBlock) + block.number);

            if (prizeCooldownIndex < 6) {
               prizeCooldownIndex += 1;
            }
        }

        if (updatedBattlesFought % battlesTillBattleCooldown == 0) {
            battleCooldownEndTime = uint64((experienceDelay / secondsPerBlock) + block.number);
        }

        fighterCore.updateFighterBattleStats(
            _fighterId,
            prizeCooldownEndTime,
            prizeCooldownIndex,
            battleCooldownEndTime,
            updatedBattlesFought,
            uint16(data[4]) + (_winner ? 1 : 0) // battlesWon
        );
    }

    function _updateTeamBattleStats(uint256[] memory _fighterIds, bool _attackerWin, bool _skipAwardPrize) private {
        for (uint i = 0; i < _fighterIds.length; i++) {
            _updateFighterBattleStats(_fighterIds[i], _attackerWin, i == 0, _getFighterBattleData(_fighterIds[i]), _skipAwardPrize);
        }
    }

    function _awardPrizeFighter(
        address _winner, uint256[7] _attackerLeader, uint256[7] _defenderLeader
    )
        internal
        returns (uint16 prizeGen, uint256 prizeGenes)
    {
        uint256[6] memory newFighterData = _generateFighterStats(_attackerLeader[5], _attackerLeader[6], _defenderLeader[5], _defenderLeader[6]);

        prizeGen = uint16(newFighterData[0]);
        prizeGenes = newFighterData[1];

        fighterCore.createPrizeFighter(
            prizeGen,
            prizeGenes,
            uint8(newFighterData[2]),
            uint8(newFighterData[3]),
            uint8(newFighterData[4]),
            uint8(newFighterData[5]),
            _winner
        );
    }

    function _updateFightersAndAwardPrizes(
        uint256[] _attackerFighterIds,
        uint256[] _defenderFighterIds,
        bool _attackerWin,
        address _winnerAddress,
        uint32 _attackerExperienceGained,
        uint32 _defenderExperienceGained
    )
        internal
        returns (uint16 prizeGen, uint256 prizeGenes)
    {
        // grab prize cooldown info before it gets updated
        uint256[7] memory attackerLeader = _getFighterBattleData(_attackerFighterIds[0]);
        uint256[7] memory defenderLeader = _getFighterBattleData(_defenderFighterIds[0]);

        bool skipAwardPrize = (_attackerWin && attackerLeader[0] >= block.number) || (!_attackerWin && defenderLeader[0] >= block.number);
        
        _increaseTeamFighterStats(_attackerFighterIds, _attackerExperienceGained);
        _increaseTeamFighterStats(_defenderFighterIds, _defenderExperienceGained);
        
        _updateTeamBattleStats(_attackerFighterIds, _attackerWin, skipAwardPrize);
        _updateTeamBattleStats(_defenderFighterIds, !_attackerWin, skipAwardPrize);
        
        // prizes

        // dont award prize if on cooldown
        if (skipAwardPrize) {
            return;
        }

        return _awardPrizeFighter(_winnerAddress, attackerLeader, defenderLeader);
    }
}

// File: contracts/Battle/BattleCore.sol

contract BattleCore is BattlePrize {
    function BattleCore(address _coreAddress, address _geneScienceAddress, address _battleDeciderAddress) public {
        addRace(4, 4, 4); // half elf
        addRace(6, 2, 4); // orc
        addRace(4, 5, 3); // succubbus
        addRace(6, 4, 2); // mage
        addRace(7, 1, 4);

        _setFighterCoreAddress(_coreAddress);
        _setGeneScienceAddress(_geneScienceAddress);
        _setBattleDeciderAddress(_battleDeciderAddress);
        
        // no team 0
        uint256[] memory fighterIds = new uint256[](1);
        fighterIds[0] = uint256(0);
        _createTeam(address(0), fighterIds);
        teamIndexToExist[0] = false;
    }

    /// @dev DON'T give me your money.
    function() external {}
    
    function totalTeams() public view returns (uint256) {
        // team 0 doesn't exist
        return teams.length - 1;
    }
    
    function isValidTeam(uint256[] _fighterIds) public view returns (bool) {
        for (uint i = 0; i < _fighterIds.length; i++) {
            uint256 fighterId = _fighterIds[i];
            if (fighterCore.ownerOf(fighterId) != msg.sender)
                return false;
            if (fighterIndexToTeam[fighterId] > 0)
                return false;

            // check for duplicate fighters
            for (uint j = i + 1; j < _fighterIds.length; j++) {
                if (_fighterIds[i] == _fighterIds[j]) {
                    return false;            
                }
            }
        }
        
        return true;
    }
    
    function createTeam(uint256[] _fighterIds)
        public
        whenNotPaused
        returns(uint256)
    {
        require(_fighterIds.length > 0 && _fighterIds.length <= maxPerTeam);
        
        require(isValidTeam(_fighterIds));

        return _createTeam(msg.sender, _fighterIds);
    }
    
    function _createTeam(address _owner, uint256[] _fighterIds) internal returns(uint256) {
        Team memory _team = Team({
            owner: _owner,
            fighterIds: _fighterIds
        });

        uint256 newTeamId;

        // reuse teamId if address has deleted teams
        if (deletedTeamIds.length > 0) {
            newTeamId = deletedTeamIds[deletedTeamIds.length - 1];
            delete deletedTeamIds[deletedTeamIds.length - 1];
            deletedTeamIds.length--;
            teams[newTeamId] = _team;
        } else {
            newTeamId = teams.push(_team) - 1;
        }

        require(newTeamId <= 4294967295);

        for (uint i = 0; i < _fighterIds.length; i++) {
            uint256 fighterId = _fighterIds[i];

            fighterIndexToTeam[fighterId] = newTeamId;
        }

        teamIndexToExist[newTeamId] = true;

        TeamCreated(newTeamId, _fighterIds);

        return newTeamId;
    }

    function deleteTeam(uint256 _teamId)
        public
        whenNotPaused
        onlyTeamOwner(_teamId)
        onlyExistingTeam(_teamId)
    {
        _deleteTeam(_teamId);
    }

    function _deleteTeam(uint256 _teamId) private {
        Team memory team = teams[_teamId];

        for (uint256 i = 0; i < team.fighterIds.length; i++) {
            fighterIndexToTeam[team.fighterIds[i]] = 0;
        }

        TeamDeleted(_teamId, team.fighterIds);

        delete teams[_teamId];

        deletedTeamIds.push(_teamId);
        
        teamIndexToExist[_teamId] = false;
    }

    function battle(uint256[] _attackerFighterIds, uint256 _defenderTeamId)
        public
        whenNotPaused
        onlyExistingTeam(_defenderTeamId)
        returns (bool)
    {
        require(_attackerFighterIds.length > 0 && _attackerFighterIds.length <= maxPerTeam);
        require(isValidTeam(_attackerFighterIds));

        Team memory defenderTeam = teams[_defenderTeamId];

        // check that a user isn't attacking himself
        require(msg.sender != defenderTeam.owner);

        uint256[] memory defenderFighterIds = defenderTeam.fighterIds;
        
        bool attackerWon;
        uint256 xpForAttacker;
        uint256 xpForDefender;

        _deleteTeam(_defenderTeamId);

        (
            attackerWon,
            xpForAttacker,
            xpForDefender
        ) = battleDecider.determineWinner(getFighterArray(_attackerFighterIds), getFighterArray(defenderFighterIds));
        
        address winnerAddress;
        address loserAddress;

        if (attackerWon) {
            winnerAddress = msg.sender;
            loserAddress = defenderTeam.owner;
        } else {
            winnerAddress = defenderTeam.owner;
            loserAddress = msg.sender;
        }
        
        uint16 prizeGen;
        uint256 prizeGenes;
        (prizeGen, prizeGenes) = _updateFightersAndAwardPrizes(_attackerFighterIds, defenderFighterIds, attackerWon, winnerAddress, uint32(xpForAttacker), uint32(xpForDefender));
        
        BattleResult(winnerAddress, loserAddress, _attackerFighterIds, defenderFighterIds, attackerWon, prizeGen, prizeGenes, uint32(xpForAttacker), uint32(xpForDefender));

        return attackerWon;
    }
        
    /// @param _id The ID of the team of interest.
    function getTeam(uint256 _id)
        public
        view
        returns (
        address owner,
        uint256[] fighterIds
    ) {
        Team storage _team = teams[_id];

        owner = _team.owner;
        fighterIds = _team.fighterIds;
    }

    function getFighterArray(uint256[] _fighterIds) public view returns (uint256[7][]) {
        uint256[7][] memory res = new uint256[7][](_fighterIds.length);

        for (uint i = 0; i < _fighterIds.length; i++) {
            uint256 generation;
            uint256 genes;
            uint256 dexterity;
            uint256 strength;
            uint256 vitality;
            uint256 luck;
            uint256 experience;
            
            (
                ,
                ,
                ,
                ,
                ,
                generation,
                genes,
                dexterity,
                strength,
                vitality,
                luck,
                experience
            ) = fighterCore.getFighter(_fighterIds[i]);

            uint256 level = experienceToLevel(experience);

            res[i] = [
                level,
                generation,
                strength,
                dexterity,
                vitality,
                luck,
                genes
            ];
        }

        return res;
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"getTeam","outputs":[{"name":"owner","type":"address"},{"name":"fighterIds","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_race","type":"uint256"},{"name":"_generation","type":"uint256"},{"name":"_rand","type":"uint256"}],"name":"_getStrengthDexterityVitality","outputs":[{"name":"strength","type":"uint256"},{"name":"dexterity","type":"uint256"},{"name":"vitality","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"fighterIndexToTeam","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setGeneScienceAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_gen","type":"uint256"},{"name":"_rand","type":"uint256"}],"name":"genToExtraStats","outputs":[{"name":"extraStrength","type":"uint8"},{"name":"extraDexterity","type":"uint8"},{"name":"extraVitality","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_fighterIds","type":"uint256[]"}],"name":"getFighterArray","outputs":[{"name":"","type":"uint256[7][]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"battlesTillBattleCooldown","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"prizeCooldowns","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_experience","type":"uint256"}],"name":"experienceToLevel","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"teams","outputs":[{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"raceBaseStats","outputs":[{"name":"strength","type":"uint8"},{"name":"dexterity","type":"uint8"},{"name":"vitality","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_race","type":"uint256"}],"name":"raceToBaseStats","outputs":[{"name":"strength","type":"uint8"},{"name":"dexterity","type":"uint8"},{"name":"vitality","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"teamIndexToExist","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_secs","type":"uint256"}],"name":"setSecondsPerBlock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fighterCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalTeams","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newContractAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_v2Address","type":"address"}],"name":"setNewAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"secondsPerBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"removeLastRace","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_strength","type":"uint8"},{"name":"_dexterity","type":"uint8"},{"name":"_vitality","type":"uint8"}],"name":"addRace","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"extraStatsForGen","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"battleDecider","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":"maxPerTeam","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_attackerFighterIds","type":"uint256[]"},{"name":"_defenderTeamId","type":"uint256"}],"name":"battle","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_teamId","type":"uint256"}],"name":"teamExists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"deletedTeamIds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"stats","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"genBaseStats","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setBattleDeciderAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"experienceDelay","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDeletedTeams","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setFighterCoreAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_gen","type":"uint256"},{"name":"_rand","type":"uint256"}],"name":"genToLuck","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_fighterIds","type":"uint256[]"}],"name":"createTeam","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"getRaceBaseStats","outputs":[{"name":"strength","type":"uint256"},{"name":"dexterity","type":"uint256"},{"name":"vitality","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_teamId","type":"uint256"}],"name":"deleteTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_fighterIds","type":"uint256[]"}],"name":"isValidTeam","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"geneScience","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_coreAddress","type":"address"},{"name":"_geneScienceAddress","type":"address"},{"name":"_battleDeciderAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newContract","type":"address"}],"name":"ContractUpgrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"teamId","type":"uint256"},{"indexed":false,"name":"fighterIds","type":"uint256[]"}],"name":"TeamCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"teamId","type":"uint256"},{"indexed":false,"name":"fighterIds","type":"uint256[]"}],"name":"TeamDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"winnerAddress","type":"address"},{"indexed":true,"name":"loserAddress","type":"address"},{"indexed":false,"name":"attackerFighterIds","type":"uint256[]"},{"indexed":false,"name":"defenderFighterIds","type":"uint256[]"},{"indexed":false,"name":"attackerWon","type":"bool"},{"indexed":false,"name":"prizeFighterGeneration","type":"uint16"},{"indexed":false,"name":"prizeFighterGenes","type":"uint256"},{"indexed":false,"name":"attackerXpGained","type":"uint32"},{"indexed":false,"name":"defenderXpGained","type":"uint32"}],"name":"BattleResult","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

606060405260008060146101000a81548160ff02191690831515021790555060006003556005600a5561016060405190810160405280601060ff168152602001600c60ff168152602001600a60ff168152602001600860ff168152602001600760ff168152602001600660ff168152602001600560ff168152602001600460ff168152602001600360ff168152602001600260ff168152602001600160ff16815250600b90600b620000b392919062000db4565b50600f600d5560e060405190810160405280603c63ffffffff1663ffffffff16815260200161070863ffffffff1663ffffffff168152602001611c2063ffffffff1663ffffffff16815260200161546063ffffffff1663ffffffff16815260200161a8c063ffffffff1663ffffffff1681526020016201518063ffffffff1663ffffffff1681526020016203f48063ffffffff1663ffffffff16815250600e9060076200016292919062000e62565b5061064060405190810160405280600062ffffff168152602001606462ffffff16815260200161012c62ffffff16815260200161025862ffffff1681526020016103e862ffffff1681526020016105dc62ffffff16815260200161083462ffffff168152602001610af062ffffff168152602001610e1062ffffff16815260200161119462ffffff16815260200161157c62ffffff1681526020016119c862ffffff168152602001611e7862ffffff16815260200161238c62ffffff16815260200161290462ffffff168152602001612ee062ffffff16815260200161352062ffffff168152602001613bc462ffffff1681526020016142cc62ffffff168152602001614a3862ffffff16815260200161520862ffffff168152602001615a3c62ffffff1681526020016162d462ffffff168152602001616bd062ffffff16815260200161753062ffffff168152602001617ef462ffffff16815260200161891c62ffffff1681526020016193a862ffffff168152602001619e9862ffffff16815260200161a9ec62ffffff16815260200161b5a462ffffff16815260200161c1c062ffffff16815260200161ce4062ffffff16815260200161db2462ffffff16815260200161e86c62ffffff16815260200161f61862ffffff1681526020016201042862ffffff1681526020016201129c62ffffff1681526020016201217462ffffff168152602001620130b062ffffff1681526020016201405062ffffff1681526020016201505462ffffff168152602001620160bc62ffffff1681526020016201718862ffffff168152602001620182b862ffffff1681526020016201944c62ffffff1681526020016201a64462ffffff1681526020016201b8a062ffffff1681526020016201cb6062ffffff1681526020016201de8462ffffff16815250600f9060326200041692919062000f0b565b5061016060405190810160405280601060ff168152602001600c60ff168152602001600a60ff168152602001600860ff168152602001600760ff168152602001600660ff168152602001600560ff168152602001600460ff168152602001600360ff168152602001600260ff168152602001600160ff16815250601690600b620004a292919062000fb4565b506005601760006101000a81548160ff021916908360ff160217905550615460601760016101000a81548163ffffffff021916908363ffffffff1602179055503415620004ee57600080fd5b6040516060806200571e833981016040528080519060200190919080519060200190919080519060200190919050506200052762001055565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200058a6004806004620007126401000000000262001930176401000000009004565b620005ae600660026004620007126401000000000262001930176401000000009004565b620005d2600460056003620007126401000000000262001930176401000000009004565b620005f6600660046002620007126401000000000262001930176401000000009004565b6200061a600760016004620007126401000000000262001930176401000000009004565b6200063984620008266401000000000262002d0a176401000000009004565b62000658836200090564010000000002620027f6176401000000009004565b6200067782620009e46401000000000262002c2e176401000000009004565b6001604051805910620006875750595b908082528060200260200182016040525090506000816000815181101515620006ac57fe5b9060200190602002018181525050620006db60008262000ac36401000000000262002de6176401000000009004565b5060006008600080815260200190815260200160002060006101000a81548160ff0219169083151502179055505050505062001307565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156200076e57600080fd5b6002805480600101828162000784919062001069565b916000526020600020900160006060604051908101604052808760ff1681526020018660ff1681526020018560ff16815250909190915060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff160217905550505050505050565b60008190508073ffffffffffffffffffffffffffffffffffffffff16631051db346000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156200089857600080fd5b6102c65a03f11515620008aa57600080fd5b505050604051805190501515620008c057600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008190508073ffffffffffffffffffffffffffffffffffffffff166354c15b826000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156200097757600080fd5b6102c65a03f115156200098957600080fd5b5050506040518051905015156200099f57600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008190508073ffffffffffffffffffffffffffffffffffffffff1663c03c72aa6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151562000a5657600080fd5b6102c65a03f1151562000a6857600080fd5b50505060405180519050151562000a7e57600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600062000acf62001098565b600080600060408051908101604052808873ffffffffffffffffffffffffffffffffffffffff1681526020018781525093506000600980549050111562000c0357600960016009805490500381548110151562000b2857fe5b9060005260206000209001549250600960016009805490500381548110151562000b4e57fe5b906000526020600020900160009055600980548091906001900362000b749190620010d0565b508360018481548110151562000b8657fe5b906000526020600020906002020160008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101908051906020019062000bf9929190620010ff565b5090505062000c9c565b600180805480600101828162000c1a919062001151565b9160005260206000209060020201600087909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101908051906020019062000c95929190620010ff565b5050500392505b63ffffffff831115151562000cb057600080fd5b600091505b855182101562000d0057858281518110151562000cce57fe5b906020019060200201519050826007600083815260200190815260200160002081905550818060010192505062000cb5565b60016008600085815260200190815260200160002060006101000a81548160ff021916908315150217905550827f67c25a142727e9ef2a3609a09b302ebcc3d083d06bca5c35f5bf07880ecd5ecc876040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101562000d9457808201518184015260208101905062000d77565b505050509050019250505060405180910390a28294505050505092915050565b82805482825590600052602060002090601f0160209004810192821562000e4f5791602002820160005b8382111562000e1e57835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000dde565b801562000e4d5782816101000a81549060ff021916905560010160208160000104928301926001030262000e1e565b505b50905062000e5e919062001186565b5090565b826007800160089004810192821562000ef85791602002820160005b8382111562000ec457835183826101000a81548163ffffffff021916908363ffffffff160217905550926020019260040160208160030104928301926001030262000e7e565b801562000ef65782816101000a81549063ffffffff021916905560040160208160030104928301926001030262000ec4565b505b50905062000f079190620011b9565b5090565b82603260070160089004810192821562000fa15791602002820160005b8382111562000f6d57835183826101000a81548163ffffffff021916908362ffffff160217905550926020019260040160208160030104928301926001030262000f28565b801562000f9f5782816101000a81549063ffffffff021916905560040160208160030104928301926001030262000f6d565b505b50905062000fb09190620011b9565b5090565b82600b601f01602090048101928215620010425791602002820160005b838211156200101157835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000fd1565b8015620010405782816101000a81549060ff021916905560010160208160000104928301926001030262001011565b505b50905062001051919062001186565b5090565b602060405190810160405280600081525090565b8154818355818115116200109357818360005260206000209182019101620010929190620011ef565b5b505050565b6040805190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001620010ca6200124d565b81525090565b815481835581811511620010fa57818360005260206000209182019101620010f9919062001261565b5b505050565b8280548282559060005260206000209081019282156200113e579160200282015b828111156200113d57825182559160200191906001019062001120565b5b5090506200114d919062001261565b5090565b815481835581811511620011815760020281600202836000526020600020918201910162001180919062001289565b5b505050565b620011b691905b80821115620011b257600081816101000a81549060ff0219169055506001016200118d565b5090565b90565b620011ec91905b80821115620011e857600081816101000a81549063ffffffff021916905550600101620011c0565b5090565b90565b6200124a91905b808211156200124657600080820160006101000a81549060ff02191690556000820160016101000a81549060ff02191690556000820160026101000a81549060ff021916905550600101620011f6565b5090565b90565b602060405190810160405280600081525090565b6200128691905b808211156200128257600081600090555060010162001268565b5090565b90565b620012e191905b80821115620012dd57600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000620012d39190620012e4565b5060020162001290565b5090565b90565b508054600082559060005260206000209081019062001304919062001261565b50565b61440780620013176000396000f300606060405260043610610219576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680628e0f1b14610226578063122ff73a146102d157806321cde8241461032857806324e7a38a1461035f578063286707a114610398578063324dd3b0146103f85780633852c53f146104ca5780633a9e9d0d146104f95780633b9855ea1461053c5780633ed2b77a146105735780633f4ba83a146105d6578063454f3434146105eb57806345871918146106425780634e0896a1146106995780635663896e146106d45780635c975abb146106f75780635fb6bca214610724578063654c6daf146107795780636af04a57146107a257806371587988146107f75780637a7d4937146108305780637bbd3f19146108595780637cdd053a1461086e57806380b44c1b146108ac5780638456cb59146108e95780638660cbf5146108fe5780638da5cb5b1461095357806390393fc8146109a85780639233c1d6146109d15780639898175614610a4c578063a5e8280714610a87578063ad217ae514610abe578063b2775b0214610b01578063b39a7fbe14610b3e578063c1e457c814610b77578063cc9f28ea14610bac578063cfa24ee314610c16578063dd2ac27614610c4f578063e82aa31f14610c95578063e8554e8b14610d03578063ea842e6514610d48578063f1b4d54814610d6b578063f2b47d5214610ddd578063f2fde38b14610e32575b341561022457600080fd5b005b341561023157600080fd5b6102476004808035906020019091905050610e6b565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156102bc5780820151818401526020810190506102a1565b50505050905001935050505060405180910390f35b34156102dc57600080fd5b6103046004808035906020019091908035906020019091908035906020019091905050610f18565b60405180848152602001838152602001828152602001935050505060405180910390f35b341561033357600080fd5b6103496004808035906020019091905050610f78565b6040518082815260200191505060405180910390f35b341561036a57600080fd5b610396600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f90565b005b34156103a357600080fd5b6103c26004808035906020019091908035906020019091905050610ff7565b604051808460ff1660ff1681526020018360ff1660ff1681526020018260ff1660ff168152602001935050505060405180910390f35b341561040357600080fd5b6104506004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919050506110f0565b60405180806020018281038252838181518152602001915080516000925b818410156104b957828490602001906020020151600760200280838360005b838110156104a857808201518184015260208101905061048d565b50505050905001926001019261046e565b925050509250505060405180910390f35b34156104d557600080fd5b6104dd61133a565b604051808260ff1660ff16815260200191505060405180910390f35b341561050457600080fd5b61051a600480803590602001909190505061134d565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b341561054757600080fd5b61055d600480803590602001909190505061137c565b6040518082815260200191505060405180910390f35b341561057e57600080fd5b61059460048080359060200190919050506113e5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105e157600080fd5b6105e9611432565b005b34156105f657600080fd5b61060c60048080359060200190919050506114f0565b604051808460ff1660ff1681526020018360ff1660ff1681526020018260ff1660ff168152602001935050505060405180910390f35b341561064d57600080fd5b610663600480803590602001909190505061154d565b604051808460ff1660ff1681526020018360ff1660ff1681526020018260ff1660ff168152602001935050505060405180910390f35b34156106a457600080fd5b6106ba6004808035906020019091905050611609565b604051808215151515815260200191505060405180910390f35b34156106df57600080fd5b6106f56004808035906020019091905050611629565b005b341561070257600080fd5b61070a6116cd565b604051808215151515815260200191505060405180910390f35b341561072f57600080fd5b6107376116e0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561078457600080fd5b61078c611706565b6040518082815260200191505060405180910390f35b34156107ad57600080fd5b6107b5611715565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561080257600080fd5b61082e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061173b565b005b341561083b57600080fd5b610843611858565b6040518082815260200191505060405180910390f35b341561086457600080fd5b61086c61185e565b005b341561087957600080fd5b6108aa600480803560ff1690602001909190803560ff1690602001909190803560ff16906020019091905050611930565b005b34156108b757600080fd5b6108cd6004808035906020019091905050611a41565b604051808260ff1660ff16815260200191505060405180910390f35b34156108f457600080fd5b6108fc611a6a565b005b341561090957600080fd5b610911611b2a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561095e57600080fd5b610966611b50565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156109b357600080fd5b6109bb611b75565b6040518082815260200191505060405180910390f35b34156109dc57600080fd5b610a32600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019091905050611b7b565b604051808215151515815260200191505060405180910390f35b3415610a5757600080fd5b610a6d6004808035906020019091905050612071565b604051808215151515815260200191505060405180910390f35b3415610a9257600080fd5b610aa860048080359060200190919050506120a2565b6040518082815260200191505060405180910390f35b3415610ac957600080fd5b610adf60048080359060200190919050506120c6565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b3415610b0c57600080fd5b610b2260048080359060200190919050506120f5565b604051808260ff1660ff16815260200191505060405180910390f35b3415610b4957600080fd5b610b75600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612128565b005b3415610b8257600080fd5b610b8a61218f565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b3415610bb757600080fd5b610bbf6121a5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610c02578082015181840152602081019050610be7565b505050509050019250505060405180910390f35b3415610c2157600080fd5b610c4d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612203565b005b3415610c5a57600080fd5b610c79600480803590602001909190803590602001909190505061226a565b604051808260ff1660ff16815260200191505060405180910390f35b3415610ca057600080fd5b610ced600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050612318565b6040518082815260200191505060405180910390f35b3415610d0e57600080fd5b610d246004808035906020019091905050612379565b60405180848152602001838152602001828152602001935050505060405180910390f35b3415610d5357600080fd5b610d6960048080359060200190919050506123e8565b005b3415610d7657600080fd5b610dc36004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919050506124c1565b604051808215151515815260200191505060405180910390f35b3415610de857600080fd5b610df061267b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610e3d57600080fd5b610e69600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506126a1565b005b6000610e756140cc565b6000600184815481101515610e8657fe5b906000526020600020906002020190508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925080600101805480602002602001604051908101604052809291908181526020018280548015610f0b57602002820191906000526020600020905b815481526020019060010190808311610ef7575b5050505050915050915091565b6000806000806000806000806000610f2f8c61154d565b809650819750829850505050610f458b8b610ff7565b80935081945082955050505082860160ff16985081850160ff16975080840160ff16965050505050505093509350939050565b60076020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610feb57600080fd5b610ff4816127f6565b50565b6000806000806000806000806000600a8b10151561101457600a9a505b60168b600b8110151561102357fe5b602091828204019190069054906101000a900460ff16955060ff8a16945060ff60108b9060020a900416935060ff6010808c9060020a90049060020a90041692508284860101915081858760ff160281151561107b57fe5b04985081848760ff160281151561108e57fe5b04975081838760ff16028115156110a157fe5b04965086888a01018603905083851180156110bb57508285115b156110ca5780890198506110e3565b828411156110dc5780880197506110e2565b80870196505b5b5050505050509250925092565b6110f86140e0565b6111006140e0565b60008060008060008060008060008b5160405180591061111d5750595b90808252806020026020018201604052801561115357816020015b6111406140f4565b8152602001906001900390816111385790505b509950600098505b8b5189101561132857600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663889fa1dc8d8b8151811015156111b057fe5b90602001906020020151600060405161018001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061018060405180830381600087803b151561121657600080fd5b6102c65a03f1151561122757600080fd5b50505060405180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519050909192939495969798999a509091929394959697989950909192939495969798509091929394959697509091929394959650809850819950829a50839b50849c50859d50869e50505050505050506112ca8261137c565b905060e060405190810160405280828152602001898152602001868152602001878152602001858152602001848152602001888152508a8a81518110151561130e57fe5b90602001906020020181905250888060010199505061115b565b899a5050505050505050505050919050565b601760009054906101000a900460ff1681565b600e8160078110151561135c57fe5b60089182820401919006600402915054906101000a900463ffffffff1681565b600080600090505b60328110156113da5782600f8260328110151561139d57fe5b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1611156113cd578091506113df565b8080600101915050611384565b603291505b50919050565b6001818154811015156113f457fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561148d57600080fd5b600060149054906101000a900460ff1615156114a857600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6002818154811015156114ff57fe5b90600052602060002090016000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff16908060000160029054906101000a900460ff16905083565b600080600061155a61411c565b6002805490508510151561156d57600094505b60028581548110151561157c57fe5b9060005260206000209001606060405190810160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff16815250509050806000015193508060200151925080604001519150509193909250565b60086020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561168457600080fd5b600e600060078110151561169457fe5b600891828204019190066004029054906101000a900463ffffffff1663ffffffff16811015156116c357600080fd5b80600d8190555050565b600060149054906101000a900460ff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006001808054905003905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561179657600080fd5b600060149054906101000a900460ff1615156117b157600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f450db8da6efbe9c22f2347f7c2021231df1fc58d3ae9a2fa75d39fa44619930581604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600d5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118b957600080fd5b60046002805490501115156118cd57600080fd5b60026001600280549050038154811015156118e457fe5b9060005260206000209001600080820160006101000a81549060ff02191690556000820160016101000a81549060ff02191690556000820160026101000a81549060ff02191690555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561198b57600080fd5b6002805480600101828161199f9190614147565b916000526020600020900160006060604051908101604052808760ff1681526020018660ff1681526020018560ff16815250909190915060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff160217905550505050505050565b601681600b81101515611a5057fe5b60209182820401919006915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ac557600080fd5b600060149054906101000a900460ff16151515611ae157600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b6000611b85614173565b611b8d6140cc565b60008060008060008060008060149054906101000a900460ff16151515611bb357600080fd5b8a600115156008600083815260200190815260200160002060009054906101000a900460ff161515141515611be757600080fd5b60008d51118015611bfb5750600a548d5111155b1515611c0657600080fd5b611c0f8d6124c1565b1515611c1a57600080fd5b60018c815481101515611c2957fe5b90600052602060002090600202016040805190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201805480602002602001604051908101604052809291908181526020018280548015611ce757602002820191906000526020600020905b815481526020019060010190808311611cd3575b5050505050815250509950896000015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515611d3157600080fd5b89602001519850611d418c6128d2565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fdce9565611d888f6110f0565b611d918c6110f0565b6000604051606001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001806020018381038352858181518152602001915080516000925b81841015611e3257828490602001906020020151600760200280838360005b83811015611e21578082015181840152602081019050611e06565b505050509050019260010192611de7565b925050508381038252848181518152602001915080516000925b81841015611e9757828490602001906020020151600760200280838360005b83811015611e86578082015181840152602081019050611e6b565b505050509050019260010192611e4c565b92505050945050505050606060405180830381600087803b1515611eba57600080fd5b6102c65a03f11515611ecb57600080fd5b50505060405180519060200180519060200180519050809850819950829a505050508715611f025733945089600001519350611f0d565b896000015194503393505b611f1b8d8a8a888b8b612b35565b80935081945050508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f6ef72aaacf97b492a682c3767c42b14277b875c2499b11cff7f9a30d45ef3d678f8c8c88888e8e604051808060200180602001881515151581526020018761ffff1661ffff1681526020018681526020018563ffffffff1663ffffffff1681526020018463ffffffff1663ffffffff16815260200183810383528a818151815260200191508051906020019060200280838360005b83811015612002578082015181840152602081019050611fe7565b50505050905001838103825289818151815260200191508051906020019060200280838360005b83811015612044578082015181840152602081019050612029565b50505050905001995050505050505050505060405180910390a3879a505050505050505050505092915050565b6000600115156008600084815260200190815260200160002060009054906101000a900460ff161515149050919050565b6009818154811015156120b157fe5b90600052602060002090016000915090505481565b600f816032811015156120d557fe5b60089182820401919006600402915054906101000a900463ffffffff1681565b600b8181548110151561210457fe5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561218357600080fd5b61218c81612c2e565b50565b601760019054906101000a900463ffffffff1681565b6121ad6140cc565b60098054806020026020016040519081016040528092919081815260200182805480156121f957602002820191906000526020600020905b8154815260200190600101908083116121e5575b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561225e57600080fd5b61226781612d0a565b50565b600060018310158061227d575060028311155b1561229c5760038260ff1681151561229157fe5b066002019050612312565b6003831015806122ad575060088311155b156122cc5760028260ff168115156122c157fe5b066002019050612312565b6009831015806122dd5750600f8311155b156122fc5760038260ff168115156122f157fe5b066001019050612312565b60028260ff1681151561230b57fe5b0660010190505b92915050565b60008060149054906101000a900460ff1615151561233557600080fd5b600082511180156123495750600a54825111155b151561235457600080fd5b61235d826124c1565b151561236857600080fd5b6123723383612de6565b9050919050565b60008060008060028581548110151561238e57fe5b906000526020600020900190508060000160009054906101000a900460ff1660ff1693508060000160019054906101000a900460ff1660ff1692508060000160029054906101000a900460ff1660ff169150509193909250565b600060149054906101000a900460ff1615151561240457600080fd5b803373ffffffffffffffffffffffffffffffffffffffff1660018281548110151561242b57fe5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561247f57600080fd5b81600115156008600083815260200190815260200160002060009054906101000a900460ff1615151415156124b357600080fd5b6124bc836128d2565b505050565b600080600080600092505b845183101561266e5784838151811015156124e357fe5b9060200190602002015191503373ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561259f57600080fd5b6102c65a03f115156125b057600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff161415156125e05760009350612673565b6000600760008481526020019081526020016000205411156126055760009350612673565b6001830190505b845181101561266157848181518110151561262357fe5b90602001906020020151858481518110151561263b57fe5b9060200190602002015114156126545760009350612673565b808060010191505061260c565b82806001019350506124cc565b600193505b505050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156126fc57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561273857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008190508073ffffffffffffffffffffffffffffffffffffffff166354c15b826000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561286757600080fd5b6102c65a03f1151561287857600080fd5b50505060405180519050151561288d57600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6128da614173565b60006001838154811015156128eb57fe5b90600052602060002090600202016040805190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182018054806020026020016040519081016040528092919081815260200182805480156129a957602002820191906000526020600020905b815481526020019060010190808311612995575b5050505050815250509150600090505b816020015151811015612a07576000600760008460200151848151811015156129de57fe5b9060200190602002015181526020019081526020016000208190555080806001019150506129b9565b827f045d4503c3f2aa3841caf9c07b2d2b551f34bf5d0eff13ebefd341488cef426183602001516040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015612a71578082015181840152602081019050612a56565b505050509050019250505060405180910390a2600183815481101515612a9357fe5b9060005260206000209060020201600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000612ad991906141a9565b505060098054806001018281612aef91906141ca565b91600052602060002090016000859091909150555060006008600085815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b600080612b406141f6565b612b486141f6565b6000612b6b8b6000815181101515612b5c57fe5b906020019060200201516130c2565b9250612b8e8a6000815181101515612b7f57fe5b906020019060200201516130c2565b9150888015612bb0575043836000600781101515612ba857fe5b602002015110155b80612bd8575088158015612bd7575043826000600781101515612bcf57fe5b602002015110155b5b9050612be48b8861323a565b612bee8a8761323a565b612bf98b8a8361329c565b612c058a8a158361329c565b8015612c1057612c20565b612c1b888484613304565b945094505b505050965096945050505050565b60008190508073ffffffffffffffffffffffffffffffffffffffff1663c03c72aa6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515612c9f57600080fd5b6102c65a03f11515612cb057600080fd5b505050604051805190501515612cc557600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008190508073ffffffffffffffffffffffffffffffffffffffff16631051db346000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515612d7b57600080fd5b6102c65a03f11515612d8c57600080fd5b505050604051805190501515612da157600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000612df0614173565b600080600060408051908101604052808873ffffffffffffffffffffffffffffffffffffffff16815260200187815250935060006009805490501115612f1b576009600160098054905003815481101515612e4757fe5b90600052602060002090015492506009600160098054905003815481101515612e6c57fe5b9060005260206000209001600090556009805480919060019003612e90919061421e565b5083600184815481101515612ea157fe5b906000526020600020906002020160008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019080519060200190612f1292919061424a565b50905050612fb0565b6001808054806001018281612f309190614297565b9160005260206000209060020201600087909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019080519060200190612fa992919061424a565b5050500392505b63ffffffff8311151515612fc357600080fd5b600091505b8551821015613010578582815181101515612fdf57fe5b9060200190602002015190508260076000838152602001908152602001600020819055508180600101925050612fc8565b60016008600085815260200190815260200160002060006101000a81548160ff021916908315150217905550827f67c25a142727e9ef2a3609a09b302ebcc3d083d06bca5c35f5bf07880ecd5ecc876040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156130a2578082015181840152602081019050613087565b505050509050019250505060405180910390a28294505050505092915050565b6130ca6141f6565b6000806000806000806000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663889fa1dc8a600060405161018001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061018060405180830381600087803b151561317057600080fd5b6102c65a03f1151561318157600080fd5b50505060405180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519050909192935090919250909150905050809750819850829950839a50849c50859b50869d505050505050505060e06040519081016040528088815260200187815260200186815260200185815260200184815260200183815260200182815250975050505050505050919050565b60008090505b82518110156132975761328a838281518110151561325a57fe5b9060200190602002015183613285868581518110151561327657fe5b9060200190602002015161350a565b61369a565b8080600101915050613240565b505050565b60008090505b83518110156132fe576132f184828151811015156132bc57fe5b9060200190602002015184600084146132eb88868151811015156132dc57fe5b906020019060200201516130c2565b86613b17565b80806001019150506132a2565b50505050565b60008061330f6142c9565b61336785600560078110151561332157fe5b602002015186600660078110151561333557fe5b602002015186600560078110151561334957fe5b602002015187600660078110151561335d57fe5b6020020151613d82565b905080600060068110151561337857fe5b6020020151925080600160068110151561338e57fe5b60200201519150600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633746010d84848460026006811015156133e457fe5b60200201518560036006811015156133f857fe5b602002015186600460068110151561340c57fe5b602002015187600560068110151561342057fe5b60200201518d6040518863ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808861ffff1661ffff1681526020018781526020018660ff1660ff1681526020018560ff1660ff1681526020018460ff1660ff1681526020018360ff1660ff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001975050505050505050600060405180830381600087803b15156134ed57600080fd5b6102c65a03f115156134fe57600080fd5b50505050935093915050565b6135126142c9565b600080600080600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663889fa1dc89600060405161018001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061018060405180830381600087803b15156135b657600080fd5b6102c65a03f115156135c757600080fd5b50505060405180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519060200180519050909192939495969798999a5090919293949596979850909192939495969750909192939495965090919293949550909192939450809750819850829950839a50849b5085965050505050505060c060405190810160405280878152602001868152602001858152602001848152602001838152602001828152509650505050505050919050565b6000806000438460056006811015156136af57fe5b60200201511015156136c057613b0f565b8360046006811015156136cf57fe5b6020020151925084830191506136e58383613f68565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663809e52b287846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018263ffffffff1663ffffffff16815260200192505050600060405180830381600087803b151561378b57600080fd5b6102c65a03f1151561379c57600080fd5b505050600181141561387b57600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166378b5a576878660006006811015156137f657fe5b60200201805160010190818152506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260ff1660ff16815260200192505050600060405180830381600087803b151561386257600080fd5b6102c65a03f1151561387357600080fd5b505050613b0e565b600281141561395757600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d04d26fe878660016006811015156138d257fe5b60200201805160010190818152506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260ff1660ff16815260200192505050600060405180830381600087803b151561393e57600080fd5b6102c65a03f1151561394f57600080fd5b505050613b0d565b6003811415613a3357600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a76eeab2878660026006811015156139ae57fe5b60200201805160010190818152506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260ff1660ff16815260200192505050600060405180830381600087803b1515613a1a57600080fd5b6102c65a03f11515613a2b57600080fd5b505050613b0c565b6004811415613b0b57600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631c7276f587866003600681101515613a8a57fe5b60200201805160010190818152506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260ff1660ff16815260200192505050600060405180830381600087803b1515613af657600080fd5b6102c65a03f11515613b0757600080fd5b5050505b5b5b5b5b505050505050565b600080600080856000600781101515613b2c57fe5b60200201519350856001600781101515613b4257fe5b60200201519250856002600781101515613b5857fe5b602002015191506001866003600781101515613b7057fe5b6020020151019050878015613b825750865b8015613b8c575084155b15613bec5743600d54600e8561ffff16600781101515613ba857fe5b600891828204019190066004029054906101000a900463ffffffff1663ffffffff16811515613bd357fe5b0401935060068361ffff161015613beb576001830192505b5b6000601760009054906101000a900460ff1660ff168261ffff16811515613c0f57fe5b0661ffff161415613c455743600d54601760019054906101000a900463ffffffff1663ffffffff16811515613c4057fe5b040191505b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634eeee8ac8a868686868e613c94576000613c97565b60015b60ff168d6004600781101515613ca957fe5b6020020151016040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808781526020018667ffffffffffffffff1667ffffffffffffffff1681526020018561ffff1661ffff1681526020018467ffffffffffffffff1667ffffffffffffffff1681526020018361ffff1661ffff1681526020018261ffff1661ffff1681526020019650505050505050600060405180830381600087803b1515613d6357600080fd5b6102c65a03f11515613d7457600080fd5b505050505050505050505050565b613d8a6142c9565b600080600080600080600080600160028c8f01811515613da657fe5b0401975061ffff881115613dba5761ffff97505b879650600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638d8b1b888d8c6000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050602060405180830381600087803b1515613e5e57600080fd5b6102c65a03f11515613e6f57600080fd5b50505060405180519050955042336003600081548092919060010191905055604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040518091039020600190049150613f09613efe8761403d565b8861ffff1684610f18565b809550819650829750505050613f1f868361226a565b60ff16905060c0604051908101604052808861ffff1681526020018781526020018681526020018581526020018481526020018281525098505050505050505050949350505050565b600080600090505b6032811015614031578363ffffffff16600f82603281101515613f8f57fe5b600891828204019190066004029054906101000a900463ffffffff1663ffffffff161115614024578263ffffffff16600f82603281101515613fcd57fe5b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1611151561401b5761401160036000815480929190600101919050556004614052565b6001019150614036565b60009150614036565b8080600101915050613f70565b600091505b5092915050565b600060ff6010839060020a9004169050919050565b600081423385604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040518091039020600190048115156140c357fe5b06905092915050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b60e0604051908101604052806007905b60008152602001906001900390816141045790505090565b606060405190810160405280600060ff168152602001600060ff168152602001600060ff1681525090565b81548183558181151161416e5781836000526020600020918201910161416d91906142f1565b5b505050565b6040805190810160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016141a361434c565b81525090565b50805460008255906000526020600020908101906141c79190614360565b50565b8154818355818115116141f1578183600052602060002091820191016141f09190614360565b5b505050565b60e0604051908101604052806007905b60008152602001906001900390816142065790505090565b815481835581811511614245578183600052602060002091820191016142449190614360565b5b505050565b828054828255906000526020600020908101928215614286579160200282015b8281111561428557825182559160200191906001019061426a565b5b5090506142939190614360565b5090565b8154818355818115116142c4576002028160020283600052602060002091820191016142c39190614385565b5b505050565b60c0604051908101604052806006905b60008152602001906001900390816142d95790505090565b61434991905b8082111561434557600080820160006101000a81549060ff02191690556000820160016101000a81549060ff02191690556000820160026101000a81549060ff0219169055506001016142f7565b5090565b90565b602060405190810160405280600081525090565b61438291905b8082111561437e576000816000905550600101614366565b5090565b90565b6143d891905b808211156143d457600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006143cb91906141a9565b5060020161438b565b5090565b905600a165627a7a72305820c2c9384736abe2552dd8c89d3d2b1145171f7e4a118a06c5eb5f4c28c951f7d1002900000000000000000000000087d598064c736dd0c712d329afcfaa0ccc1921a100000000000000000000000092882f859e7179d6625e91a09e7b6e856870e5b1000000000000000000000000c6fb27e980e75aae48fbc793f362e3cf87409287

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

00000000000000000000000087d598064c736dd0c712d329afcfaa0ccc1921a100000000000000000000000092882f859e7179d6625e91a09e7b6e856870e5b1000000000000000000000000c6fb27e980e75aae48fbc793f362e3cf87409287

-----Decoded View---------------
Arg [0] : _coreAddress (address): 0x87d598064c736dd0c712d329afcfaa0ccc1921a1
Arg [1] : _geneScienceAddress (address): 0x92882f859e7179d6625e91a09e7b6e856870e5b1
Arg [2] : _battleDeciderAddress (address): 0xc6fb27e980e75aae48fbc793f362e3cf87409287

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000087d598064c736dd0c712d329afcfaa0ccc1921a1
Arg [1] : 00000000000000000000000092882f859e7179d6625e91a09e7b6e856870e5b1
Arg [2] : 000000000000000000000000c6fb27e980e75aae48fbc793f362e3cf87409287


Swarm Source

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

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.