Sponsored Link:   BubbleTone - Blockchain in Telecom, directly connecting mobile operators and users globally, launches its unique ICO!
  Latest 25 txns from a total Of 79110 transactions (+25 PendingTxns) View All

TxHash Age From To Value [TxFee]
0x35a917bee8c9c5c8c8e7fad41920be9a6efe9816f1accae25498103228e4600f(pending)1 min ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0xbf651fc480ee90bd5b97f26be18928ce8f8e888a97b2c90264ac6fa22a390d21(pending)1 min ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x46432996a38869fe79466e72adf8e6aaf88f5a9b716f9c667e7b5dbd8439d3ce(pending)1 min ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x9dbdcb0e88d3517d5cc447843bb340d1997ba1a8e540b0bd132a2ce6b2f2e04c(pending)1 min ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x43ae33e9fd2e572b2f18263cc143de1b90e13517e6bda370fbd5922d59310c87(pending)1 min ago0x55c0529e378f08d37f4b719991d894ea77c81c30  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x38c0ffe8ea3067a2605caba253a1111be217b6808df7656e4d8bf3460eb8ea80(pending)1 min ago0xa22ca6fb3eac3d2f4df4e69ea27c3dd3f2cff84d  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x420370e5d003e19d1d045872d6863f2df08b51175e2edc9829031a76afbaa60c(pending)1 min ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0xc69b9a2f9601993b1322d3abcb36e936c91cc29ad56153142599da11d249a9dd(pending)1 min ago0x55c0529e378f08d37f4b719991d894ea77c81c30  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x2932689449e13a18cfb8093679f430aa4433ef2228b9ee07f53c258f0a5c87ab(pending)1 min ago0xa22ca6fb3eac3d2f4df4e69ea27c3dd3f2cff84d  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x1572eaa4cdce6bed838ea0eb9ecb9883bf6f33c60a50db8217f44e700c31d9c5(pending)1 min ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0xb93c93e6a69b869d5dfc7435856113abd6a1a3aad7d8b1da89d13adb0bb38769(pending)1 min ago0xa22ca6fb3eac3d2f4df4e69ea27c3dd3f2cff84d  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x61d0c7b8396676fe8e724675c12f9202cb79f09371045470484a8233524f793c(pending)1 min ago0xa22ca6fb3eac3d2f4df4e69ea27c3dd3f2cff84d  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x7a386b048c9911868e9e4f1ed80d0f94a7d61329b4829c1b15f9421c9e7a8898(pending)2 mins ago0xa9838c0f833d4e378fc937cc00d8b4080193815b  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x5bab04605d8c7de084b6843a3e5d3162fc6018b9c1bdce9be18f709fb861f279(pending)2 mins ago0xa9838c0f833d4e378fc937cc00d8b4080193815b  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x86aa6a1fd1200064e530e95275155a5c2db63731ccde71c4cff4f939f5fe0a70(pending)2 mins ago0xa9838c0f833d4e378fc937cc00d8b4080193815b  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0xd6aa901bd3bbd1f3b33512728df99a89051db2ebc3c63ea5c1cf97ecab7317aa(pending)3 mins ago0x55c0529e378f08d37f4b719991d894ea77c81c30  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0xb7c36829ac914721bc6e97c479d9ed44159e91d25e00230198006a0e0bc00f5d(pending)8 mins ago0x55c0529e378f08d37f4b719991d894ea77c81c30  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0xee1215e8673a6d2983abffa5877d871ec9fa93c75e3d1d65613f266cbb8965f0(pending)14 mins ago0xa22ca6fb3eac3d2f4df4e69ea27c3dd3f2cff84d  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x0b457ea0ef47285515aeee213c6dc573d1ef390384f6a97b7d74f21b7648e891(pending)15 mins ago0xf389695d89f3782e1b588b4d46061ae1356b17a9  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x6954aa9360cb7364540a18ac67a6bf42680e9176612e1e7fb323e635aa160687(pending)19 mins ago0xf8bedf0828437351b2c8c083e4287d72bf063a4b  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x206b88a08a746e6b118c47081d697d946707cbe2c872cda4ba6e2aa0a11f0249(pending)24 mins ago0xf389695d89f3782e1b588b4d46061ae1356b17a9  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x52c95f24492e972805ad12af3c21fa32d9ec79cac847a9a62a3411727067e560(pending)26 mins ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0x74ea7b6070b35df4fcb66160505f4d3990d5d0f8f919970b142e4b2be5e3edbc(pending)26 mins ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0xb24f1a0bcec71ab3609c64d91109f84c2f418a4d5a70233ab9450dfd965e56c5(pending)30 mins ago0x8208a274067ea0a080bfbbabb30de9a1ecda85ce  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
0xcf520dffdc3f0c10c1a32a66da5db036ce8286f3ccd47e801ca56a8759c3d410(pending)45 mins ago0x55c0529e378f08d37f4b719991d894ea77c81c30  IN  0xdf6164efd12678bf6a7d5a1ddf73c831493f65740 Ether(pending)
 Internal Transactions as a result of Contract Execution
  Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0xcc130f70ebcf0bf16f4123a5efc37a93c70fa4c11ebf264809fd3c781642afe5535429325 days 20 hrs ago0xdf6164efd12678bf6a7d5a1ddf73c831493f65740xd3b6d520906bb14c0eab0faf7a8b13fe31f8cbda18.72 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: EtheremonBattle
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.16;

// copyright [email protected]

contract SafeMath {

    /* function assert(bool assertion) internal { */
    /*   if (!assertion) { */
    /*     throw; */
    /*   } */
    /* }      // assert no longer needed once solidity is on 0.4.10 */

    function safeAdd(uint256 x, uint256 y) pure internal returns(uint256) {
      uint256 z = x + y;
      assert((z >= x) && (z >= y));
      return z;
    }

    function safeSubtract(uint256 x, uint256 y) pure internal returns(uint256) {
      assert(x >= y);
      uint256 z = x - y;
      return z;
    }

    function safeMult(uint256 x, uint256 y) pure internal returns(uint256) {
      uint256 z = x * y;
      assert((x == 0)||(z/x == y));
      return z;
    }

}

contract BasicAccessControl {
    address public owner;
    // address[] public moderators;
    uint16 public totalModerators = 0;
    mapping (address => bool) public moderators;
    bool public isMaintaining = true;

    function BasicAccessControl() public {
        owner = msg.sender;
    }

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    modifier onlyModerators() {
        require(msg.sender == owner || moderators[msg.sender] == true);
        _;
    }

    modifier isActive {
        require(!isMaintaining);
        _;
    }

    function ChangeOwner(address _newOwner) onlyOwner public {
        if (_newOwner != address(0)) {
            owner = _newOwner;
        }
    }


    function AddModerator(address _newModerator) onlyOwner public {
        if (moderators[_newModerator] == false) {
            moderators[_newModerator] = true;
            totalModerators += 1;
        }
    }
    
    function RemoveModerator(address _oldModerator) onlyOwner public {
        if (moderators[_oldModerator] == true) {
            moderators[_oldModerator] = false;
            totalModerators -= 1;
        }
    }

    function UpdateMaintaining(bool _isMaintaining) onlyOwner public {
        isMaintaining = _isMaintaining;
    }
}

contract EtheremonEnum {

    enum ResultCode {
        SUCCESS,
        ERROR_CLASS_NOT_FOUND,
        ERROR_LOW_BALANCE,
        ERROR_SEND_FAIL,
        ERROR_NOT_TRAINER,
        ERROR_NOT_ENOUGH_MONEY,
        ERROR_INVALID_AMOUNT,
        ERROR_OBJ_NOT_FOUND,
        ERROR_OBJ_INVALID_OWNERSHIP
    }
    
    enum ArrayType {
        CLASS_TYPE,
        STAT_STEP,
        STAT_START,
        STAT_BASE,
        OBJ_SKILL
    }

    enum PropertyType {
        ANCESTOR,
        XFACTOR
    }
    
    enum BattleResult {
        CASTLE_WIN,
        CASTLE_LOSE,
        CASTLE_DESTROYED
    }
    
    enum CacheClassInfoType {
        CLASS_TYPE,
        CLASS_STEP,
        CLASS_ANCESTOR
    }
}

contract EtheremonDataBase is EtheremonEnum, BasicAccessControl, SafeMath {
    
    uint64 public totalMonster;
    uint32 public totalClass;
    
    // read
    function getSizeArrayType(ArrayType _type, uint64 _id) constant public returns(uint);
    function getElementInArrayType(ArrayType _type, uint64 _id, uint _index) constant public returns(uint8);
    function getMonsterClass(uint32 _classId) constant public returns(uint32 classId, uint256 price, uint256 returnPrice, uint32 total, bool catchable);
    function getMonsterObj(uint64 _objId) constant public returns(uint64 objId, uint32 classId, address trainer, uint32 exp, uint32 createIndex, uint32 lastClaimIndex, uint createTime);
    function getMonsterName(uint64 _objId) constant public returns(string name);
    function getExtraBalance(address _trainer) constant public returns(uint256);
    function getMonsterDexSize(address _trainer) constant public returns(uint);
    function getMonsterObjId(address _trainer, uint index) constant public returns(uint64);
    function getExpectedBalance(address _trainer) constant public returns(uint256);
    function getMonsterReturn(uint64 _objId) constant public returns(uint256 current, uint256 total);
}

interface EtheremonTradeInterface {
    function isOnTrading(uint64 _objId) constant external returns(bool);
}

interface EtheremonPaymentInterface {
    function giveBattleBonus(address _trainer, uint _amount) public; 
}

contract EtheremonGateway is EtheremonEnum, BasicAccessControl {
    // using for battle contract later
    function increaseMonsterExp(uint64 _objId, uint32 amount) onlyModerators public;
    function decreaseMonsterExp(uint64 _objId, uint32 amount) onlyModerators public;
    
    // read 
    function isGason(uint64 _objId) constant external returns(bool);
    function getObjBattleInfo(uint64 _objId) constant external returns(uint32 classId, uint32 exp, bool isGason, 
        uint ancestorLength, uint xfactorsLength);
    function getClassPropertySize(uint32 _classId, PropertyType _type) constant external returns(uint);
    function getClassPropertyValue(uint32 _classId, PropertyType _type, uint index) constant external returns(uint32);
}

contract EtheremonCastleContract is EtheremonEnum, BasicAccessControl{

    uint32 public totalCastle = 0;
    uint64 public totalBattle = 0;
    
    function getCastleBasicInfo(address _owner) constant external returns(uint32, uint, uint32);
    function getCastleBasicInfoById(uint32 _castleId) constant external returns(uint, address, uint32);
    function countActiveCastle() constant external returns(uint);
    function getCastleObjInfo(uint32 _castleId) constant external returns(uint64, uint64, uint64, uint64, uint64, uint64);
    function getCastleStats(uint32 _castleId) constant external returns(string, address, uint32, uint32, uint32, uint);
    function isOnCastle(uint32 _castleId, uint64 _objId) constant external returns(bool);
    function getCastleWinLose(uint32 _castleId) constant external returns(uint32, uint32, uint32);
    function getTrainerBrick(address _trainer) constant external returns(uint32);

    function addCastle(address _trainer, string _name, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3, uint32 _brickNumber) 
        onlyModerators external returns(uint32 currentCastleId);
    function renameCastle(uint32 _castleId, string _name) onlyModerators external;
    function removeCastleFromActive(uint32 _castleId) onlyModerators external;
    function deductTrainerBrick(address _trainer, uint32 _deductAmount) onlyModerators external returns(bool);
    
    function addBattleLog(uint32 _castleId, address _attacker, 
        uint8 _ran1, uint8 _ran2, uint8 _ran3, uint8 _result, uint32 _castleExp1, uint32 _castleExp2, uint32 _castleExp3) onlyModerators external returns(uint64);
    function addBattleLogMonsterInfo(uint64 _battleId, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3, uint32 _exp1, uint32 _exp2, uint32 _exp3) onlyModerators external;
}

contract EtheremonBattle is EtheremonEnum, BasicAccessControl, SafeMath {
    uint8 constant public NO_MONSTER = 3;
    uint8 constant public STAT_COUNT = 6;
    uint8 constant public GEN0_NO = 24;
    
    struct MonsterClassAcc {
        uint32 classId;
        uint256 price;
        uint256 returnPrice;
        uint32 total;
        bool catchable;
    }

    struct MonsterObjAcc {
        uint64 monsterId;
        uint32 classId;
        address trainer;
        string name;
        uint32 exp;
        uint32 createIndex;
        uint32 lastClaimIndex;
        uint createTime;
    }
    
    struct BattleMonsterData {
        uint64 a1;
        uint64 a2;
        uint64 a3;
        uint64 s1;
        uint64 s2;
        uint64 s3;
    }

    struct SupporterData {
        uint32 classId1;
        bool isGason1;
        uint8 type1;
        uint32 classId2;
        bool isGason2;
        uint8 type2;
        uint32 classId3;
        bool isGason3;
        uint8 type3;
    }

    struct AttackData {
        uint64 aa;
        SupporterData asup;
        uint16 aAttackSupport;
        uint64 ba;
        SupporterData bsup;
        uint16 bAttackSupport;
        uint8 index;
    }
    
    struct MonsterBattleLog {
        uint64 objId;
        uint32 exp;
    }
    
    struct BattleLogData {
        address castleOwner;
        uint64 battleId;
        uint32 castleId;
        uint32[3] temp;
        uint castleIndex;
        uint8[6] monsterLevel;
        uint8[3] randoms;
        bool win;
        BattleResult result;
    }
    
    struct CacheClassInfo {
        uint8[] types;
        uint8[] steps;
        uint32[] ancestors;
    }
    
    struct CastleData {
        address trainer;
        string name;
        uint32 brickNumber;
        uint64 a1;
        uint64 a2;
        uint64 a3;
        uint64 s1;
        uint64 s2;
        uint64 s3;
    }

    // event
    event EventCreateCastle(address indexed owner, uint32 castleId);
    event EventAttackCastle(address indexed attacker, uint32 castleId, uint8 result);
    event EventRemoveCastle(uint32 indexed castleId);
    
    // linked smart contract
    address public worldContract;
    address public dataContract;
    address public tradeContract;
    address public castleContract;
    address public paymentContract;
    
    // global variable
    mapping(uint8 => uint8) typeAdvantages;
    mapping(uint32 => CacheClassInfo) cacheClasses;
    mapping(uint8 => uint32) levelExps;
    uint8 public ancestorBuffPercentage = 10;
    uint8 public gasonBuffPercentage = 10;
    uint8 public typeBuffPercentage = 20;
    uint8 public maxLevel = 100;
    uint16 public maxActiveCastle = 30;
    uint8 public maxRandomRound = 4;
    
    uint8 public winBrickReturn = 8;
    uint32 public castleMinBrick = 5;
    uint8 public castleExpAdjustment = 150; // percentage
    uint8 public attackerExpAdjustment = 50; // percentage
    uint8 public levelExpAdjustment = 3; // level
    uint8 public castleMaxLevelGap = 5;
    uint public brickETHPrice = 0.004 ether;
    uint8 public minHpDeducted = 10;
    uint public winTokenReward = 10 ** 8;
    
    uint256 public totalEarn = 0;
    uint256 public totalWithdraw = 0;
    
    address private lastAttacker = address(0x0);
    
    // modifier
    modifier requireDataContract {
        require(dataContract != address(0));
        _;
    }
    
    modifier requireTradeContract {
        require(tradeContract != address(0));
        _;
    }
    
    modifier requireCastleContract {
        require(castleContract != address(0));
        _;
    }
    
    modifier requireWorldContract {
        require(worldContract != address(0));
        _;
    }
    
    modifier requirePaymentContract {
        require(paymentContract != address(0));
        _;
    }


    function EtheremonBattle(address _dataContract, address _worldContract, address _tradeContract, address _castleContract, address _paymentContract) public {
        dataContract = _dataContract;
        worldContract = _worldContract;
        tradeContract = _tradeContract;
        castleContract = _castleContract;
        paymentContract = _paymentContract;
    }
    
     // admin & moderators
    function setTypeAdvantages() onlyModerators external {
        typeAdvantages[1] = 14;
        typeAdvantages[2] = 16;
        typeAdvantages[3] = 8;
        typeAdvantages[4] = 9;
        typeAdvantages[5] = 2;
        typeAdvantages[6] = 11;
        typeAdvantages[7] = 3;
        typeAdvantages[8] = 5;
        typeAdvantages[9] = 15;
        typeAdvantages[11] = 18;
        // skipp 10
        typeAdvantages[12] = 7;
        typeAdvantages[13] = 6;
        typeAdvantages[14] = 17;
        typeAdvantages[15] = 13;
        typeAdvantages[16] = 12;
        typeAdvantages[17] = 1;
        typeAdvantages[18] = 4;
    }
    
    function setTypeAdvantage(uint8 _type1, uint8 _type2) onlyModerators external {
        typeAdvantages[_type1] = _type2;
    }
    
    function setCacheClassInfo(uint32 _classId) onlyModerators requireDataContract requireWorldContract public {
        EtheremonDataBase data = EtheremonDataBase(dataContract);
         EtheremonGateway gateway = EtheremonGateway(worldContract);
        uint i = 0;
        CacheClassInfo storage classInfo = cacheClasses[_classId];

        // add type
        i = data.getSizeArrayType(ArrayType.CLASS_TYPE, uint64(_classId));
        uint8[] memory aTypes = new uint8[](i);
        for(; i > 0 ; i--) {
            aTypes[i-1] = data.getElementInArrayType(ArrayType.CLASS_TYPE, uint64(_classId), i-1);
        }
        classInfo.types = aTypes;

        // add steps
        i = data.getSizeArrayType(ArrayType.STAT_STEP, uint64(_classId));
        uint8[] memory steps = new uint8[](i);
        for(; i > 0 ; i--) {
            steps[i-1] = data.getElementInArrayType(ArrayType.STAT_STEP, uint64(_classId), i-1);
        }
        classInfo.steps = steps;
        
        // add ancestor
        i = gateway.getClassPropertySize(_classId, PropertyType.ANCESTOR);
        uint32[] memory ancestors = new uint32[](i);
        for(; i > 0 ; i--) {
            ancestors[i-1] = gateway.getClassPropertyValue(_classId, PropertyType.ANCESTOR, i-1);
        }
        classInfo.ancestors = ancestors;
    }
    
    function fastSetCacheClassInfo(uint32 _classId1, uint32 _classId2, uint32 _classId3, uint32 _classId4, uint32 _classId5, uint32 _classId6, uint32 _classId7, uint32 _classId8) 
        onlyModerators requireDataContract requireWorldContract public {
        setCacheClassInfo(_classId1);
        setCacheClassInfo(_classId2);
        setCacheClassInfo(_classId3);
        setCacheClassInfo(_classId4);
        setCacheClassInfo(_classId5);
        setCacheClassInfo(_classId6);
        setCacheClassInfo(_classId7);
        setCacheClassInfo(_classId8);
    }    
     
    function withdrawEther(address _sendTo, uint _amount) onlyModerators external {
        if (_amount > this.balance) {
            revert();
        }
        uint256 validAmount = safeSubtract(totalEarn, totalWithdraw);
        if (_amount > validAmount) {
            revert();
        }
        totalWithdraw += _amount;
        _sendTo.transfer(_amount);
    }
    
    function setContract(address _dataContract, address _worldContract, address _tradeContract, address _castleContract, address _paymentContract) onlyModerators external {
        dataContract = _dataContract;
        worldContract = _worldContract;
        tradeContract = _tradeContract;
        castleContract = _castleContract;
        paymentContract = _paymentContract;
    }
    
    function setConfig(uint8 _ancestorBuffPercentage, uint8 _gasonBuffPercentage, uint8 _typeBuffPercentage, 
        uint8 _maxLevel, uint8 _maxRandomRound, uint8 _minHpDeducted, uint _winTokenReward) onlyModerators external{
        ancestorBuffPercentage = _ancestorBuffPercentage;
        gasonBuffPercentage = _gasonBuffPercentage;
        typeBuffPercentage = _typeBuffPercentage;
        maxLevel = _maxLevel;
        maxRandomRound = _maxRandomRound;
        minHpDeducted = _minHpDeducted;
        winTokenReward = _winTokenReward;
    }
    
    function setCastleConfig(uint8 _castleMaxLevelGap, uint16 _maxActiveCastle, uint _brickETHPrice, uint8 _castleExpAdjustment, uint8 _attackerExpAdjustment, uint8 _levelExpAdjustment, uint32 _castleMinBrick) onlyModerators external {
        castleMaxLevelGap = _castleMaxLevelGap;
        maxActiveCastle = _maxActiveCastle;
        brickETHPrice = _brickETHPrice;
        castleExpAdjustment = _castleExpAdjustment;
        attackerExpAdjustment = _attackerExpAdjustment;
        levelExpAdjustment = _levelExpAdjustment;
        castleMinBrick = _castleMinBrick;
    }
    
    function genLevelExp() onlyModerators external {
        uint8 level = 1;
        uint32 requirement = 100;
        uint32 sum = requirement;
        while(level <= 100) {
            levelExps[level] = sum;
            level += 1;
            requirement = (requirement * 11) / 10 + 5;
            sum += requirement;
        }
    }
    
    // public 
    function getCacheClassSize(uint32 _classId) constant public returns(uint, uint, uint) {
        CacheClassInfo storage classInfo = cacheClasses[_classId];
        return (classInfo.types.length, classInfo.steps.length, classInfo.ancestors.length);
    }
    
    function getRandom(uint8 maxRan, uint8 index, address priAddress) constant public returns(uint8) {
        uint256 genNum = uint256(block.blockhash(block.number-1)) + uint256(priAddress);
        for (uint8 i = 0; i < index && i < 6; i ++) {
            genNum /= 256;
        }
        return uint8(genNum % maxRan);
    }
    
    function getLevel(uint32 exp) view public returns (uint8) {
        uint8 minIndex = 1;
        uint8 maxIndex = 100;
        uint8 currentIndex;
     
        while (minIndex < maxIndex) {
            currentIndex = (minIndex + maxIndex) / 2;
            if (exp < levelExps[currentIndex])
                maxIndex = currentIndex;
            else
                minIndex = currentIndex + 1;
        }

        return minIndex;
    }
    
    function getGainExp(uint8 level2, uint8 level, bool _win) constant public returns(uint32){
        uint8 halfLevel1 = level;
        if (level > level2 + 3) {
            halfLevel1 = (level2 + 3) / 2;
        } else {
            halfLevel1 = level / 2;
        }
        uint32 gainExp = 1;
        uint256 rate = (21 ** uint256(halfLevel1)) * 1000 / (20 ** uint256(halfLevel1));
        rate = rate * rate;
        if ((level > level2 + 3 && level2 + 3 > 2 * halfLevel1) || (level <= level2 + 3 && level > 2 * halfLevel1)) rate = rate * 21 / 20;
        if (_win) {
            gainExp = uint32(30 * rate / 1000000);
        } else {
            gainExp = uint32(10 * rate / 1000000);
        }
        
        if (level2 >= level + levelExpAdjustment) {
            gainExp /= uint32(2) ** ((level2 - level) / levelExpAdjustment);
        }
        return gainExp;
    }
    
    function getMonsterLevel(uint64 _objId) constant external returns(uint32, uint8) {
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        uint32 _ = 0;
        (obj.monsterId, obj.classId, obj.trainer, obj.exp, _, _, obj.createTime) = data.getMonsterObj(_objId);
     
        return (obj.exp, getLevel(obj.exp));
    }
    
    function getMonsterCP(uint64 _objId) constant external returns(uint64) {
        uint16[6] memory stats;
        uint32 classId = 0;
        uint32 exp = 0;
        (classId, exp, stats) = getCurrentStats(_objId);
        
        uint256 total;
        for(uint i=0; i < STAT_COUNT; i+=1) {
            total += stats[i];
        }
        return uint64(total/STAT_COUNT);
    }
    
    function isOnBattle(uint64 _objId) constant external returns(bool) {
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        EtheremonCastleContract castle = EtheremonCastleContract(castleContract);
        uint32 castleId;
        uint castleIndex = 0;
        uint256 price = 0;
        MonsterObjAcc memory obj;
        (obj.monsterId, obj.classId, obj.trainer, obj.exp, obj.createIndex, obj.lastClaimIndex, obj.createTime) = data.getMonsterObj(_objId);
        (castleId, castleIndex, price) = castle.getCastleBasicInfo(obj.trainer);
        if (castleId > 0 && castleIndex > 0)
            return castle.isOnCastle(castleId, _objId);
        return false;
    }
    
    function isValidOwner(uint64 _objId, address _owner) constant public returns(bool) {
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        (obj.monsterId, obj.classId, obj.trainer, obj.exp, obj.createIndex, obj.lastClaimIndex, obj.createTime) = data.getMonsterObj(_objId);
        return (obj.trainer == _owner && obj.classId != 21);
    }
    
    function getObjExp(uint64 _objId) constant public returns(uint32, uint32) {
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        MonsterObjAcc memory obj;
        uint32 _ = 0;
        (_objId, obj.classId, obj.trainer, obj.exp, _, _, obj.createTime) = data.getMonsterObj(_objId);
        return (obj.classId, obj.exp);
    }
    
    function getCurrentStats(uint64 _objId) constant public returns(uint32, uint8, uint16[6]){
        EtheremonDataBase data = EtheremonDataBase(dataContract);
        uint16[6] memory stats;
        uint32 classId;
        uint32 exp;
        (classId, exp) = getObjExp(_objId);
        if (classId == 0)
            return (classId, 0, stats);
        
        uint i = 0;
        uint8 level = getLevel(exp);
        for(i=0; i < STAT_COUNT; i+=1) {
            stats[i] = data.getElementInArrayType(ArrayType.STAT_BASE, _objId, i);
        }
        for(i=0; i < cacheClasses[classId].steps.length; i++) {
            stats[i] += uint16(safeMult(cacheClasses[classId].steps[i], level*3));
        }
        return (classId, level, stats);
    }
    
    function safeDeduct(uint16 a, uint16 b) pure private returns(uint16){
        if (a > b) {
            return a - b;
        }
        return 0;
    }
    
    function calHpDeducted(uint16 _attack, uint16 _specialAttack, uint16 _defense, uint16 _specialDefense, bool _lucky) view public returns(uint16){
        if (_lucky) {
            _attack = _attack * 13 / 10;
            _specialAttack = _specialAttack * 13 / 10;
        }
        uint16 hpDeducted = safeDeduct(_attack, _defense * 3 /4);
        uint16 hpSpecialDeducted = safeDeduct(_specialAttack, _specialDefense* 3 / 4);
        if (hpDeducted < minHpDeducted && hpSpecialDeducted < minHpDeducted)
            return minHpDeducted;
        if (hpDeducted > hpSpecialDeducted)
            return hpDeducted;
        return hpSpecialDeducted;
    }
    
    function getAncestorBuff(uint32 _classId, SupporterData _support) constant private returns(uint16){
        // check ancestors
        uint i =0;
        uint8 countEffect = 0;
        uint ancestorSize = cacheClasses[_classId].ancestors.length;
        if (ancestorSize > 0) {
            uint32 ancestorClass = 0;
            for (i=0; i < ancestorSize; i ++) {
                ancestorClass = cacheClasses[_classId].ancestors[i];
                if (ancestorClass == _support.classId1 || ancestorClass == _support.classId2 || ancestorClass == _support.classId3) {
                    countEffect += 1;
                }
            }
        }
        return countEffect * ancestorBuffPercentage;
    }
    
    function getGasonSupport(uint32 _classId, SupporterData _sup) constant private returns(uint16 defenseSupport) {
        uint i = 0;
        uint8 classType = 0;
        defenseSupport = 0;
        for (i = 0; i < cacheClasses[_classId].types.length; i++) {
            classType = cacheClasses[_classId].types[i];
             if (_sup.isGason1) {
                if (classType == _sup.type1) {
                    defenseSupport += gasonBuffPercentage;
                    continue;
                }
            }
            if (_sup.isGason2) {
                if (classType == _sup.type2) {
                    defenseSupport += gasonBuffPercentage;
                    continue;
                }
            }
            if (_sup.isGason3) {
                if (classType == _sup.type3) {
                    defenseSupport += gasonBuffPercentage;
                    continue;
                }
            }
        }
    }
    
    function getTypeSupport(uint32 _aClassId, uint32 _bClassId) constant private returns (uint16 aAttackSupport, uint16 bAttackSupport) {
        // check types 
        bool aHasAdvantage;
        bool bHasAdvantage;
        for (uint i = 0; i < cacheClasses[_aClassId].types.length; i++) {
            for (uint j = 0; j < cacheClasses[_bClassId].types.length; j++) {
                if (typeAdvantages[cacheClasses[_aClassId].types[i]] == cacheClasses[_bClassId].types[j]) {
                    aHasAdvantage = true;
                }
                if (typeAdvantages[cacheClasses[_bClassId].types[j]] == cacheClasses[_aClassId].types[i]) {
                    bHasAdvantage = true;
                }
            }
        }
        
        if (aHasAdvantage)
            aAttackSupport += typeBuffPercentage;
        if (bHasAdvantage)
            bAttackSupport += typeBuffPercentage;
    }
    
    function calculateBattleStats(AttackData att) constant private returns(uint8 aLevel, uint16[6] aStats, uint8 bLevel, uint16[6] bStats) {
        uint32 aClassId = 0;
        (aClassId, aLevel, aStats) = getCurrentStats(att.aa);
        uint32 bClassId = 0;
        (bClassId, bLevel, bStats) = getCurrentStats(att.ba);
        
        // check gasonsupport
        (att.aAttackSupport, att.bAttackSupport) = getTypeSupport(aClassId, bClassId);
        att.aAttackSupport += getAncestorBuff(aClassId, att.asup);
        att.bAttackSupport += getAncestorBuff(bClassId, att.bsup);
        
        uint16 aDefenseBuff = getGasonSupport(aClassId, att.asup);
        uint16 bDefenseBuff = getGasonSupport(bClassId, att.bsup);
        
        // add attack
        aStats[1] += aStats[1] * att.aAttackSupport / 100;
        aStats[3] += aStats[3] * att.aAttackSupport / 100;
        bStats[1] += bStats[1] * att.bAttackSupport / 100;
        bStats[3] += bStats[3] * att.bAttackSupport / 100;
        
        // add offense
        aStats[2] += aStats[2] * aDefenseBuff / 100;
        aStats[4] += aStats[4] * aDefenseBuff / 100;
        bStats[2] += bStats[2] * bDefenseBuff / 100;
        bStats[4] += bStats[4] * bDefenseBuff / 100;
        
    }
    
    function attack(AttackData att) constant private returns(uint8 aLevel, uint8 bLevel, uint8 ran, bool win) {
        uint16[6] memory aStats;
        uint16[6] memory bStats;
        (aLevel, aStats, bLevel, bStats) = calculateBattleStats(att);
        
        ran = getRandom(maxRandomRound+2, att.index, lastAttacker);
        uint16 round = 0;
        while (round < maxRandomRound && aStats[0] > 0 && bStats[0] > 0) {
            if (aStats[5] > bStats[5]) {
                if (round % 2 == 0) {
                    // a attack 
                    bStats[0] = safeDeduct(bStats[0], calHpDeducted(aStats[1], aStats[3], bStats[2], bStats[4], round==ran));
                } else {
                    aStats[0] = safeDeduct(aStats[0], calHpDeducted(bStats[1], bStats[3], aStats[2], aStats[4], round==ran));
                }
                
            } else {
                if (round % 2 != 0) {
                    bStats[0] = safeDeduct(bStats[0], calHpDeducted(aStats[1], aStats[3], bStats[2], bStats[4], round==ran));
                } else {
                    aStats[0] = safeDeduct(aStats[0], calHpDeducted(bStats[1], bStats[3], aStats[2], aStats[4], round==ran));
                }
            }
            round+= 1;
        }
        
        win = aStats[0] >= bStats[0];
    }
    
    function updateCastle(uint32 _castleId, address _castleOwner, bool win) requireCastleContract private{
        EtheremonCastleContract castle = EtheremonCastleContract(castleContract);
        uint32 totalWin;
        uint32 totalLose;
        uint32 brickNumber;
        (totalWin, totalLose, brickNumber) = castle.getCastleWinLose(_castleId);
        EtheremonPaymentInterface payment = EtheremonPaymentInterface(paymentContract);
        
        // if castle win, ignore
        if (win) {
            if (totalWin < brickNumber) {
                 payment.giveBattleBonus(_castleOwner, winTokenReward);
            }
        } else {
            if (totalWin/winBrickReturn > brickNumber) {
                brickNumber = 2 * brickNumber;
            } else {
                brickNumber += totalWin/winBrickReturn;
            }
            if (brickNumber <= totalLose + 1) {
                castle.removeCastleFromActive(_castleId);
                // destroy
            }
            payment.giveBattleBonus(msg.sender, winTokenReward);
        }
    }
    
    function hasValidParam(address _trainer, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3) constant public returns(bool) {
        if (_a1 == 0 || _a2 == 0 || _a3 == 0)
            return false;
        if (_a1 == _a2 || _a1 == _a3 || _a1 == _s1 || _a1 == _s2 || _a1 == _s3)
            return false;
        if (_a2 == _a3 || _a2 == _s1 || _a2 == _s2 || _a2 == _s3)
            return false;
        if (_a3 == _s1 || _a3 == _s2 || _a3 == _s3)
            return false;
        if (_s1 > 0 && (_s1 == _s2 || _s1 == _s3))
            return false;
        if (_s2 > 0 && (_s2 == _s3))
            return false;
        
        if (!isValidOwner(_a1, _trainer) || !isValidOwner(_a2, _trainer) || !isValidOwner(_a3, _trainer))
            return false;
        if (_s1 > 0 && !isValidOwner(_s1, _trainer))
            return false;
        if (_s2 > 0 && !isValidOwner(_s2, _trainer))
            return false;
        if (_s3 > 0 && !isValidOwner(_s3, _trainer))
            return false;
        return true;
    }
    
    function createCastleInternal(CastleData _castleData) private {
        EtheremonCastleContract castle = EtheremonCastleContract(castleContract);
        uint32 castleId;
        uint castleIndex = 0;
        uint32 numberBrick = 0;
        (castleId, castleIndex, numberBrick) = castle.getCastleBasicInfo(_castleData.trainer);
        if (castleId > 0 || castleIndex > 0)
            revert();

        if (castle.countActiveCastle() >= uint(maxActiveCastle))
            revert();
        castleId = castle.addCastle(_castleData.trainer, _castleData.name, _castleData.a1, _castleData.a2, _castleData.a3, 
            _castleData.s1, _castleData.s2, _castleData.s3, _castleData.brickNumber);
        EventCreateCastle(_castleData.trainer, castleId);
    }
    
    // public
    
    function createCastle(string _name, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3) isActive requireDataContract 
        requireTradeContract requireCastleContract payable external {
        
        if (!hasValidParam(msg.sender, _a1, _a2, _a3, _s1, _s2, _s3))
            revert();
        
        EtheremonTradeInterface trade = EtheremonTradeInterface(tradeContract);
        if (trade.isOnTrading(_a1) || trade.isOnTrading(_a2) || trade.isOnTrading(_a3) || 
            trade.isOnTrading(_s1) || trade.isOnTrading(_s2) || trade.isOnTrading(_s3))
            revert();
        
        uint32 numberBrick = uint32(msg.value / brickETHPrice);
        if (numberBrick < castleMinBrick) {
            revert();
        }
        
        CastleData memory castleData;
        castleData.trainer = msg.sender;
        castleData.name = _name;
        castleData.brickNumber = numberBrick;
        castleData.a1 = _a1;
        castleData.a2 = _a2;
        castleData.a3 = _a3;
        castleData.s1 = _s1;
        castleData.s2 = _s2;
        castleData.s3 = _s3;
        createCastleInternal(castleData);
        totalEarn += msg.value;
    }
    
    function createCastleWithToken(address _trainer, uint32 _noBrick, string _name, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3) isActive requireDataContract
        requireTradeContract requireCastleContract requirePaymentContract external {
        // only accept request from payment contract
        if (msg.sender != paymentContract)
            revert();
    
        if (!hasValidParam(_trainer, _a1, _a2, _a3, _s1, _s2, _s3))
            revert();
        
        EtheremonTradeInterface trade = EtheremonTradeInterface(tradeContract);
        if (trade.isOnTrading(_a1) || trade.isOnTrading(_a2) || trade.isOnTrading(_a3) || 
            trade.isOnTrading(_s1) || trade.isOnTrading(_s2) || trade.isOnTrading(_s3))
            revert();
        
        if (_noBrick < castleMinBrick) {
            revert();
        }
        
        CastleData memory castleData;
        castleData.trainer = _trainer;
        castleData.name = _name;
        castleData.brickNumber = _noBrick;
        castleData.a1 = _a1;
        castleData.a2 = _a2;
        castleData.a3 = _a3;
        castleData.s1 = _s1;
        castleData.s2 = _s2;
        castleData.s3 = _s3;
        createCastleInternal(castleData);
    }
    
    function renameCastle(uint32 _castleId, string _name) isActive requireCastleContract external {
        EtheremonCastleContract castle = EtheremonCastleContract(castleContract);
        uint index;
        address owner;
        uint256 price;
        (index, owner, price) = castle.getCastleBasicInfoById(_castleId);
        if (owner != msg.sender)
            revert();
        castle.renameCastle(_castleId, _name);
    }
    
    function removeCastle(uint32 _castleId) isActive requireCastleContract external {
        EtheremonCastleContract castle = EtheremonCastleContract(castleContract);
        uint index;
        address owner;
        uint256 price;
        (index, owner, price) = castle.getCastleBasicInfoById(_castleId);
        if (owner != msg.sender)
            revert();
        if (index > 0) {
            castle.removeCastleFromActive(_castleId);
        }
        EventRemoveCastle(_castleId);
    }
    
    function getSupporterInfo(uint64 s1, uint64 s2, uint64 s3) constant public returns(SupporterData sData) {
        uint temp;
        uint32 __;
        EtheremonGateway gateway = EtheremonGateway(worldContract);
        if (s1 > 0)
            (sData.classId1, __, sData.isGason1, temp, temp) = gateway.getObjBattleInfo(s1);
        if (s2 > 0)
            (sData.classId2, __, sData.isGason2, temp, temp) = gateway.getObjBattleInfo(s2);
        if (s3 > 0)
            (sData.classId3, __, sData.isGason3, temp, temp) = gateway.getObjBattleInfo(s3);

        EtheremonDataBase data = EtheremonDataBase(dataContract);
        if (sData.isGason1) {
            sData.type1 = data.getElementInArrayType(ArrayType.CLASS_TYPE, uint64(sData.classId1), 0);
        }
        
        if (sData.isGason2) {
            sData.type2 = data.getElementInArrayType(ArrayType.CLASS_TYPE, uint64(sData.classId2), 0);
        }
        
        if (sData.isGason3) {
            sData.type3 = data.getElementInArrayType(ArrayType.CLASS_TYPE, uint64(sData.classId3), 0);
        }
    }
    
    function attackCastle(uint32 _castleId, uint64 _aa1, uint64 _aa2, uint64 _aa3, uint64 _as1, uint64 _as2, uint64 _as3) isActive requireDataContract 
        requireTradeContract requireCastleContract requirePaymentContract external {
        if (!hasValidParam(msg.sender, _aa1, _aa2, _aa3, _as1, _as2, _as3))
            revert();
        
        EtheremonCastleContract castle = EtheremonCastleContract(castleContract);
        BattleLogData memory log;
        (log.castleIndex, log.castleOwner, log.temp[0]) = castle.getCastleBasicInfoById(_castleId);
        if (log.castleIndex == 0 || log.castleOwner == msg.sender)
            revert();
        
        EtheremonGateway gateway = EtheremonGateway(worldContract);
        BattleMonsterData memory b;
        (b.a1, b.a2, b.a3, b.s1, b.s2, b.s3) = castle.getCastleObjInfo(_castleId);
        lastAttacker = msg.sender;

        // init data
        uint8 countWin = 0;
        AttackData memory att;
        att.asup = getSupporterInfo(b.s1, b.s2, b.s3);
        att.bsup = getSupporterInfo(_as1, _as2, _as3);
        
        att.index = 0;
        att.aa = b.a1;
        att.ba = _aa1;
        (log.monsterLevel[0], log.monsterLevel[3], log.randoms[0], log.win) = attack(att);
        gateway.increaseMonsterExp(att.aa, getGainExp(log.monsterLevel[0], log.monsterLevel[3], log.win)*castleExpAdjustment/100);
        gateway.increaseMonsterExp(att.ba, getGainExp(log.monsterLevel[3], log.monsterLevel[0], !log.win)*attackerExpAdjustment/100);
        if (log.win)
            countWin += 1;
        
        
        att.index = 1;
        att.aa = b.a2;
        att.ba = _aa2;
        (log.monsterLevel[1], log.monsterLevel[4], log.randoms[1], log.win) = attack(att);
        gateway.increaseMonsterExp(att.aa, getGainExp(log.monsterLevel[1], log.monsterLevel[4], log.win)*castleExpAdjustment/100);
        gateway.increaseMonsterExp(att.ba, getGainExp(log.monsterLevel[4], log.monsterLevel[1], !log.win)*attackerExpAdjustment/100);
        if (log.win)
            countWin += 1;   

        att.index = 2;
        att.aa = b.a3;
        att.ba = _aa3;
        (log.monsterLevel[2], log.monsterLevel[5], log.randoms[2], log.win) = attack(att);
        gateway.increaseMonsterExp(att.aa, getGainExp(log.monsterLevel[2], log.monsterLevel[5], log.win)*castleExpAdjustment/100);
        gateway.increaseMonsterExp(att.ba, getGainExp(log.monsterLevel[5], log.monsterLevel[2], !log.win)*attackerExpAdjustment/100);
        if (log.win)
            countWin += 1; 
        
        if ((log.monsterLevel[0] + log.monsterLevel[1] + log.monsterLevel[2])/3 + castleMaxLevelGap < (log.monsterLevel[3] + log.monsterLevel[4] + log.monsterLevel[5])/3)
            revert();
        
        updateCastle(_castleId, log.castleOwner, countWin>1);
        if (countWin>1) {
            log.result = BattleResult.CASTLE_WIN;
        } else {
            log.result = BattleResult.CASTLE_LOSE;
        }
        
        log.temp[0] = levelExps[log.monsterLevel[0]]-1;
        log.temp[1] = levelExps[log.monsterLevel[1]]-1;
        log.temp[2] = levelExps[log.monsterLevel[2]]-1;
        log.battleId = castle.addBattleLog(_castleId, msg.sender, log.randoms[0], log.randoms[1], log.randoms[2], 
            uint8(log.result), log.temp[0], log.temp[1], log.temp[2]);
        
        log.temp[0] = levelExps[log.monsterLevel[3]]-1;
        log.temp[1] = levelExps[log.monsterLevel[4]]-1;
        log.temp[2] = levelExps[log.monsterLevel[5]]-1;
        castle.addBattleLogMonsterInfo(log.battleId, _aa1, _aa2, _aa3, _as1, _as2, _as3, log.temp[0], log.temp[1], log.temp[2]);
    
        EventAttackCastle(msg.sender, _castleId, uint8(log.result));
    }
    
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_castleMaxLevelGap","type":"uint8"},{"name":"_maxActiveCastle","type":"uint16"},{"name":"_brickETHPrice","type":"uint256"},{"name":"_castleExpAdjustment","type":"uint8"},{"name":"_attackerExpAdjustment","type":"uint8"},{"name":"_levelExpAdjustment","type":"uint8"},{"name":"_castleMinBrick","type":"uint32"}],"name":"setCastleConfig","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"}],"name":"getMonsterCP","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dataContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"attackerExpAdjustment","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"moderators","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"worldContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_trainer","type":"address"},{"name":"_a1","type":"uint64"},{"name":"_a2","type":"uint64"},{"name":"_a3","type":"uint64"},{"name":"_s1","type":"uint64"},{"name":"_s2","type":"uint64"},{"name":"_s3","type":"uint64"}],"name":"hasValidParam","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"}],"name":"getObjExp","outputs":[{"name":"","type":"uint32"},{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"levelExpAdjustment","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"brickETHPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_attack","type":"uint16"},{"name":"_specialAttack","type":"uint16"},{"name":"_defense","type":"uint16"},{"name":"_specialDefense","type":"uint16"},{"name":"_lucky","type":"bool"}],"name":"calHpDeducted","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_dataContract","type":"address"},{"name":"_worldContract","type":"address"},{"name":"_tradeContract","type":"address"},{"name":"_castleContract","type":"address"},{"name":"_paymentContract","type":"address"}],"name":"setContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_ancestorBuffPercentage","type":"uint8"},{"name":"_gasonBuffPercentage","type":"uint8"},{"name":"_typeBuffPercentage","type":"uint8"},{"name":"_maxLevel","type":"uint8"},{"name":"_maxRandomRound","type":"uint8"},{"name":"_minHpDeducted","type":"uint8"},{"name":"_winTokenReward","type":"uint256"}],"name":"setConfig","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_type1","type":"uint8"},{"name":"_type2","type":"uint8"}],"name":"setTypeAdvantage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"genLevelExp","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setTypeAdvantages","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"}],"name":"isOnBattle","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"maxRan","type":"uint8"},{"name":"index","type":"uint8"},{"name":"priAddress","type":"address"}],"name":"getRandom","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"level2","type":"uint8"},{"name":"level","type":"uint8"},{"name":"_win","type":"bool"}],"name":"getGainExp","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_castleId","type":"uint32"},{"name":"_name","type":"string"}],"name":"renameCastle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalWithdraw","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_castleId","type":"uint32"},{"name":"_aa1","type":"uint64"},{"name":"_aa2","type":"uint64"},{"name":"_aa3","type":"uint64"},{"name":"_as1","type":"uint64"},{"name":"_as2","type":"uint64"},{"name":"_as3","type":"uint64"}],"name":"attackCastle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_isMaintaining","type":"bool"}],"name":"UpdateMaintaining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"castleMinBrick","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_a1","type":"uint64"},{"name":"_a2","type":"uint64"},{"name":"_a3","type":"uint64"},{"name":"_s1","type":"uint64"},{"name":"_s2","type":"uint64"},{"name":"_s3","type":"uint64"}],"name":"createCastle","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"totalModerators","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_classId","type":"uint32"}],"name":"getCacheClassSize","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sendTo","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"s1","type":"uint64"},{"name":"s2","type":"uint64"},{"name":"s3","type":"uint64"}],"name":"getSupporterInfo","outputs":[{"components":[{"name":"classId1","type":"uint32"},{"name":"isGason1","type":"bool"},{"name":"type1","type":"uint8"},{"name":"classId2","type":"uint32"},{"name":"isGason2","type":"bool"},{"name":"type2","type":"uint8"},{"name":"classId3","type":"uint32"},{"name":"isGason3","type":"bool"},{"name":"type3","type":"uint8"}],"name":"sData","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"castleMaxLevelGap","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"winBrickReturn","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newModerator","type":"address"}],"name":"AddModerator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"GEN0_NO","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"NO_MONSTER","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"}],"name":"getCurrentStats","outputs":[{"name":"","type":"uint32"},{"name":"","type":"uint8"},{"name":"","type":"uint16[6]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ancestorBuffPercentage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"typeBuffPercentage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"castleExpAdjustment","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_classId","type":"uint32"}],"name":"setCacheClassInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"winTokenReward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paymentContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxActiveCastle","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_trainer","type":"address"},{"name":"_noBrick","type":"uint32"},{"name":"_name","type":"string"},{"name":"_a1","type":"uint64"},{"name":"_a2","type":"uint64"},{"name":"_a3","type":"uint64"},{"name":"_s1","type":"uint64"},{"name":"_s2","type":"uint64"},{"name":"_s3","type":"uint64"}],"name":"createCastleWithToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"exp","type":"uint32"}],"name":"getLevel","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_classId1","type":"uint32"},{"name":"_classId2","type":"uint32"},{"name":"_classId3","type":"uint32"},{"name":"_classId4","type":"uint32"},{"name":"_classId5","type":"uint32"},{"name":"_classId6","type":"uint32"},{"name":"_classId7","type":"uint32"},{"name":"_classId8","type":"uint32"}],"name":"fastSetCacheClassInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_oldModerator","type":"address"}],"name":"RemoveModerator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxLevel","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minHpDeducted","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"}],"name":"getMonsterLevel","outputs":[{"name":"","type":"uint32"},{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_castleId","type":"uint32"}],"name":"removeCastle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gasonBuffPercentage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"STAT_COUNT","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_objId","type":"uint64"},{"name":"_owner","type":"address"}],"name":"isValidOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEarn","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"castleContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxRandomRound","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isMaintaining","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"ChangeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tradeContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_dataContract","type":"address"},{"name":"_worldContract","type":"address"},{"name":"_tradeContract","type":"address"},{"name":"_castleContract","type":"address"},{"name":"_paymentContract","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"castleId","type":"uint32"}],"name":"EventCreateCastle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"attacker","type":"address"},{"indexed":false,"name":"castleId","type":"uint32"},{"indexed":false,"name":"result","type":"uint8"}],"name":"EventAttackCastle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"castleId","type":"uint32"}],"name":"EventRemoveCastle","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405260008060146101000a81548161ffff021916908361ffff1602179055506001600260006101000a81548160ff021916908315150217905550600a8060006101000a81548160ff021916908360ff160217905550600a8060016101000a81548160ff021916908360ff1602179055506014600a60026101000a81548160ff021916908360ff1602179055506064600a60036101000a81548160ff021916908360ff160217905550601e600a60046101000a81548161ffff021916908361ffff1602179055506004600a60066101000a81548160ff021916908360ff1602179055506008600a60076101000a81548160ff021916908360ff1602179055506005600a60086101000a81548163ffffffff021916908363ffffffff1602179055506096600a600c6101000a81548160ff021916908360ff1602179055506032600a600d6101000a81548160ff021916908360ff1602179055506003600a600e6101000a81548160ff021916908360ff1602179055506005600a600f6101000a81548160ff021916908360ff160217905550660e35fa931a0000600b55600a600c60006101000a81548160ff021916908360ff1602179055506305f5e100600d556000600e556000600f556000601060006101000a815481600160a060020a030219169083600160a060020a0316021790555034156101fe57600080fd5b60405160a08062005a73833981016040528080519190602001805191906020018051919060200180519190602001805160008054600160a060020a03338116600160a060020a0319928316179092556003805499831699821699909917909855600280549782166101000261010060a860020a03199098169790971790965560048054958716958816959095179094555050600580549184169185169190911790556006805492909116919092161790556157b480620002bf6000396000f3006060604052600436106102b05763ffffffff60e060020a600035041663059bd42981146102b55780630672859b146102f75780630d6688181461033257806313c10e441461036157806314d0f1ba1461038a57806318758480146103bd5780631bab0908146103d05780631cd98235146104195780631eea92c1146104595780631f2966001461046c57806320046e911461049157806320eb2a87146104d957806328064a83146105105780633171cec41461054a57806333ced3211461056957806333d24dc41461057c57806335f097f31461058f5780633a34f09a146105ae5780633eb38fc5146105d957806343b37b4514610616578063455fd6231461063e57806347cf89711461065157806348ef5aa8146106975780634a3d3c09146106af5780634aaff006146106c25780634efb023e14610701578063500e429714610714578063522f68151461075457806354f0bde714610776578063638f8da4146107a15780636b2a2691146107b45780636c81fd6d146107c757806373d65c00146107e6578063775e38f7146107f957806384be816c1461080c57806385bbb53a1461087a578063891fe1031461088d5780638a2cb24d146108a05780638da5cb5b146108b35780638fd8f783146108c65780639216b7ad146108e25780639c91dd56146108f5578063a0c66b4314610908578063b04e76681461091b578063b2cad9b71461097c578063b76d26d414610998578063b85d6275146109de578063cc06c359146109fd578063cfa8307914610a10578063d2169d2f14610a23578063d4c1516114610a64578063d542557114610a80578063d98e14bd14610a93578063da5671ad14610aa6578063dffd722f14610ad1578063eb83f01514610ae4578063ebfa3c1b14610af7578063ee4e441614610b0a578063f285329214610b1d578063ffa640d814610b3c575b600080fd5b34156102c057600080fd5b6102f560ff60043581169061ffff60243516906044359060643581169060843581169060a4351663ffffffff60c43516610b4f565b005b341561030257600080fd5b6103166001604060020a0360043516610c91565b6040516001604060020a03909116815260200160405180910390f35b341561033d57600080fd5b610345610cf1565b604051600160a060020a03909116815260200160405180910390f35b341561036c57600080fd5b610374610d00565b60405160ff909116815260200160405180910390f35b341561039557600080fd5b6103a9600160a060020a0360043516610d1a565b604051901515815260200160405180910390f35b34156103c857600080fd5b610345610d2f565b34156103db57600080fd5b6103a9600160a060020a03600435166001604060020a0360243581169060443581169060643581169060843581169060a43581169060c43516610d43565b341561042457600080fd5b6104386001604060020a036004351661103e565b60405163ffffffff9283168152911660208201526040908101905180910390f35b341561046457600080fd5b61037461112b565b341561047757600080fd5b61047f611146565b60405190815260200160405180910390f35b341561049c57600080fd5b6104c261ffff60043581169060243581169060443581169060643516608435151561114c565b60405161ffff909116815260200160405180910390f35b34156104e457600080fd5b6102f5600160a060020a03600435811690602435811690604435811690606435811690608435166111f8565b341561051b57600080fd5b6102f560ff60043581169060243581169060443581169060643581169060843581169060a4351660c4356112c6565b341561055557600080fd5b6102f560ff6004358116906024351661138e565b341561057457600080fd5b6102f56113f6565b341561058757600080fd5b6102f56114a4565b341561059a57600080fd5b6103a96001604060020a03600435166117cd565b34156105b957600080fd5b61037460ff60043581169060243516600160a060020a03604435166119ff565b34156105e457600080fd5b6105fd60ff600435811690602435166044351515611a59565b60405163ffffffff909116815260200160405180910390f35b341561062157600080fd5b6102f56004803563ffffffff169060248035908101910135611ba2565b341561064957600080fd5b61047f611d08565b341561065c57600080fd5b6102f563ffffffff600435166001604060020a0360243581169060443581169060643581169060843581169060a43581169060c43516611d0e565b34156106a257600080fd5b6102f56004351515612970565b34156106ba57600080fd5b6105fd61299e565b6102f560246004803582810192910135906001604060020a03903581169060443581169060643581169060843581169060a43581169060c435166129b6565b341561070c57600080fd5b6104c2612de9565b341561071f57600080fd5b61073063ffffffff60043516612e0b565b60405180848152602001838152602001828152602001935050505060405180910390f35b341561075f57600080fd5b6102f5600160a060020a0360043516602435612e30565b341561078157600080fd5b61047f6001604060020a0360043581169060243581169060443516612ee4565b34156107ac57600080fd5b610374613363565b34156107bf57600080fd5b61037461337f565b34156107d257600080fd5b6102f5600160a060020a0360043516613393565b34156107f157600080fd5b61037461343d565b341561080457600080fd5b610374613442565b341561081757600080fd5b61082b6001604060020a0360043516613447565b60405163ffffffff8416815260ff83166020820152604081018260c080838360005b8381101561086557808201518382015260200161084d565b50505050905001935050505060405180910390f35b341561088557600080fd5b610374613634565b341561089857600080fd5b61037461363d565b34156108ab57600080fd5b61037461364c565b34156108be57600080fd5b610345613665565b34156108d157600080fd5b6102f563ffffffff60043516613674565b34156108ed57600080fd5b61047f613c35565b341561090057600080fd5b610345613c3b565b341561091357600080fd5b6104c2613c4a565b341561092657600080fd5b6102f560048035600160a060020a0316906024803563ffffffff16916044359182019101356064356001604060020a039081169060843581169060a43581169060c43581169060e4358116906101043516613c5c565b341561098757600080fd5b61037463ffffffff600435166140a7565b34156109a357600080fd5b6102f563ffffffff60043581169060243581169060443581169060643581169060843581169060a43581169060c43581169060e4351661410a565b34156109e957600080fd5b6102f5600160a060020a03600435166141d5565b3415610a0857600080fd5b61037461427f565b3415610a1b57600080fd5b61037461428f565b3415610a2e57600080fd5b610a426001604060020a0360043516614298565b60405163ffffffff909216825260ff1660208201526040908101905180910390f35b3415610a6f57600080fd5b6102f563ffffffff60043516614395565b3415610a8b57600080fd5b610374614508565b3415610a9e57600080fd5b610374614516565b3415610ab157600080fd5b6103a96001604060020a0360043516600160a060020a036024351661451b565b3415610adc57600080fd5b61047f614639565b3415610aef57600080fd5b61034561463f565b3415610b0257600080fd5b61037461464e565b3415610b1557600080fd5b6103a9614661565b3415610b2857600080fd5b6102f5600160a060020a036004351661466a565b3415610b4757600080fd5b6103456146c1565b60005433600160a060020a0390811691161480610b8a5750600160a060020a03331660009081526001602081905260409091205460ff161515145b1515610b9557600080fd5b600a8054600b969096556fff000000000000000000000000000000199095166f0100000000000000000000000000000060ff988916021765ffff00000000191664010000000061ffff9790971696909602959095176cff00000000000000000000000019166c0100000000000000000000000093871693909302929092176dff0000000000000000000000000019166d010000000000000000000000000091861691909102176eff000000000000000000000000000019166e0100000000000000000000000000009190941602929092176bffffffff000000000000000019166801000000000000000063ffffffff9290921691909102179055565b6000610c9b6153eb565b6000808080610ca987613447565b965090945060ff169250600090505b6006811015610ce357848160068110610ccd57fe5b602002015161ffff169190910190600101610cb8565b506006900495945050505050565b600354600160a060020a031681565b600a546d0100000000000000000000000000900460ff1681565b60016020526000908152604090205460ff1681565b6002546101009004600160a060020a031681565b60006001604060020a0387161580610d6257506001604060020a038616155b80610d7457506001604060020a038516155b15610d8157506000611033565b856001604060020a0316876001604060020a03161480610db25750846001604060020a0316876001604060020a0316145b80610dce5750836001604060020a0316876001604060020a0316145b80610dea5750826001604060020a0316876001604060020a0316145b80610e065750816001604060020a0316876001604060020a0316145b15610e1357506000611033565b846001604060020a0316866001604060020a03161480610e445750836001604060020a0316866001604060020a0316145b80610e605750826001604060020a0316866001604060020a0316145b80610e7c5750816001604060020a0316866001604060020a0316145b15610e8957506000611033565b836001604060020a0316856001604060020a03161480610eba5750826001604060020a0316856001604060020a0316145b80610ed65750816001604060020a0316856001604060020a0316145b15610ee357506000611033565b6000846001604060020a0316118015610f285750826001604060020a0316846001604060020a03161480610f285750816001604060020a0316846001604060020a0316145b15610f3557506000611033565b6000836001604060020a0316118015610f5f5750816001604060020a0316836001604060020a0316145b15610f6c57506000611033565b610f76878961451b565b1580610f895750610f87868961451b565b155b80610f9b5750610f99858961451b565b155b15610fa857506000611033565b6000846001604060020a0316118015610fc85750610fc6848961451b565b155b15610fd557506000611033565b6000836001604060020a0316118015610ff55750610ff3838961451b565b155b1561100257506000611033565b6000826001604060020a03161180156110225750611020828961451b565b155b1561102f57506000611033565b5060015b979650505050505050565b600080600061104b615413565b600354600160a060020a031691506000826307202460878360405160e0015260405160e060020a63ffffffff84160281526001604060020a03909116600482015260240160e060405180830381600087803b15156110a857600080fd5b6102c65a03f115156110b957600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08a0152505063ffffffff9182166080880152600160a060020a0390921660408701529190911660208501908152919750915051826080015194509450505050915091565b600a546e010000000000000000000000000000900460ff1681565b600b5481565b6000806000831561117257600a61ffff600d8a0216049750600a61ffff600d8902160496505b61118788600461ffff60038a02165b046146d0565b915061119c87600461ffff6003890216611181565b600c5490915060ff1661ffff83161080156111bf5750600c5460ff1661ffff8216105b156111d157600c5460ff1692506111ed565b8061ffff168261ffff1611156111e9578192506111ed565b8092505b505095945050505050565b60005433600160a060020a03908116911614806112335750600160a060020a03331660009081526001602081905260409091205460ff161515145b151561123e57600080fd5b60038054600160a060020a0396871673ffffffffffffffffffffffffffffffffffffffff1991821617909155600280549587166101000274ffffffffffffffffffffffffffffffffffffffff00199096169590951790945560048054938616938516939093179092556005805491851691841691909117905560068054919093169116179055565b60005433600160a060020a03908116911614806113015750600160a060020a03331660009081526001602081905260409091205460ff161515145b151561130c57600080fd5b600a805460ff1990811660ff998a161761ff001916610100988a16989098029790971762ff0000191662010000968916969096029590951763ff00000019166301000000948816949094029390931766ff000000000000191666010000000000009287169290920291909117909255600c805490931691909316179055600d55565b60005433600160a060020a03908116911614806113c95750600160a060020a03331660009081526001602081905260409091205460ff161515145b15156113d457600080fd5b60ff9182166000908152600760205260409020805460ff191691909216179055565b600080548190819033600160a060020a03908116911614806114365750600160a060020a03331660009081526001602081905260409091205460ff161515145b151561144157600080fd5b506001915060649050805b606460ff84161161149f5760ff83166000908152600960205260409020805463ffffffff191663ffffffff83811691909117909155600190930192600a90600b840216046005019150818101905061144c565b505050565b60005433600160a060020a03908116911614806114df5750600160a060020a03331660009081526001602081905260409091205460ff161515145b15156114ea57600080fd5b600760208190527fb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b828805460ff19908116600e179091557fb7c774451310d1be4108bc180d1b52823cb0ee0274a6c0081bcaf94f115fb96d8054821660101790557f3be6fd20d5acfde5b873b48692cd31f4d3c7e8ee8a813af4696af8859e5ca6c68054821660081790557fb805995a7ec585a251200611a61d179cfd7fb105e1ab17dc415a7336783786f78054821660091790557fbcdda56b5d08466ec462cbbe0adfa57cb0a15fcc8940ef68f702f21b787bc9358054821660021790557f55c5b153ab560fcde54a63b18c7f53d75501706907cef8767fbded79ab9997c780548216600b1790557fb7c49cceb9f85950584035457a41ebbd8cf93b9b612733ad25aa9731ac43aad68054821660031790557f4b1bf46c9f1bd48ff8274d40bad76a6615cb6c59a637d451a3994194b2db86be8054821660051790557ff1f3e9c34634a546b3672c043f73844d83d55591bbe61b8e7e3a72bca1a812bf80548216600f1790557fb7511a2dbe1513c8574eaafb5266301ff1bbf641d4144b093d6d1b500334bf2f8054821660129081179091557f74b6357e277c778e8ad9a2761a935d45336ec91439b9e1b117eda2efdfe38fad805483169093179092557fc6af84bcd7a912c26772dce2b27a335c9acc50e9113bac42fd0b48deecc0f30c8054821660061790557fde7415c6a2f6d5051213edef7c4742786ca35b02a0e77e53b1b2e1ff1a228a6b8054821660111790557f6695255c0c22b4090576b0ff35e852eba3dd4afabff28976da48e1280061728d80548216600d1790557ffdb0fc5c292af6bc7c9afb28ca8e0549b4de965653a829548475c76a1d5c400c80548216600c1790557f7fecc9f0b925868a8c62ee842da0498074146a036d84a1041d9b5286786bbbf38054821660011790556000919091527ff2e2385bc2a5be32198cd1e425186910eb1a233b2b2a22be149cee4dc72d016280549091166004179055565b6000806000806000806117de615413565b600354600554600160a060020a03918216975016945060009250829150856307202460898460405160e0015260405160e060020a63ffffffff84160281526001604060020a03909116600482015260240160e060405180830381600087803b151561184857600080fd5b6102c65a03f1151561185957600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08901525063ffffffff90811660c088015290811660a08701529081166080860152600160a060020a0391821660408601908152921660208501526001604060020a0390921683529086169063f8a74501905160006040516060015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401606060405180830381600087803b151561192057600080fd5b6102c65a03f1151561193157600080fd5b50505060405180519060200180519060200180519296509094505063ffffffff908116925060009085161180156119685750600083115b156119ef5784600160a060020a031663dc268db9858a60006040516020015260405163ffffffff84811660e060020a0282529290921660048301526001604060020a03166024820152604401602060405180830381600087803b15156119cd57600080fd5b6102c65a03f115156119de57600080fd5b5050506040518051905096506119f4565b600096505b505050505050919050565b6000600019430140600160a060020a03831601815b8460ff168160ff16108015611a2c575060068160ff16105b15611a405761010082049150600101611a14565b8560ff1682811515611a4e57fe5b069695505050505050565b600082818060ff6003880181169084161115611a8057600260ff6003890116049250611a8a565b600260ff87160492505b600191508260ff1660140a8360ff1660150a6103e802811515611aa957fe5b048002905060ff600388018116908716118015611ad157508260020260ff168760030160ff16115b80611af857508660030160ff168660ff1611158015611af857508260020260ff168660ff16115b15611b07576014601582020490505b8415611b1d57620f4240601e8202049150611b29565b620f4240600a82020491505b600a5460ff6e01000000000000000000000000000090910481168701811690881610611b9857600a5460ff6e01000000000000000000000000000090910481169087890316811515611b7757fe5b0460ff1660020a63ffffffff168263ffffffff16811515611b9457fe5b0491505b5095945050505050565b60025460009081908190819060ff1615611bbb57600080fd5b600554600160a060020a03161515611bd257600080fd5b600554600160a060020a031693508363f31dec5a8860006040516060015260405163ffffffff83811660e060020a028252919091166004820152602401606060405180830381600087803b1515611c2857600080fd5b6102c65a03f11515611c3957600080fd5b50505060405180519060200180519060200180519295509093505063ffffffff16905033600160a060020a0390811690831614611c7557600080fd5b83600160a060020a03166343b37b458888886040518463ffffffff1660e060020a028152600401808463ffffffff1663ffffffff1681526020018060200182810382528484828181526020019250808284378201915050945050505050600060405180830381600087803b1515611ceb57600080fd5b6102c65a03f11515611cfc57600080fd5b50505050505050505050565b600f5481565b6000611d1861545f565b6000611d226154be565b6000611d2c6154f3565b60025460ff1615611d3c57600080fd5b600354600160a060020a03161515611d5357600080fd5b600454600160a060020a03161515611d6a57600080fd5b600554600160a060020a03161515611d8157600080fd5b600654600160a060020a03161515611d9857600080fd5b611da7338d8d8d8d8d8d610d43565b1515611db257600080fd5b600554600160a060020a031695508563f31dec5a8e60006040516060015260405163ffffffff83811660e060020a028252919091166004820152602401606060405180830381600087803b1515611e0857600080fd5b6102c65a03f11515611e1957600080fd5b505050604051805190602001805190602001805190506080880188606081015163ffffffff93909316909252600160a060020a039290921690525260808501511580611e775750600160a060020a0333168551600160a060020a0316145b15611e8157600080fd5b600254600160a060020a036101009091048116945086166301d439458e600060405160c0015260405163ffffffff83811660e060020a02825291909116600482015260240160c060405180830381600087803b1515611edf57600080fd5b6102c65a03f11515611ef057600080fd5b50505060405180519060200180519060200180519060200180519060200180519060200180516001604060020a0390811660a08b015291821660808a0152509081166060880190815291811660408801529182166020870152911684526010805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a031617905560009250611f8d905184608001518560a00151612ee4565b6020820152611f9d898989612ee4565b6080820152600060c082015282516001604060020a0390811682528c166060820152611fc8816146f5565b8860a0015160a08a015160600160c08b015192151560e08c015260ff9384169092529282169052919091169052600160a060020a038416635643a7118251600a546064906c01000000000000000000000000900460ff1661203f60a08b0151518b60a0015160035b60200201518c60e00151611a59565b0263ffffffff1681151561204f57fe5b0460405163ffffffff84811660e060020a0282526001604060020a0393909316600482015291166024820152604401600060405180830381600087803b151561209757600080fd5b6102c65a03f115156120a857600080fd5b50505083600160a060020a0316635643a7118260600151600a546064906d0100000000000000000000000000900460ff166120fd60a08b0151606001518b60a0015160005b60200201518c60e0015115611a59565b0263ffffffff1681151561210d57fe5b0460405163ffffffff84811660e060020a0282526001604060020a0393909316600482015291166024820152604401600060405180830381600087803b151561215557600080fd5b6102c65a03f1151561216657600080fd5b5050508460e001511561217a576001820191505b600160c082015260208301516001604060020a0390811682528b1660608201526121a3816146f5565b8860a0015160200160a08a015160800160c08b015192151560e08c015260ff9384166020909301929092529282169052919091169052600160a060020a038416635643a7118251600a546064906c01000000000000000000000000900460ff1661221b60a08b0151602001518b60a001516004612030565b0263ffffffff1681151561222b57fe5b0460405163ffffffff84811660e060020a0282526001604060020a0393909316600482015291166024820152604401600060405180830381600087803b151561227357600080fd5b6102c65a03f1151561228457600080fd5b50505083600160a060020a0316635643a7118260600151600a546064906d0100000000000000000000000000900460ff166122cd60a08b0151608001518b60a0015160016120ed565b0263ffffffff168115156122dd57fe5b0460405163ffffffff84811660e060020a0282526001604060020a0393909316600482015291166024820152604401600060405180830381600087803b151561232557600080fd5b6102c65a03f1151561233657600080fd5b5050508460e001511561234a576001820191505b600260c082015260408301516001604060020a0390811682528a166060820152612373816146f5565b8860a0015160400160a08a015160a00160c08b015192151560e08c015260ff9384166040909301929092529282169052919091169052600160a060020a038416635643a7118251600a546064906c01000000000000000000000000900460ff166123eb60a08b0151604001518b60a001516005612030565b0263ffffffff168115156123fb57fe5b0460405163ffffffff84811660e060020a0282526001604060020a0393909316600482015291166024820152604401600060405180830381600087803b151561244357600080fd5b6102c65a03f1151561245457600080fd5b50505083600160a060020a0316635643a7118260600151600a546064906d0100000000000000000000000000900460ff1661249d60a08b015160a001518b60a0015160026120ed565b0263ffffffff168115156124ad57fe5b0460405163ffffffff84811660e060020a0282526001604060020a0393909316600482015291166024820152604401600060405180830381600087803b15156124f557600080fd5b6102c65a03f1151561250657600080fd5b5050508460e001511561251a576001820191505b60038560a0015160a001518660a00151608001518760a0015160600151010160ff1681151561254557fe5b0460ff16600a600f9054906101000a900460ff1660038760a00151604001518860a00151602001518960a0015151010160ff1681151561258157fe5b040160ff16101561259157600080fd5b6125a38d865160018560ff161161489a565b60018260ff1611156125bc5760006101008601526125c5565b60016101008601525b6001600960008760a001515160ff16815260208101919091526040016000205463ffffffff1603606086015163ffffffff91909116905260016009600060a08801516020015160ff16815260208101919091526040016000205463ffffffff1603606086015163ffffffff9190911660209091015260016009600060a08801516040015160ff16815260208101919091526040016000205463ffffffff1603606086015163ffffffff91909116604090910152600160a060020a038616631f674b5a8e3360c0890151518960c00151602001518a60c00151604001518b610100015160028111156126b257fe5b8c60600151518d60600151602001518e606001516040015160006040516020015260405163ffffffff8b811660e060020a028252998a166004820152600160a060020a0398909816602489015260ff968716604489015294861660648801529285166084870152931660a485015291841660c484015290831660e483015290911661010482015261012401602060405180830381600087803b151561275657600080fd5b6102c65a03f1151561276757600080fd5b50505060405180516001604060020a031660208701525060016009600060a08801516060015160ff16815260208101919091526040016000205463ffffffff1603606086015163ffffffff91909116905260016009600060a08801516080015160ff16815260208101919091526040016000205463ffffffff1603606086015163ffffffff9190911660209091015260016009600060a088015160a0015160ff16815260208101919091526040016000205463ffffffff1603606086015163ffffffff90911660409190910152600160a060020a0386166330a8087060208701518e8e8e8e8e8e8d60600151518e60600151602001518f606001516040015160405163ffffffff8c811660e060020a0282526001604060020a039b8c166004830152998b166024820152978a1660448901529589166064880152938816608487015291871660a486015290951660c484015293831660e4830152928216610104820152911661012482015261014401600060405180830381600087803b15156128ef57600080fd5b6102c65a03f1151561290057600080fd5b50505033600160a060020a03167f26194856c6c579d36bc6b21531c958237d96b3f18856c8a745fd16e0133f1e8a8e876101000151600281111561294057fe5b60405163ffffffff909216825260ff1660208201526040908101905180910390a250505050505050505050505050565b60005433600160a060020a0390811691161461298b57600080fd5b6002805460ff1916911515919091179055565b600a5468010000000000000000900463ffffffff1681565b6000806129c161552a565b60025460ff16156129d157600080fd5b600354600160a060020a031615156129e857600080fd5b600454600160a060020a031615156129ff57600080fd5b600554600160a060020a03161515612a1657600080fd5b612a25338a8a8a8a8a8a610d43565b1515612a3057600080fd5b600454600160a060020a031692508263a847a71c8a60006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515612a8c57600080fd5b6102c65a03f11515612a9d57600080fd5b5050506040518051905080612b20575082600160a060020a031663a847a71c8960006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515612b0457600080fd5b6102c65a03f11515612b1557600080fd5b505050604051805190505b80612b99575082600160a060020a031663a847a71c8860006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515612b7d57600080fd5b6102c65a03f11515612b8e57600080fd5b505050604051805190505b80612c12575082600160a060020a031663a847a71c8760006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515612bf657600080fd5b6102c65a03f11515612c0757600080fd5b505050604051805190505b80612c8b575082600160a060020a031663a847a71c8660006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515612c6f57600080fd5b6102c65a03f11515612c8057600080fd5b505050604051805190505b80612d04575082600160a060020a031663a847a71c8560006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515612ce857600080fd5b6102c65a03f11515612cf957600080fd5b505050604051805190505b15612d0e57600080fd5b600b5434811515612d1b57fe5b600a54919004925063ffffffff6801000000000000000090910481169083161015612d4557600080fd5b600160a060020a03331681528a8a806020601f820181900481020160405190810160405281815292919060208401838380828437505050506020840192909252505063ffffffff821660408201526001604060020a03808a166060830152888116608083015287811660a083015286811660c083015285811660e08301528416610100820152612dd481614b22565b5050600e805434019055505050505050505050565b60005474010000000000000000000000000000000000000000900461ffff1681565b63ffffffff166000908152600860205260409020805460018201546002909201549092565b6000805433600160a060020a0390811691161480612e6c5750600160a060020a03331660009081526001602081905260409091205460ff161515145b1515612e7757600080fd5b30600160a060020a031631821115612e8e57600080fd5b612e9c600e54600f54614dee565b905080821115612eab57600080fd5b600f805483019055600160a060020a03831682156108fc0283604051600060405180830381858888f19350505050151561149f57600080fd5b612eec61557d565b60025460009081906101009004600160a060020a0316816001604060020a03881681901115612fb65781600160a060020a031662119f3489600060405160a0015260405160e060020a63ffffffff84160281526001604060020a03909116600482015260240160a060405180830381600087803b1515612f6b57600080fd5b6102c65a03f11515612f7c57600080fd5b50505060405180519060200180519060200180519060200180519060200180515050901515602089015263ffffffff909216875290945092505b6000876001604060020a0316111561306c5781600160a060020a031662119f3488600060405160a0015260405160e060020a63ffffffff84160281526001604060020a03909116600482015260240160a060405180830381600087803b151561301e57600080fd5b6102c65a03f1151561302f57600080fd5b50505060405180519060200180519060200180519060200180519060200180515050901515608089015263ffffffff909216606088015290945092505b6000866001604060020a031611156131225781600160a060020a031662119f3487600060405160a0015260405160e060020a63ffffffff84160281526001604060020a03909116600482015260240160a060405180830381600087803b15156130d457600080fd5b6102c65a03f115156130e557600080fd5b5050506040518051906020018051906020018051906020018051906020018051505090151560e089015263ffffffff90921660c088015290945092505b50600354600160a060020a03166020850151156131e557600160a060020a0381166362b21ad76000875163ffffffff16600080604051602001526040518463ffffffff1660e060020a0281526004018084600481111561317e57fe5b60ff168152602001836001604060020a03166001604060020a031681526020018281526020019350505050602060405180830381600087803b15156131c257600080fd5b6102c65a03f115156131d357600080fd5b505050604051805160ff166040870152505b84608001511561329e5780600160a060020a03166362b21ad76000876060015163ffffffff16600080604051602001526040518463ffffffff1660e060020a0281526004018084600481111561323757fe5b60ff168152602001836001604060020a03166001604060020a031681526020018281526020019350505050602060405180830381600087803b151561327b57600080fd5b6102c65a03f1151561328c57600080fd5b505050604051805160ff1660a0870152505b8460e00151156133585780600160a060020a03166362b21ad760008760c0015163ffffffff16600080604051602001526040518463ffffffff1660e060020a028152600401808460048111156132f057fe5b60ff168152602001836001604060020a03166001604060020a031681526020018281526020019350505050602060405180830381600087803b151561333457600080fd5b6102c65a03f1151561334557600080fd5b505050604051805160ff16610100870152505b505050509392505050565b600a546f01000000000000000000000000000000900460ff1681565b600a54670100000000000000900460ff1681565b60005433600160a060020a039081169116146133ae57600080fd5b600160a060020a03811660009081526001602052604090205460ff16151561343a57600160a060020a03811660009081526001602081905260408220805460ff191682179055815461ffff7401000000000000000000000000000000000000000080830482169093011690910275ffff0000000000000000000000000000000000000000199091161790555b50565b601881565b600381565b6000806134526153eb565b600061345c6153eb565b600354600160a060020a0316915060008080806134788a61103e565b909450925063ffffffff8416151561349c5783600086819150985098509850613627565b600091506134a9836140a7565b9050600091505b600682101561357f5785600160a060020a03166362b21ad760038c856000604051602001526040518463ffffffff1660e060020a028152600401808460048111156134f757fe5b60ff168152602001836001604060020a03166001604060020a031681526020018281526020019350505050602060405180830381600087803b151561353b57600080fd5b6102c65a03f1151561354c57600080fd5b505050604051805160ff16905085836006811061356557fe5b61ffff9092166020929092020152600191909101906134b0565b600091505b63ffffffff841660009081526008602052604090206001015482101561361d5763ffffffff8416600090815260086020526040902060010180546135f69190849081106135cd57fe5b6000918252602091829020828204015460ff929091066101000a90048116906003840216614e02565b85836006811061360257fe5b6020020181815161ffff910116905250600190910190613584565b8381869850985098505b5050505050509193909250565b600a5460ff1681565b600a5462010000900460ff1681565b600a546c01000000000000000000000000900460ff1681565b600054600160a060020a031681565b6000806000806136826155c9565b61368a6155c9565b6136926155c9565b60005433600160a060020a03908116911614806136cd5750600160a060020a03331660009081526001602081905260409091205460ff161515145b15156136d857600080fd5b600354600160a060020a031615156136ef57600080fd5b6002546101009004600160a060020a0316151561370b57600080fd5b60035460025463ffffffff8a16600081815260086020526040808220600160a060020a039586169c506101009094049094169950975090955088916341b0eb53918891829051602001526040518363ffffffff1660e060020a0281526004018083600481111561377757fe5b60ff168152602001826001604060020a03166001604060020a0316815260200192505050602060405180830381600087803b15156137b457600080fd5b6102c65a03f115156137c557600080fd5b505050604051805190509450846040518059106137df5750595b908082528060200260200182016040525092505b60008511156138ce5786600160a060020a03166362b21ad760008a63ffffffff16600189036000604051602001526040518463ffffffff1660e060020a0281526004018084600481111561384357fe5b60ff168152602001836001604060020a03166001604060020a031681526020018281526020019350505050602060405180830381600087803b151561388757600080fd5b6102c65a03f1151561389857600080fd5b505050604051805190508360018703815181106138b157fe5b60ff909216602092830290910190910152600019909401936137f3565b838380516138e09291602001906155db565b5086600160a060020a03166341b0eb5360018a63ffffffff166000604051602001526040518363ffffffff1660e060020a0281526004018083600481111561392457fe5b60ff168152602001826001604060020a03166001604060020a0316815260200192505050602060405180830381600087803b151561396157600080fd5b6102c65a03f1151561397257600080fd5b5050506040518051905094508460405180591061398c5750595b908082528060200260200182016040525091505b6000851115613a7b5786600160a060020a03166362b21ad760018a63ffffffff16600189036000604051602001526040518463ffffffff1660e060020a028152600401808460048111156139f057fe5b60ff168152602001836001604060020a03166001604060020a031681526020018281526020019350505050602060405180830381600087803b1515613a3457600080fd5b6102c65a03f11515613a4557600080fd5b50505060405180519050826001870381518110613a5e57fe5b60ff909216602092830290910190910152600019909401936139a0565b60018401828051613a909291602001906155db565b5085600160a060020a03166388e9abb689600080604051602001526040518363ffffffff1660e060020a028152600401808363ffffffff1663ffffffff168152602001826001811115613adf57fe5b60ff16815260200192505050602060405180830381600087803b1515613b0457600080fd5b6102c65a03f11515613b1557600080fd5b50505060405180519050945084604051805910613b2f5750595b908082528060200260200182016040525090505b6000851115613c155785600160a060020a0316635b626339896000600189036000604051602001526040518463ffffffff1660e060020a028152600401808463ffffffff1663ffffffff168152602001836001811115613b9f57fe5b60ff1681526020018281526020019350505050602060405180830381600087803b1515613bcb57600080fd5b6102c65a03f11515613bdc57600080fd5b50505060405180519050816001870381518110613bf557fe5b63ffffffff90921660209283029091019091015260001990940193613b43565b60028401818051613c2a929160200190615681565b505050505050505050565b600d5481565b600654600160a060020a031681565b600a54640100000000900461ffff1681565b6000613c6661552a565b60025460ff1615613c7657600080fd5b600354600160a060020a03161515613c8d57600080fd5b600454600160a060020a03161515613ca457600080fd5b600554600160a060020a03161515613cbb57600080fd5b600654600160a060020a03161515613cd257600080fd5b60065433600160a060020a03908116911614613ced57600080fd5b613cfc8c898989898989610d43565b1515613d0757600080fd5b600454600160a060020a031691508163a847a71c8960006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515613d6357600080fd5b6102c65a03f11515613d7457600080fd5b5050506040518051905080613df7575081600160a060020a031663a847a71c8860006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515613ddb57600080fd5b6102c65a03f11515613dec57600080fd5b505050604051805190505b80613e70575081600160a060020a031663a847a71c8760006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515613e5457600080fd5b6102c65a03f11515613e6557600080fd5b505050604051805190505b80613ee9575081600160a060020a031663a847a71c8660006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515613ecd57600080fd5b6102c65a03f11515613ede57600080fd5b505050604051805190505b80613f62575081600160a060020a031663a847a71c8560006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515613f4657600080fd5b6102c65a03f11515613f5757600080fd5b505050604051805190505b80613fdb575081600160a060020a031663a847a71c8460006040516020015260405160e060020a63ffffffff84160281526001604060020a039091166004820152602401602060405180830381600087803b1515613fbf57600080fd5b6102c65a03f11515613fd057600080fd5b505050604051805190505b15613fe557600080fd5b600a5463ffffffff680100000000000000009091048116908c16101561400a57600080fd5b600160a060020a038c1681528989806020601f820181900481020160405190810160405281815292919060208401838380828437505050506020840192909252505063ffffffff8b1660408201526001604060020a038089166060830152878116608083015286811660a083015285811660c083015284811660e0830152831661010082015261409981614b22565b505050505050505050505050565b600060016064825b8160ff168360ff16101561410157600260ff848401160460ff811660009081526009602052604090205490915063ffffffff90811690861610156140f5578091506140fc565b8060010192505b6140af565b50909392505050565b60005433600160a060020a03908116911614806141455750600160a060020a03331660009081526001602081905260409091205460ff161515145b151561415057600080fd5b600354600160a060020a0316151561416757600080fd5b6002546101009004600160a060020a0316151561418357600080fd5b61418c88613674565b61419587613674565b61419e86613674565b6141a785613674565b6141b084613674565b6141b983613674565b6141c282613674565b6141cb81613674565b5050505050505050565b60005433600160a060020a039081169116146141f057600080fd5b600160a060020a03811660009081526001602081905260409091205460ff161515141561343a57600160a060020a03166000908152600160205260408120805460ff19169055805475ffff0000000000000000000000000000000000000000198116740100000000000000000000000000000000000000009182900461ffff9081166000190116909102179055565b600a546301000000900460ff1681565b600c5460ff1681565b60008060006142a5615413565b600354600160a060020a031691506000826307202460878360405160e0015260405160e060020a63ffffffff84160281526001604060020a03909116600482015260240160e060405180830381600087803b151561430257600080fd5b6102c65a03f1151561431357600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08a0152505063ffffffff91821660808801908152600160a060020a039093166040880152921660208601526001604060020a03909216845291505161438983608001516140a7565b94509450505050915091565b60025460009081908190819060ff16156143ae57600080fd5b600554600160a060020a031615156143c557600080fd5b600554600160a060020a031693508363f31dec5a8660006040516060015260405163ffffffff83811660e060020a028252919091166004820152602401606060405180830381600087803b151561441b57600080fd5b6102c65a03f1151561442c57600080fd5b50505060405180519060200180519060200180519295509093505063ffffffff16905033600160a060020a039081169083161461446857600080fd5b60008311156144ce5783600160a060020a0316634377c1cf8660405163ffffffff83811660e060020a028252919091166004820152602401600060405180830381600087803b15156144b957600080fd5b6102c65a03f115156144ca57600080fd5b5050505b8463ffffffff167f7896e0932299b049700f86ae09c1e775b823c8527fb25549987819578913046a60405160405180910390a25050505050565b600a54610100900460ff1681565b600681565b600080614526615413565b600354600160a060020a0316915081630720246086600060405160e0015260405160e060020a63ffffffff84160281526001604060020a03909116600482015260240160e060405180830381600087803b151561458257600080fd5b6102c65a03f1151561459357600080fd5b505050604051805190602001805190602001805190602001805190602001805190602001805190602001805160e08901525063ffffffff90811660c088015290811660a08701529081166080860152600160a060020a0391821660408601908152921660208501526001604060020a0390921683529085169051600160a060020a031614801561462e5750806020015163ffffffff16601514155b92505b505092915050565b600e5481565b600554600160a060020a031681565b600a546601000000000000900460ff1681565b60025460ff1681565b60005433600160a060020a0390811691161461468557600080fd5b600160a060020a0381161561343a5760008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600454600160a060020a031681565b60008161ffff168361ffff1611156146eb57508082036146ef565b5060005b92915050565b6000806000806147036153eb565b61470b6153eb565b600061471688614e2d565b600a54939a50909850909450925061474e906601000000000000900460ff1660020160c08a0151601054600160a060020a03166119ff565b9450600090505b600a546601000000000000900460ff1661ffff821610801561477c57506000835161ffff16115b801561478d57506000825161ffff16115b156148805760a082015161ffff1660a084015161ffff16111561484257600261ffff82160661ffff1660001415614804576147f98260005b60200201516147f46020860151606087015160408701518760045b60200201518b60ff168861ffff161461114c565b6146d0565b61ffff16825261483d565b61482a8360005b60200201516147f46020850151606086015160408801518860046147e0565b8360005b61ffff90921660209290920201525b614878565b600261ffff82160661ffff16156148665761485e8260006147c5565b82600061482e565b61487183600061480b565b61ffff1683525b600101614755565b815161ffff16835161ffff16101593505050509193509193565b6005546000908190819081908190600160a060020a031615156148bc57600080fd5b600554600160a060020a031694508463bb583f198960006040516060015260405163ffffffff83811660e060020a028252919091166004820152602401606060405180830381600087803b151561491257600080fd5b6102c65a03f1151561492357600080fd5b505050604051805190602001805190602001805160065493975091955090935050600160a060020a0316905085156149d9578163ffffffff168463ffffffff1610156149d45780600160a060020a0316635fee0aac88600d5460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156149bf57600080fd5b6102c65a03f115156149d057600080fd5b5050505b6141cb565b600a5463ffffffff83811691670100000000000000900460ff169086168115156149ff57fe5b0463ffffffff161115614a1757816002029150614a3e565b600a54670100000000000000900460ff1663ffffffff8516811515614a3857fe5b04820191505b63ffffffff60018401811690831611614aae5784600160a060020a0316634377c1cf8960405163ffffffff83811660e060020a028252919091166004820152602401600060405180830381600087803b1515614a9957600080fd5b6102c65a03f11515614aaa57600080fd5b5050505b80600160a060020a0316635fee0aac33600d5460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515614b0457600080fd5b6102c65a03f11515614b1557600080fd5b5050505050505050505050565b600554600160a060020a0316600080808363f8a74501865160006040516060015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401606060405180830381600087803b1515614b8157600080fd5b6102c65a03f11515614b9257600080fd5b505050604051805190602001805190602001805192955090935090915050600063ffffffff84161180614bc55750600082115b15614bcf57600080fd5b600a54640100000000900461ffff16600160a060020a03851663d7ebf53d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515614c2457600080fd5b6102c65a03f11515614c3557600080fd5b50505060405180519050101515614c4b57600080fd5b600160a060020a03841663b5e5a50a86518760200151886060015189608001518a60a001518b60c001518c60e001518d61010001518e6040015160006040516020015260405163ffffffff8b811660e060020a028252600160a060020a038b16600483019081526001604060020a038a811660448501528981166064850152888116608485015287811660a485015286811660c4850152851660e4840152908316610104830152610120602483019081529091610124018a818151815260200191508051906020019080838360005b83811015614d32578082015183820152602001614d1a565b50505050905090810190601f168015614d5f5780820380516001836020036101000a031916815260200191505b509a5050505050505050505050602060405180830381600087803b1515614d8557600080fd5b6102c65a03f11515614d9657600080fd5b5050506040518051935085905051600160a060020a03167fb67c02473855217c5523d6db57e34ef9aeea067dffec2a3e33dc642f751dc1498460405163ffffffff909116815260200160405180910390a25050505050565b60008082841015614dfb57fe5b5050900390565b6000828202831580614e1e5750828482811515614e1b57fe5b04145b1515614e2657fe5b9392505050565b6000614e376153eb565b6000614e416153eb565b6000808080614e508951613447565b9099509750935060009250614e6860608a0151613447565b90975095509250614e798484615034565b61ffff90811660a08c01521660408a0152614e988460208b01516151fa565b896040018181510161ffff16905250614eb58360808b01516151fa565b8960a0018181510161ffff16905250614ed28460208b01516152f0565b9150614ee2838a608001516152f0565b90506064896040015160208901510261ffff16811515614efe57fe5b04602088018181510161ffff16905250606460408a015160608901510261ffff16811515614f2857fe5b04606088018181510161ffff16905250606460a08a015160208701510261ffff16811515614f5257fe5b04602086018181510161ffff16905250606460a08a015160608701510261ffff16811515614f7c57fe5b04606086018181510161ffff1690525060648260408901510261ffff16811515614fa257fe5b04604088018181510161ffff1690525060648260808901510261ffff16811515614fc857fe5b04608088018181510161ffff1690525060648160408701510261ffff16811515614fee57fe5b04604086018181510161ffff1690525060648160808701510261ffff1681151561501457fe5b04608086018181510161ffff169052509698959750939550919392505050565b600080808080805b63ffffffff88166000908152600860205260409020548210156151bf575060005b63ffffffff87166000908152600860205260409020548110156151b45763ffffffff8716600090815260086020526040902080548290811061509b57fe5b60009182526020808320818304015463ffffffff8c16845260088252604084208054929093066101000a900460ff16926007929091869081106150da57fe5b60009182526020808320818304015460ff928290066101000a900482168452830193909352604090910190205416141561511357600193505b63ffffffff8816600090815260086020526040902080548390811061513457fe5b60009182526020808320818304015463ffffffff8b16845260088252604084208054929093066101000a900460ff169260079290918590811061517357fe5b60009182526020808320818304015460ff928290066101000a90048216845283019390935260409091019020541614156151ac57600192505b60010161505d565b60019091019061503c565b83156151d757600a5462010000900460ff1695909501945b82156151ef57600a5462010000900460ff1694909401935b505050509250929050565b63ffffffff82166000908152600860205260408120600201548190819081808211156152d9575060009250825b818410156152d95763ffffffff8716600090815260086020526040902060020180548590811061525357fe5b90600052602060002090600891828204019190066004029054906101000a900463ffffffff169050856000015163ffffffff168163ffffffff1614806152a85750856060015163ffffffff168163ffffffff16145b806152c257508560c0015163ffffffff168163ffffffff16145b156152ce576001830192505b600190930192615227565b600a5460ff90811684021694505050505092915050565b600080805b63ffffffff85166000908152600860205260409020548210156146315763ffffffff8516600090815260086020526040902080548390811061533357fe5b6000918252602091829020828204015460ff918390066101000a90041691508401511561538157836040015160ff168160ff16141561538157600a54610100900460ff1692909201916153e0565b8360800151156153b2578360a0015160ff168160ff1614156153b257600a54610100900460ff1692909201916153e0565b8360e00151156153e05783610100015160ff168160ff1614156153e057600a54610100900460ff1692909201915b6001909101906152f5565b60c06040519081016040526006815b6000815260001990910190602001816153fa5790505090565b6101006040519081016040908152600080835260208301819052908201526060810161543d6155c9565b8152600060208201819052604082018190526060820181905260809091015290565b6102406040519081016040908152600080835260208301819052908201526060810161548961572c565b81526020016000815260200161549d6153eb565b81526020016154aa61572c565b815260006020820181905260409091015290565b60c06040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a082015290565b6102e0604051908101604052600081526020810161550f61557d565b815260006020820181905260408201526060016154aa61557d565b61012060405190810160405260008152602081016155466155c9565b815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e09091015290565b6101206040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082015290565b60206040519081016040526000815290565b82805482825590600052602060002090601f016020900481019282156156715791602002820160005b8382111561564257835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302615604565b801561566f5782816101000a81549060ff0219169055600101602081600001049283019260010302615642565b505b5061567d929150615746565b5090565b828054828255906000526020600020906007016008900481019282156157205791602002820160005b838211156156ee57835183826101000a81548163ffffffff021916908363ffffffff16021790555092602001926004016020816003010492830192600103026156aa565b801561571e5782816101000a81549063ffffffff02191690556004016020816003010492830192600103026156ee565b505b5061567d929150615767565b6060604051908101604052600081526002602082016153fa565b61576491905b8082111561567d57805460ff1916815560010161574c565b90565b61576491905b8082111561567d57805463ffffffff1916815560010161576d5600a165627a7a72305820841024e427679ca2d74f51569af34e37935bc4ea55a57b4d83fe9a0e2ddaf3a80029000000000000000000000000abc1c404424bdf24c19a5cc5ef8f47781d18eb3e0000000000000000000000001fc7bd85293f3982f40d52698df8d26be89360d60000000000000000000000004ba72f0f8dad13709ee28a992869e79d0fe4703000000000000000000000000075aa01dc00f6aeefe14bd58a5b6cbb091c6dc57b000000000000000000000000fec769e54c266de2bc3fa5df7d9f0fe2a1e39461

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

-----Decoded View---------------
Found 5 constructor arguments :
Arg [0] : 000000000000000000000000abc1c404424bdf24c19a5cc5ef8f47781d18eb3e
Arg [1] : 0000000000000000000000001fc7bd85293f3982f40d52698df8d26be89360d6
Arg [2] : 0000000000000000000000004ba72f0f8dad13709ee28a992869e79d0fe47030
Arg [3] : 00000000000000000000000075aa01dc00f6aeefe14bd58a5b6cbb091c6dc57b
Arg [4] : 000000000000000000000000fec769e54c266de2bc3fa5df7d9f0fe2a1e39461


   Swarm Source:
bzzr://841024e427679ca2d74f51569af34e37935bc4ea55a57b4d83fe9a0e2ddaf3a8

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.