Sponsored Link:   trade.io - The Future of Crypto Trading - A Better, Faster, Smarter Crypto Exchange - Pre-Register Now!
 Latest 25 txns from a total Of 39161 transactions
(+19 PendingTxns)

TxHash Age From To Value [TxFee]
0x5746694745247ae5008195c82a3ec60b8ab6e0c25c575fc6879c12a2427302e1(pending)0xedbf48f700d2d634208ca69ed2f3ccbcab0944c2  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xd41a9357ca6a3ebc6f11e37ef7aa1d9cb09e0350380b4112d976e2716283f33e(pending)0xef61e7dca9ec003d27a7f5fcab17011dd26c111e  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x26ae56cda62bfa81834c9d4895dae1128784843421411f7a77a42ca99fbb9fad(pending)0xedbf48f700d2d634208ca69ed2f3ccbcab0944c2  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xedcfe65dceb2cad5ce1682c565a772da2712dd4476e404a4079eb63129386385(pending)0x3cb5b7606a19bc3b0f26363e9fcd70e70eca0101  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xd6977219d4f97c5d9b8b003e68e7709c9855e467ced4561b2ac5d108f4b8a761(pending)0x34e8d1450697d589dbe6d324de0e4d7848d9bbe5  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x4e8108a0db64757b306624857472577262c9cfb236d5a1963b8541c625f753ca(pending)0x6119408d45276f5bbcdb36a7f948cf31c687bb0c  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xfb30da9240c4838cd2e4599ec411194bee512630ad4ed7496cd13aa5c99ef98b(pending)0x2dc1f090e72b4124f34bc33be9b8397b3618ebbb  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xe2ab6c0904d1e1ff3d9d3e7acb5b1599070105dc61692c8db4972104f6d4623f(pending)0xef61e7dca9ec003d27a7f5fcab17011dd26c111e  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x1c6780bb50b8f3e46d19fdfe972fdd137eb9333f7c64f77c5ff4af4660b072a8(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x4e440525e462a73fcb1f83dccfa90262ed60e8cf0b77fe799e7fa47f43e225c2(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x3e2ec64b94ef3690242c82c77559cf5323e9584da892dd65ca6252fffedf7cb9(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x2442df4f214fd25a27d40518ae1ee413577b417c8bdf86a54fcb8164564d8432(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xabeac4a80b324516bad335aac9171101ff1113110a2587a541a67a3bf15c284f(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xfe0e730a095a7f101e8b8ade398b0025747f2aec3ab65d64a436e098e48ab503(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x9e41c9cc75d7b3be83406229af03c26c4a714e6e1551fdc6dbc9a54f23d774b6(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x1d76788ffed439cb56547954688cf102eeb8759934bc4473664815ca4bed3898(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x38fc0dbd6e98db23eb7bb4fae316c9af734ac4380fa24edb5a7f6ff239075416(pending)0xb3f94e6128eb45affbc40f4e9a8c6f4d5fd93a08  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0x687b92ea481318f544d4403f5d11438d89f1d412aead31e0cc56d78c0cc771ab(pending)0x0d86f7186afccce55eb896a1fe2aecc1e2091ce5  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xbaa6654859f0f3cd3d2e5998b0b3fe0922135ebe267b512b83b527aa93676b84(pending)0x0d86f7186afccce55eb896a1fe2aecc1e2091ce5  IN  0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether(pending)
0xdb4391428f9d8e687c6f2501347336858b24c4aba54f613543f7a6f5f4780e272 hrs 1 min ago0xcff48a2c46776968b07b0f5c099069c6e222dae6  IN   0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether0.000258544
0x82e7939b6713e911afe80fbbf4c1ff3025f83875acc75e19734329ac189bfdfa5 hrs 26 mins ago0x35bb081c69ccea02bfd15cb0ca82d9b3259babab  IN   0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether0.000284895
0xe81196e8027b1c01aac0be2ad8a68b9a4961bf9960b201ae57ea708e7b541ae75 hrs 43 mins ago0x35bb081c69ccea02bfd15cb0ca82d9b3259babab  IN   0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether0.000129784
0xdbb53813449faea274d936374898c6fedb27b9b4685df3a459d4a45eb97ac0256 hrs 31 mins ago0x056827cf616fbc6993ef0d3a99866503640abc5f  IN   0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether0.000097542
0xc380bcd27e2a19d5027806ddec2a31be4b3adf669d7b328dd52b9295243aad416 hrs 32 mins ago0x056827cf616fbc6993ef0d3a99866503640abc5f  IN   0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether0.000097542
0x4aaa62f342e3cec831b3f7806ebaec7be59f26d10d2d214d8c51544f6d33a0716 hrs 34 mins ago0x056827cf616fbc6993ef0d3a99866503640abc5f  IN   0xa98ad92a642570b83b369c4eb70efefe638bc8950 Ether0.000194436
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0x12307ac5ecb52657aabd660c854a62c42af69a24a3ae7e898dc907da6bb20e0359959049 hrs 3 mins ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xce77b08e2c3b51f617e02abfdfd1cc4393aaf224e3870e997c54282f7343b84859958609 hrs 15 mins ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x97be50f59e47158c6a67732c1f07e273bd2679bc8d430b29923ec550a238a0f959922861 day ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.02 Ether
0xe1972a467b4ab517b3d5f914ee751f090398ccd3f1c7360fdc0c83febf2bad8259842732 days 9 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x4f42cf00ce67120a4c942e9db6604672d6cbf48e5af482938dded35d59d4d63859646515 days 16 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xba19a6613191de2247e6efb3d08e36e3966516fb402828847ee70001c1bad7d559636285 days 21 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x79922344f61df69340effd9899f52f8a215768d2cc15059186936113baf3beef59626466 days 47 mins ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x2ade3eb6249d722c111ab281e2aad5932c6b805b11f803168c496a92792f69e659466938 days 16 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xd56f93378b3724b967bd8d4ffdb39faa00d3e2076e229390bce621ab26fb885359464738 days 17 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xc308817c15d1c3dab54735f9da87f09d5b1c640a505d7b881484a126982db649591667613 days 20 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x904865c63b1e43d5392bc5a82bf83490c12d21bd590e87112f993fddbae70090588862718 days 15 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xae4acb039e83d345c8dd59ddedbca280ab1902b5ab5bbe76c89f2c5594f5fa78588856818 days 16 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x094c953103ec9497abce01db426b3e8fc3b9d61d40bc817c95f1b57010ce6277586947421 days 22 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x8954cd7a7810b52551f888a3683abd8cc51a4ad9005527e15e398e042bfe08b2583594627 days 17 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x8954cd7a7810b52551f888a3683abd8cc51a4ad9005527e15e398e042bfe08b2583594627 days 17 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x8954cd7a7810b52551f888a3683abd8cc51a4ad9005527e15e398e042bfe08b2583594627 days 17 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xf062769c95ce7488ebac60a939b3156d8f6e45f7ce932fe3e351455ef62c2666583590427 days 17 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xd714fe18a1560ab7552b1142729c7cfcae4e664f299fc6a827e1f3d108c9361d582481029 days 14 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xe337d3404202c3eb43cb7745d03a7f4a0fd8efccd505049bb0b904e0112ba4b6582479729 days 15 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.02 Ether
0xfa0d29365d60c0d993149765f45bad6b59ab44ad962961a3a9b25a0d884e24bf581963530 days 12 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xacf798cb6e7f779de450a72a77e1cda0e9468992ae6c033d0766539b905e84c9581963430 days 12 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xe751d10d7bfccf5814ed14174410a9fe84652b604c88c968e7345f056b1de36e581488731 days 8 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xc300946534f045ba9c9e19b0cdc2afe11614859e7a2f16127e44cc59910779f0580211733 days 11 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0xa017df8cd467289e3a78ff058cbfbc3ae43bfeb0c5b05d73dab05cdfb1f61bce580211033 days 11 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
0x8d52f8d1c45da8c8aa259396ca4bf3a470ce1d9bf0244270e215eb6c5ca8aef0580209133 days 11 hrs ago0xa98ad92a642570b83b369c4eb70efefe638bc8950xa3e4dc62b2942f6294cc4c34a546df87dbba830e0.03 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: Fishbank
Compiler Version: v0.4.21+commit.dfe3193c
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;


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


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


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


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


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

}








contract Beneficiary is Ownable {

    address public beneficiary;

    function Beneficiary() public {
        beneficiary = msg.sender;
    }

    function setBeneficiary(address _beneficiary) onlyOwner public {
        beneficiary = _beneficiary;
    }


}



contract ChestsStore is Beneficiary {


    struct chestProduct {
        uint256 price; // Price in wei
        bool isLimited; // is limited sale chest
        uint32 limit; // Sell limit
        uint16 boosters; // count of boosters
        uint24 raiseChance;// in 1/10 of percent
        uint24 raiseStrength;// in 1/10 of percent for params or minutes for timebased boosters
        uint8 onlyBoosterType;//If set chest will produce only this type
        uint8 onlyBoosterStrength;
    }


    chestProduct[255] public chestProducts;
    FishbankChests chests;


    function ChestsStore(address _chests) public {
        chests = FishbankChests(_chests);
        //set chests to this address
    }

    function initChestsStore() public onlyOwner {
        // Create basic chests types
        setChestProduct(1, 0, 1, false, 0, 0, 0, 0, 0);
        setChestProduct(2, 15 finney, 3, false, 0, 0, 0, 0, 0);
        setChestProduct(3, 20 finney, 5, false, 0, 0, 0, 0, 0);
    }

    function setChestProduct(uint16 chestId, uint256 price, uint16 boosters, bool isLimited, uint32 limit, uint24 raiseChance, uint24 raiseStrength, uint8 onlyBoosterType, uint8 onlyBoosterStrength) onlyOwner public {
        chestProduct storage newProduct = chestProducts[chestId];
        newProduct.price = price;
        newProduct.boosters = boosters;
        newProduct.isLimited = isLimited;
        newProduct.limit = limit;
        newProduct.raiseChance = raiseChance;
        newProduct.raiseStrength = raiseStrength;
        newProduct.onlyBoosterType = onlyBoosterType;
        newProduct.onlyBoosterStrength = onlyBoosterStrength;
    }

    function setChestPrice(uint16 chestId, uint256 price) onlyOwner public {
        chestProducts[chestId].price = price;
    }

    function buyChest(uint16 _chestId) payable public {
        chestProduct memory tmpChestProduct = chestProducts[_chestId];

        require(tmpChestProduct.price > 0);
        // only chests with price
        require(msg.value >= tmpChestProduct.price);
        //check if enough ether is send
        require(!tmpChestProduct.isLimited || tmpChestProduct.limit > 0);
        //check limits if they exists

        chests.mintChest(msg.sender, tmpChestProduct.boosters, tmpChestProduct.raiseStrength, tmpChestProduct.raiseChance, tmpChestProduct.onlyBoosterType, tmpChestProduct.onlyBoosterStrength);

        if (msg.value > chestProducts[_chestId].price) {//send to much ether send some back
            msg.sender.transfer(msg.value - chestProducts[_chestId].price);
        }

        beneficiary.transfer(chestProducts[_chestId].price);
        //send paid eth to beneficiary

    }


}





contract FishbankBoosters is Ownable {

    struct Booster {
        address owner;
        uint32 duration;
        uint8 boosterType;
        uint24 raiseValue;
        uint8 strength;
        uint32 amount;
    }

    Booster[] public boosters;
    bool public implementsERC721 = true;
    string public name = "Fishbank Boosters";
    string public symbol = "FISHB";
    mapping(uint256 => address) public approved;
    mapping(address => uint256) public balances;
    address public fishbank;
    address public chests;
    address public auction;

    modifier onlyBoosterOwner(uint256 _tokenId) {
        require(boosters[_tokenId].owner == msg.sender);
        _;
    }

    modifier onlyChest() {
        require(chests == msg.sender);
        _;
    }

    function FishbankBoosters() public {
        //nothing yet
    }

    //mints the boosters can only be called by owner. could be a smart contract
    function mintBooster(address _owner, uint32 _duration, uint8 _type, uint8 _strength, uint32 _amount, uint24 _raiseValue) onlyChest public {
        boosters.length ++;

        Booster storage tempBooster = boosters[boosters.length - 1];

        tempBooster.owner = _owner;
        tempBooster.duration = _duration;
        tempBooster.boosterType = _type;
        tempBooster.strength = _strength;
        tempBooster.amount = _amount;
        tempBooster.raiseValue = _raiseValue;

        Transfer(address(0), _owner, boosters.length - 1);
    }

    function setFishbank(address _fishbank) onlyOwner public {
        fishbank = _fishbank;
    }

    function setChests(address _chests) onlyOwner public {
        if (chests != address(0)) {
            revert();
        }
        chests = _chests;
    }

    function setAuction(address _auction) onlyOwner public {
        auction = _auction;
    }

    function getBoosterType(uint256 _tokenId) view public returns (uint8 boosterType) {
        boosterType = boosters[_tokenId].boosterType;
    }

    function getBoosterAmount(uint256 _tokenId) view public returns (uint32 boosterAmount) {
        boosterAmount = boosters[_tokenId].amount;
    }

    function getBoosterDuration(uint256 _tokenId) view public returns (uint32) {
        if (boosters[_tokenId].boosterType == 4 || boosters[_tokenId].boosterType == 2) {
            return boosters[_tokenId].duration + boosters[_tokenId].raiseValue * 60;
        }
        return boosters[_tokenId].duration;
    }

    function getBoosterStrength(uint256 _tokenId) view public returns (uint8 strength) {
        strength = boosters[_tokenId].strength;
    }

    function getBoosterRaiseValue(uint256 _tokenId) view public returns (uint24 raiseValue) {
        raiseValue = boosters[_tokenId].raiseValue;
    }

    //ERC721 functionality
    //could split this to a different contract but doesn't make it easier to read
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    function totalSupply() public view returns (uint256 total) {
        total = boosters.length;
    }

    function balanceOf(address _owner) public view returns (uint256 balance){
        balance = balances[_owner];
    }

    function ownerOf(uint256 _tokenId) public view returns (address owner){
        owner = boosters[_tokenId].owner;
    }

    function _transfer(address _from, address _to, uint256 _tokenId) internal {
        require(boosters[_tokenId].owner == _from);
        //can only transfer if previous owner equals from
        boosters[_tokenId].owner = _to;
        approved[_tokenId] = address(0);
        //reset approved of fish on every transfer
        balances[_from] -= 1;
        //underflow can only happen on 0x
        balances[_to] += 1;
        //overflows only with very very large amounts of fish
        Transfer(_from, _to, _tokenId);
    }

    function transfer(address _to, uint256 _tokenId) public
    onlyBoosterOwner(_tokenId) //check if msg.sender is the owner of this fish
    returns (bool)
    {
        _transfer(msg.sender, _to, _tokenId);
        //after master modifier invoke internal transfer
        return true;
    }

    function approve(address _to, uint256 _tokenId) public
    onlyBoosterOwner(_tokenId)
    {
        approved[_tokenId] = _to;
        Approval(msg.sender, _to, _tokenId);
    }

    function transferFrom(address _from, address _to, uint256 _tokenId) public returns (bool) {
        require(approved[_tokenId] == msg.sender || msg.sender == fishbank || msg.sender == auction);
        //require msg.sender to be approved for this token or to be the fishbank contract
        _transfer(_from, _to, _tokenId);
        //handles event, balances and approval reset
        return true;
    }


    function takeOwnership(uint256 _tokenId) public {
        require(approved[_tokenId] == msg.sender);
        _transfer(ownerOf(_tokenId), msg.sender, _tokenId);
    }


}






contract FishbankChests is Ownable {

    struct Chest {
        address owner;
        uint16 boosters;
        uint16 chestType;
        uint24 raiseChance;//Increace chance to catch bigger chest (1 = 1:10000)
        uint8 onlySpecificType;
        uint8 onlySpecificStrength;
        uint24 raiseStrength;
    }

    Chest[] public chests;
    FishbankBoosters public boosterContract;
    mapping(uint256 => address) public approved;
    mapping(address => uint256) public balances;
    mapping(address => bool) public minters;

    modifier onlyChestOwner(uint256 _tokenId) {
        require(chests[_tokenId].owner == msg.sender);
        _;
    }

    modifier onlyMinters() {
        require(minters[msg.sender]);
        _;
    }

    function FishbankChests(address _boosterAddress) public {
        boosterContract = FishbankBoosters(_boosterAddress);
    }

    function addMinter(address _minter) onlyOwner public {
        minters[_minter] = true;
    }

    function removeMinter(address _minter) onlyOwner public {
        minters[_minter] = false;
    }

    //create a chest

    function mintChest(address _owner, uint16 _boosters, uint24 _raiseStrength, uint24 _raiseChance, uint8 _onlySpecificType, uint8 _onlySpecificStrength) onlyMinters public {

        chests.length++;
        chests[chests.length - 1].owner = _owner;
        chests[chests.length - 1].boosters = _boosters;
        chests[chests.length - 1].raiseStrength = _raiseStrength;
        chests[chests.length - 1].raiseChance = _raiseChance;
        chests[chests.length - 1].onlySpecificType = _onlySpecificType;
        chests[chests.length - 1].onlySpecificStrength = _onlySpecificStrength;
        Transfer(address(0), _owner, chests.length - 1);
    }

    function convertChest(uint256 _tokenId) onlyChestOwner(_tokenId) public {

        Chest memory chest = chests[_tokenId];
        uint16 numberOfBoosters = chest.boosters;

        if (chest.onlySpecificType != 0) {//Specific boosters
            if (chest.onlySpecificType == 1 || chest.onlySpecificType == 3) {
                boosterContract.mintBooster(msg.sender, 2 days, chest.onlySpecificType, chest.onlySpecificStrength, chest.boosters, chest.raiseStrength);
            } else if (chest.onlySpecificType == 5) {//Instant attack
                boosterContract.mintBooster(msg.sender, 0, 5, 1, chest.boosters, chest.raiseStrength);
            } else if (chest.onlySpecificType == 2) {//Freeze
                uint32 freezeTime = 7 days;
                if (chest.onlySpecificStrength == 2) {
                    freezeTime = 14 days;
                } else if (chest.onlySpecificStrength == 3) {
                    freezeTime = 30 days;
                }
                boosterContract.mintBooster(msg.sender, freezeTime, 5, chest.onlySpecificType, chest.boosters, chest.raiseStrength);
            } else if (chest.onlySpecificType == 4) {//Watch
                uint32 watchTime = 12 hours;
                if (chest.onlySpecificStrength == 2) {
                    watchTime = 48 hours;
                } else if (chest.onlySpecificStrength == 3) {
                    watchTime = 3 days;
                }
                boosterContract.mintBooster(msg.sender, watchTime, 4, chest.onlySpecificStrength, chest.boosters, chest.raiseStrength);
            }

        } else {//Regular chest

            for (uint8 i = 0; i < numberOfBoosters; i ++) {
                uint24 random = uint16(keccak256(block.coinbase, block.blockhash(block.number - 1), i, chests.length)) % 1000
                - chest.raiseChance;
                //get random 0 - 9999 minus raiseChance

                if (random > 850) {
                    boosterContract.mintBooster(msg.sender, 2 days, 1, 1, 1, chest.raiseStrength); //Small Agility Booster
                } else if (random > 700) {
                    boosterContract.mintBooster(msg.sender, 7 days, 2, 1, 1, chest.raiseStrength); //Small Freezer
                } else if (random > 550) {
                    boosterContract.mintBooster(msg.sender, 2 days, 3, 1, 1, chest.raiseStrength); //Small Power Booster
                } else if (random > 400) {
                    boosterContract.mintBooster(msg.sender, 12 hours, 4, 1, 1, chest.raiseStrength); //Tiny Watch
                } else if (random > 325) {
                    boosterContract.mintBooster(msg.sender, 48 hours, 4, 2, 1, chest.raiseStrength); //Small Watch
                } else if (random > 250) {
                    boosterContract.mintBooster(msg.sender, 2 days, 1, 2, 1, chest.raiseStrength); //Mid Agility Booster
                } else if (random > 175) {
                    boosterContract.mintBooster(msg.sender, 14 days, 2, 2, 1, chest.raiseStrength); //Mid Freezer
                } else if (random > 100) {
                    boosterContract.mintBooster(msg.sender, 2 days, 3, 2, 1, chest.raiseStrength); //Mid Power Booster
                } else if (random > 80) {
                    boosterContract.mintBooster(msg.sender, 2 days, 1, 3, 1, chest.raiseStrength); //Big Agility Booster
                } else if (random > 60) {
                    boosterContract.mintBooster(msg.sender, 30 days, 2, 3, 1, chest.raiseStrength); //Big Freezer
                } else if (random > 40) {
                    boosterContract.mintBooster(msg.sender, 2 days, 3, 3, 1, chest.raiseStrength); //Big Power Booster
                } else if (random > 20) {
                    boosterContract.mintBooster(msg.sender, 0, 5, 1, 1, 0); //Instant Attack
                } else {
                    boosterContract.mintBooster(msg.sender, 3 days, 4, 3, 1, 0); //Gold Watch
                }
            }
        }

        _transfer(msg.sender, address(0), _tokenId); //burn chest
    }

    //ERC721 functionality
    //could split this to a different contract but doesn't make it easier to read
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    function totalSupply() public view returns (uint256 total) {
        total = chests.length;
    }

    function balanceOf(address _owner) public view returns (uint256 balance){
        balance = balances[_owner];
    }

    function ownerOf(uint256 _tokenId) public view returns (address owner){
        owner = chests[_tokenId].owner;
    }

    function _transfer(address _from, address _to, uint256 _tokenId) internal {
        require(chests[_tokenId].owner == _from); //can only transfer if previous owner equals from
        chests[_tokenId].owner = _to;
        approved[_tokenId] = address(0); //reset approved of fish on every transfer
        balances[_from] -= 1; //underflow can only happen on 0x
        balances[_to] += 1; //overflows only with very very large amounts of fish
        Transfer(_from, _to, _tokenId);
    }

    function transfer(address _to, uint256 _tokenId) public
    onlyChestOwner(_tokenId) //check if msg.sender is the owner of this fish
    returns (bool)
    {
        _transfer(msg.sender, _to, _tokenId);
        //after master modifier invoke internal transfer
        return true;
    }

    function approve(address _to, uint256 _tokenId) public
    onlyChestOwner(_tokenId)
    {
        approved[_tokenId] = _to;
        Approval(msg.sender, _to, _tokenId);
    }

    function transferFrom(address _from, address _to, uint256 _tokenId) public returns (bool) {
        require(approved[_tokenId] == msg.sender);
        //require msg.sender to be approved for this token
        _transfer(_from, _to, _tokenId);
        //handles event, balances and approval reset
        return true;
    }

}





contract FishbankUtils is Ownable {

    uint32[100] cooldowns = [
        720 minutes, 720 minutes, 720 minutes, 720 minutes, 720 minutes, //1-5
        660 minutes, 660 minutes, 660 minutes, 660 minutes, 660 minutes, //6-10
        600 minutes, 600 minutes, 600 minutes, 600 minutes, 600 minutes, //11-15
        540 minutes, 540 minutes, 540 minutes, 540 minutes, 540 minutes, //16-20
        480 minutes, 480 minutes, 480 minutes, 480 minutes, 480 minutes, //21-25
        420 minutes, 420 minutes, 420 minutes, 420 minutes, 420 minutes, //26-30
        360 minutes, 360 minutes, 360 minutes, 360 minutes, 360 minutes, //31-35
        300 minutes, 300 minutes, 300 minutes, 300 minutes, 300 minutes, //36-40
        240 minutes, 240 minutes, 240 minutes, 240 minutes, 240 minutes, //41-45
        180 minutes, 180 minutes, 180 minutes, 180 minutes, 180 minutes, //46-50
        120 minutes, 120 minutes, 120 minutes, 120 minutes, 120 minutes, //51-55
        90 minutes,  90 minutes,  90 minutes,  90 minutes,  90 minutes,  //56-60
        75 minutes,  75 minutes,  75 minutes,  75 minutes,  75 minutes,  //61-65
        60 minutes,  60 minutes,  60 minutes,  60 minutes,  60 minutes,  //66-70
        50 minutes,  50 minutes,  50 minutes,  50 minutes,  50 minutes,  //71-75
        40 minutes,  40 minutes,  40 minutes,  40 minutes,  40 minutes,  //76-80
        30 minutes,  30 minutes,  30 minutes,  30 minutes,  30 minutes,  //81-85
        20 minutes,  20 minutes,  20 minutes,  20 minutes,  20 minutes,  //86-90
        10 minutes,  10 minutes,  10 minutes,  10 minutes,  10 minutes,  //91-95
        5 minutes,   5 minutes,   5 minutes,   5 minutes,   5 minutes    //96-100
    ];


    function setCooldowns(uint32[100] _cooldowns) onlyOwner public {
        cooldowns = _cooldowns;
    }

    function getFishParams(uint256 hashSeed1, uint256 hashSeed2, uint256 fishesLength, address coinbase) external pure returns (uint32[4]) {

        bytes32[5] memory hashSeeds;
        hashSeeds[0] = keccak256(hashSeed1 ^ hashSeed2); //xor both seed from owner and user so no one can cheat
        hashSeeds[1] = keccak256(hashSeeds[0], fishesLength);
        hashSeeds[2] = keccak256(hashSeeds[1], coinbase);
        hashSeeds[3] = keccak256(hashSeeds[2], coinbase, fishesLength);
        hashSeeds[4] = keccak256(hashSeeds[1], hashSeeds[2], hashSeeds[0]);

        uint24[6] memory seeds = [
            uint24(uint(hashSeeds[3]) % 10e6 + 1), //whale chance
            uint24(uint(hashSeeds[0]) % 420 + 1), //power
            uint24(uint(hashSeeds[1]) % 420 + 1), //agility
            uint24(uint(hashSeeds[2]) % 150 + 1), //speed
            uint24(uint(hashSeeds[4]) % 16 + 1), //whale type
            uint24(uint(hashSeeds[4]) % 5000 + 1) //rarity
        ];

        uint32[4] memory fishParams;

        if (seeds[0] == 1000000) {//This is a whale 1:1 000 000 chance

            if (seeds[4] == 1) {//Orca
                fishParams = [140 + uint8(seeds[1] / 42), 140 + uint8(seeds[2] / 42), 75 + uint8(seeds[3] / 6), uint32(500000)];
                if(fishParams[0] == 140) {
                    fishParams[0]++;
                }
                if(fishParams[1] == 140) {
                    fishParams[1]++;
                }
                if(fishParams[2] == 75) {
                    fishParams[2]++;
                }
            } else if (seeds[4] < 4) {//Blue whale
                fishParams = [130 + uint8(seeds[1] / 42), 130 + uint8(seeds[2] / 42), 75 + uint8(seeds[3] / 6), uint32(500000)];
                if(fishParams[0] == 130) {
                    fishParams[0]++;
                }
                if(fishParams[1] == 130) {
                    fishParams[1]++;
                }
                if(fishParams[2] == 75) {
                    fishParams[2]++;
                }
            } else {//Cachalot
                fishParams = [115 + uint8(seeds[1] / 28), 115 + uint8(seeds[2] / 28), 75 + uint8(seeds[3] / 6), uint32(500000)];
                if(fishParams[0] == 115) {
                    fishParams[0]++;
                }
                if(fishParams[1] == 115) {
                    fishParams[1]++;
                }
                if(fishParams[2] == 75) {
                    fishParams[2]++;
                }
            }
        } else {
            if (seeds[5] == 5000) {//Legendary
                fishParams = [85 + uint8(seeds[1] / 14), 85 + uint8(seeds[2] / 14), uint8(50 + seeds[3] / 3), uint32(1000)];
                if(fishParams[0] == 85) {
                    fishParams[0]++;
                }
                if(fishParams[1] == 85) {
                    fishParams[1]++;
                }
            } else if (seeds[5] > 4899) {//Epic
                fishParams = [50 + uint8(seeds[1] / 12), 50 + uint8(seeds[2] / 12), uint8(25 + seeds[3] / 2), uint32(300)];
                if(fishParams[0] == 50) {
                    fishParams[0]++;
                }
                if(fishParams[1] == 50) {
                    fishParams[1]++;
                }

            } else if (seeds[5] > 4000) {//Rare
                fishParams = [20 + uint8(seeds[1] / 14), 20 + uint8(seeds[2] / 14), uint8(25 + seeds[3] / 3), uint32(100)];
                if(fishParams[0] == 20) {
                    fishParams[0]++;
                }
                if(fishParams[1] == 20) {
                    fishParams[1]++;
                }
            } else {//Common
                fishParams = [uint8(seeds[1] / 21), uint8(seeds[2] / 21), uint8(seeds[3] / 3), uint32(36)];
                if (fishParams[0] == 0) {
                    fishParams[0] = 1;
                }
                if (fishParams[1] == 0) {
                    fishParams[1] = 1;
                }
                if (fishParams[2] == 0) {
                    fishParams[2] = 1;
                }
            }
        }

        return fishParams;
    }

    function getCooldown(uint16 speed) external view returns (uint64){
        return uint64(now + cooldowns[speed - 1]);
    }

    //Ceiling function for fish generator
    function ceil(uint base, uint divider) internal pure returns (uint) {
        return base / divider + ((base % divider > 0) ? 1 : 0);
    }
}




/// @title Auction contract for any type of erc721 token
/// @author Fishbank

contract ERC721 {

    function implementsERC721() public pure returns (bool);

    function totalSupply() public view returns (uint256 total);

    function balanceOf(address _owner) public view returns (uint256 balance);

    function ownerOf(uint256 _tokenId) public view returns (address owner);

    function approve(address _to, uint256 _tokenId) public;

    function transferFrom(address _from, address _to, uint256 _tokenId) public returns (bool);

    function transfer(address _to, uint256 _tokenId) public returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

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


contract ERC721Auction is Beneficiary {

    struct Auction {
        address seller;
        uint256 tokenId;
        uint64 auctionBegin;
        uint64 auctionEnd;
        uint256 startPrice;
        uint256 endPrice;
    }

    uint32 public auctionDuration = 7 days;

    ERC721 public ERC721Contract;
    uint256 public fee = 45000; //in 1 10000th of a percent so 4.5% at the start
    uint256 constant FEE_DIVIDER = 1000000;
    mapping(uint256 => Auction) public auctions;

    event AuctionWon(uint256 indexed tokenId, address indexed winner, address indexed seller, uint256 price);

    event AuctionStarted(uint256 indexed tokenId, address indexed seller);

    event AuctionFinalized(uint256 indexed tokenId, address indexed seller);


    function startAuction(uint256 _tokenId, uint256 _startPrice, uint256 _endPrice) external {
        require(ERC721Contract.transferFrom(msg.sender, address(this), _tokenId));
        //Prices must be in range from 0.01 Eth and 10 000 Eth
        require(_startPrice <= 10000 ether && _endPrice <= 10000 ether);
        require(_startPrice >= (1 ether / 100) && _endPrice >= (1 ether / 100));

        Auction memory auction;

        auction.seller = msg.sender;
        auction.tokenId = _tokenId;
        auction.auctionBegin = uint64(now);
        auction.auctionEnd = uint64(now + auctionDuration);
        require(auction.auctionEnd > auction.auctionBegin);
        auction.startPrice = _startPrice;
        auction.endPrice = _endPrice;

        auctions[_tokenId] = auction;

        AuctionStarted(_tokenId, msg.sender);
    }


    function buyAuction(uint256 _tokenId) payable external {
        Auction storage auction = auctions[_tokenId];

        uint256 price = calculateBid(_tokenId);
        uint256 totalFee = price * fee / FEE_DIVIDER; //safe math needed?

        require(price <= msg.value); //revert if not enough ether send

        if (price != msg.value) {//send back to much eth
            msg.sender.transfer(msg.value - price);
        }

        beneficiary.transfer(totalFee);

        auction.seller.transfer(price - totalFee);

        if (!ERC721Contract.transfer(msg.sender, _tokenId)) {
            revert();
            //can't complete transfer if this fails
        }

        AuctionWon(_tokenId, msg.sender, auction.seller, price);

        delete auctions[_tokenId];
        //deletes auction
    }

    function saveToken(uint256 _tokenId) external {
        require(auctions[_tokenId].auctionEnd < now);
        //auction must have ended
        require(ERC721Contract.transfer(auctions[_tokenId].seller, _tokenId));
        //transfer fish back to seller

        AuctionFinalized(_tokenId, auctions[_tokenId].seller);

        delete auctions[_tokenId];
        //delete auction
    }

    function ERC721Auction(address _ERC721Contract) public {
        ERC721Contract = ERC721(_ERC721Contract);
    }

    function setFee(uint256 _fee) onlyOwner public {
        if (_fee > fee) {
            revert(); //fee can only be set to lower value to prevent attacks by owner
        }
        fee = _fee; // all is well set fee
    }

    function calculateBid(uint256 _tokenId) public view returns (uint256) {
        Auction storage auction = auctions[_tokenId];

        if (now >= auction.auctionEnd) {//if auction ended return auction end price
            return auction.endPrice;
        }
        //get hours passed
        uint256 hoursPassed = (now - auction.auctionBegin) / 1 hours;
        uint256 currentPrice;
        //get total hours
        uint16 totalHours = uint16(auctionDuration /1 hours) - 1;

        if (auction.endPrice > auction.startPrice) {
            currentPrice = auction.startPrice + (hoursPassed * (auction.endPrice - auction.startPrice))/ totalHours;
        } else if(auction.endPrice < auction.startPrice) {
            currentPrice = auction.startPrice - (hoursPassed * (auction.startPrice - auction.endPrice))/ totalHours;
        } else {//start and end are the same
            currentPrice = auction.endPrice;
        }

        return uint256(currentPrice);
        //return the price at this very moment
    }

    /// return token if case when need to redeploy auction contract
    function returnToken(uint256 _tokenId) onlyOwner public {
        require(ERC721Contract.transfer(auctions[_tokenId].seller, _tokenId));
        //transfer fish back to seller

        AuctionFinalized(_tokenId, auctions[_tokenId].seller);

        delete auctions[_tokenId];
    }
}


/// @title Core contract of fishbank
/// @author Fishbank

contract Fishbank is ChestsStore {

    struct Fish {
        address owner;
        uint8 activeBooster;
        uint64 boostedTill;
        uint8 boosterStrength;
        uint24 boosterRaiseValue;
        uint64 weight;
        uint16 power;
        uint16 agility;
        uint16 speed;
        bytes16 color;
        uint64 canFightAgain;
        uint64 canBeAttackedAgain;
    }

    struct FishingAttempt {
        address fisher;
        uint256 feePaid;
        address affiliate;
        uint256 seed;
        uint64 deadline;//till when does the contract owner have time to resolve;
    }

    modifier onlyFishOwner(uint256 _tokenId) {
        require(fishes[_tokenId].owner == msg.sender);
        _;
    }

    modifier onlyResolver() {
        require(msg.sender == resolver);
        _;
    }

    modifier onlyMinter() {
        require(msg.sender == minter);
        _;
    }

    Fish[] public fishes;
    address public resolver;
    address public auction;
    address public minter;
    bool public implementsERC721 = true;
    string public name = "Fishbank";
    string public symbol = "FISH";
    bytes32[] public randomHashes;
    uint256 public hashesUsed;
    uint256 public aquariumCost = 1 ether / 100 * 3;//fee for fishing starts at 0.03 ether
    uint256 public resolveTime = 30 minutes;//how long does the contract owner have to resolve hashes
    uint16 public weightLostPartLimit = 5;
    FishbankBoosters public boosters;
    FishbankChests public chests;
    FishbankUtils private utils;


    mapping(bytes32 => FishingAttempt) public pendingFishing;//attempts that need solving;

    mapping(uint256 => address) public approved;
    mapping(address => uint256) public balances;
    mapping(address => bool) public affiliated;

    event AquariumFished(
        bytes32 hash,
        address fisher,
        uint256 feePaid
    ); //event broadcated when someone fishes in aqaurium

    event AquariumResolved(bytes32 hash, address fisher);

    event Attack(
        uint256 attacker,
        uint256 victim,
        uint256 winner,
        uint64 weight,
        uint256 ap, uint256 vp, uint256 random
    );

    event BoosterApplied(uint256 tokenId, uint256 boosterId);

    /// @notice Constructor of the contract. Sets resolver, beneficiary, boosters and chests
    /// @param _boosters the address of the boosters smart contract
    /// @param _chests the address of the chests smart contract

    function Fishbank(address _boosters, address _chests, address _utils) ChestsStore(_chests) public {

        resolver = msg.sender;
        beneficiary = msg.sender;
        boosters = FishbankBoosters(_boosters);
        chests = FishbankChests(_chests);
        utils = FishbankUtils(_utils);
    }

    /// @notice Mints fishes according to params can only be called by the owner
    /// @param _owner array of addresses the fishes should be owned by
    /// @param _weight array of weights for the fishes
    /// @param _power array of power levels for the fishes
    /// @param _agility array of agility levels for the fishes
    /// @param _speed array of speed levels for the fishes
    /// @param _color array of color params for the fishes

    function mintFish(address[] _owner, uint32[] _weight, uint8[] _power, uint8[] _agility, uint8[] _speed, bytes16[] _color) onlyMinter public {

        for (uint i = 0; i < _owner.length; i ++) {
            _mintFish(_owner[i], _weight[i], _power[i], _agility[i], _speed[i], _color[i]);
        }
    }

    /// @notice Internal method for minting a fish
    /// @param _owner address of owner for the fish
    /// @param _weight weight param for fish
    /// @param _power power param for fish
    /// @param _agility agility param for the fish
    /// @param _speed speed param for the fish
    /// @param _color color param for the fish

    function _mintFish(address _owner, uint32 _weight, uint8 _power, uint8 _agility, uint8 _speed, bytes16 _color) internal {

        fishes.length += 1;
        uint256 newFishId = fishes.length - 1;

        Fish storage newFish = fishes[newFishId];

        newFish.owner = _owner;
        newFish.weight = _weight;
        newFish.power = _power;
        newFish.agility = _agility;
        newFish.speed = _speed;
        newFish.color = _color;

        balances[_owner] ++;

        Transfer(address(0), _owner, newFishId);
    }

    function setWeightLostPartLimit(uint8 _weightPart) onlyOwner public {
        weightLostPartLimit = _weightPart;
    }

    /// @notice Sets the cost for fishing in the aquarium
    /// @param _fee new fee for fishing in wei
    function setAquariumCost(uint256 _fee) onlyOwner public {
        aquariumCost = _fee;
    }

    /// @notice Sets address that resolves hashes for fishing can only be called by the owner
    /// @param _resolver address of the resolver
    function setResolver(address _resolver) onlyOwner public {
        resolver = _resolver;
    }


    /// @notice Sets the address getting the proceedings from fishing in the aquarium
    /// @param _beneficiary address of the new beneficiary
    function setBeneficiary(address _beneficiary) onlyOwner public {
        beneficiary = _beneficiary;
    }

    function setAuction(address _auction) onlyOwner public {
        auction = _auction;
    }

    function setBoosters(address _boosters) onlyOwner public {
        boosters = FishbankBoosters(_boosters);
    }

    function setMinter(address _minter) onlyOwner public {
        minter = _minter;
    }

    function setUtils(address _utils) onlyOwner public {
        utils = FishbankUtils(_utils);
    }

    /// batch fishing from 1 to 10 times
    function batchFishAquarium(uint256[] _seeds, address _affiliate) payable public {
        require(_seeds.length > 0 && _seeds.length <= 10);
        require(msg.value >= aquariumCost * _seeds.length);
        //must send enough ether to cover costs
        require(randomHashes.length > hashesUsed + _seeds.length);
        //there needs to be a hash left

        if (msg.value > aquariumCost * _seeds.length) {
            msg.sender.transfer(msg.value - aquariumCost * _seeds.length);
            //send to much ether back
        }

        for (uint256 i = 0; i < _seeds.length; i ++) {
            _fishAquarium(_seeds[i]);
        }

        if(_affiliate != address(0)) {
            pendingFishing[randomHashes[hashesUsed - 1]].affiliate = _affiliate;
        }
    }

    function _fishAquarium(uint256 _seed) internal {
        //this loop prevents from using the same hash as another fishing attempt if the owner submits the same hash multiple times
        while (pendingFishing[randomHashes[hashesUsed]].fisher != address(0)) {
            hashesUsed++;
            //increase hashesUsed and try next one
        }

        FishingAttempt storage newAttempt = pendingFishing[randomHashes[hashesUsed]];

        newAttempt.fisher = msg.sender;
        newAttempt.feePaid = aquariumCost;
        //set the fee paid so it can be returned if the hash doesn't get resolved fast enough
        newAttempt.seed = _seed;
        //sets the seed that gets combined with the random seed of the owner
        newAttempt.deadline = uint64(now + resolveTime);
        //saves deadline after which the fisher can redeem his fishing fee

        hashesUsed++;
        //increase hashes used so it cannot be used again

        AquariumFished(randomHashes[hashesUsed - 1], msg.sender, aquariumCost);
        //broadcast event
    }

    /// @notice Call this to resolve hashes and generate fish/chests
    /// @param _seed seed that corresponds to the hash
    function _resolveAquarium(uint256 _seed) internal {
        bytes32 tempHash = keccak256(_seed);
        FishingAttempt storage tempAttempt = pendingFishing[tempHash];

        require(tempAttempt.fisher != address(0));
        //attempt must be set so we look if fisher is set

        if (tempAttempt.affiliate != address(0) && !affiliated[tempAttempt.fisher]) {//if affiliate is set
            chests.mintChest(tempAttempt.affiliate, 1, 0, 0, 0, 0);
            //Chest with one random booster
            affiliated[tempAttempt.fisher] = true;
        }

        uint32[4] memory fishParams = utils.getFishParams(_seed, tempAttempt.seed, fishes.length, block.coinbase);

        _mintFish(tempAttempt.fisher, fishParams[3], uint8(fishParams[0]), uint8(fishParams[1]), uint8(fishParams[2]), bytes16(keccak256(_seed ^ tempAttempt.seed)));

        beneficiary.transfer(tempAttempt.feePaid);
        AquariumResolved(tempHash, tempAttempt.fisher);
        //broadcast event

        delete pendingFishing[tempHash];
        //delete fishing attempt
    }

    /// @notice Batch resolve fishing attempts
    /// @param _seeds array of seeds that correspond to hashes that need resolving
    function batchResolveAquarium(uint256[] _seeds) onlyResolver public {
        for (uint256 i = 0; i < _seeds.length; i ++) {
            _resolveAquarium(_seeds[i]);
        }
    }


    /// @notice Adds an array of hashes to be used for resolving
    /// @param _hashes array of hashes to add
    function addHash(bytes32[] _hashes) onlyResolver public {
        for (uint i = 0; i < _hashes.length; i ++) {
            randomHashes.push(_hashes[i]);
        }
    }

    /// @notice Call this function to attack another fish
    /// @param _attacker ID of fish that is attacking
    /// @param _victim ID of fish to attack
    function attack(uint256 _attacker, uint256 _victim) onlyFishOwner(_attacker) public {

        Fish memory attacker = fishes[_attacker];
        Fish memory victim = fishes[_victim];

        //check if attacker is sleeping
        if (attacker.activeBooster == 2 && attacker.boostedTill > now) {//if your fish is sleeping auto awake it
            fishes[_attacker].activeBooster = 0;
            attacker.boostedTill = uint64(now);
            //set booster to invalid one so it has no effect
        }

        //check if victim has active sleeping booster
        require(!((victim.activeBooster == 2) && victim.boostedTill >= now));
        //cannot attack a sleeping fish
        require(now >= attacker.canFightAgain);
        //check if attacking fish is cooled down
        require(now >= victim.canBeAttackedAgain);
        //check if victim fish can be attacked again


        if (msg.sender == victim.owner) {
            uint64 weight = attacker.weight < victim.weight ? attacker.weight : victim.weight;
            fishes[_attacker].weight += weight;
            fishes[_victim].weight -= weight;
            fishes[_attacker].canFightAgain = uint64(utils.getCooldown(attacker.speed));

            if (fishes[_victim].weight == 0) {
                _transfer(msg.sender, address(0), _victim);
                balances[fishes[_victim].owner] --;
                //burn token
            } else {
                fishes[_victim].canBeAttackedAgain = uint64(now + 1 hours);
                //set victim cooldown 1 hour
            }

            Attack(_attacker, _victim, _attacker, weight, 0, 0, 0);
            return;
        }

        if (victim.weight < 2 || attacker.weight < 2) {
            revert();
            //revert if one of the fish is below fighting weight
        }

        uint256 AP = getFightingAmounts(attacker, true);
        // get attacker power
        uint256 VP = getFightingAmounts(victim, false);
        // get victim power

        bytes32 randomHash = keccak256(block.coinbase, block.blockhash(block.number - 1), fishes.length);

        uint256 max = AP > VP ? AP : VP;
        uint256 attackRange = max * 2;
        uint256 random = uint256(randomHash) % attackRange + 1;

        uint64 weightLost;

        if (random <= (max + AP - VP)) {
            weightLost = _handleWin(_attacker, _victim);
            Attack(_attacker, _victim, _attacker, weightLost, AP, VP, random);
        } else {
            weightLost = _handleWin(_victim, _attacker);
            Attack(_attacker, _victim, _victim, weightLost, AP, VP, random);
            //broadcast event
        }

        fishes[_attacker].canFightAgain = uint64(utils.getCooldown(attacker.speed));
        fishes[_victim].canBeAttackedAgain = uint64(now + 1 hours);
        //set victim cooldown 1 hour
    }

    /// @notice Handles lost gained weight after fight
    /// @param _winner the winner of the fight
    /// @param _loser the loser of the fight
    function _handleWin(uint256 _winner, uint256 _loser) internal returns (uint64) {
        Fish storage winner = fishes[_winner];
        Fish storage loser = fishes[_loser];

        uint64 fullWeightLost = loser.weight / sqrt(winner.weight);
        uint64 maxWeightLost = loser.weight / weightLostPartLimit;

        uint64 weightLost = maxWeightLost < fullWeightLost ? maxWeightLost : fullWeightLost;

        if (weightLost < 1) {
            weightLost = 1;
            // Minimum 1
        }

        winner.weight += weightLost;
        loser.weight -= weightLost;

        return weightLost;
    }

    /// @notice get attack and defence from fish
    /// @param _fish is Fish token
    /// @param _is_attacker true if fish is attacker otherwise false
    function getFightingAmounts(Fish _fish, bool _is_attacker) internal view returns (uint256){
        return (getFishPower(_fish) * (_is_attacker ? 60 : 40) + getFishAgility(_fish) * (_is_attacker ? 40 : 60)) * _fish.weight;
    }

    /// @notice Apply a booster to a fish
    /// @param _tokenId the fish the booster should be applied to
    /// @param _booster the Id of the booster the token should be applied to
    function applyBooster(uint256 _tokenId, uint256 _booster) onlyFishOwner(_tokenId) public {
        require(msg.sender == boosters.ownerOf(_booster));
        //only owner can do this
        require(boosters.getBoosterAmount(_booster) >= 1);
        Fish storage tempFish = fishes[_tokenId];
        uint8 boosterType = uint8(boosters.getBoosterType(_booster));

        if (boosterType == 1 || boosterType == 2 || boosterType == 3) {//if booster is attack or agility or sleep
            tempFish.boosterStrength = boosters.getBoosterStrength(_booster);
            tempFish.activeBooster = boosterType;
            tempFish.boostedTill = boosters.getBoosterDuration(_booster) * boosters.getBoosterAmount(_booster) + uint64(now);
            tempFish.boosterRaiseValue = boosters.getBoosterRaiseValue(_booster);
        }
        else if (boosterType == 4) {//watch booster
            require(tempFish.boostedTill > uint64(now));
            //revert on using watch on booster that has passed;
            tempFish.boosterStrength = boosters.getBoosterStrength(_booster);
            tempFish.boostedTill += boosters.getBoosterDuration(_booster) * boosters.getBoosterAmount(_booster);
            //add time to booster
        }
        else if (boosterType == 5) {//Instant attack
            require(boosters.getBoosterAmount(_booster) == 1);
            //Can apply only one instant attack booster
            tempFish.canFightAgain = 0;
        }

        require(boosters.transferFrom(msg.sender, address(0), _booster));
        //burn booster

        BoosterApplied(_tokenId, _booster);
    }

    /// @notice square root function used for weight gain/loss
    /// @param x uint64 to get square root from
    function sqrt(uint64 x) pure internal returns (uint64 y) {
        uint64 z = (x + 1) / 2;
        y = x;
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
    }

    //utlitiy function for easy testing can be removed later
    function doKeccak256(uint256 _input) pure public returns (bytes32) {
        return keccak256(_input);
    }

    function getFishPower(Fish _fish) internal view returns (uint24 power) {
        power = _fish.power;
        if (_fish.activeBooster == 1 && _fish.boostedTill > now) {// check if booster active
            uint24 boosterPower = (10 * _fish.boosterStrength + _fish.boosterRaiseValue + 100) * power / 100 - power;
            if (boosterPower < 1 && _fish.boosterStrength == 1) {
                power += 1;
            } else if (boosterPower < 3 && _fish.boosterStrength == 2) {
                power += 3;
            } else if (boosterPower < 5 && _fish.boosterStrength == 3) {
                power += 5;
            } else {
                power = boosterPower + power;
            }
        }
    }

    function getFishAgility(Fish _fish) internal view returns (uint24 agility) {
        agility = _fish.agility;
        if (_fish.activeBooster == 3 && _fish.boostedTill > now) {// check if booster active
            uint24 boosterPower = (10 * _fish.boosterStrength + _fish.boosterRaiseValue + 100) * agility / 100 - agility;
            if (boosterPower < 1 && _fish.boosterStrength == 1) {
                agility += 1;
            } else if (boosterPower < 3 && _fish.boosterStrength == 2) {
                agility += 3;
            } else if (boosterPower < 5 && _fish.boosterStrength == 3) {
                agility += 5;
            } else {
                agility = boosterPower + agility;
            }
        }
    }


    //ERC721 functionality
    //could split this to a different contract but doesn't make it easier to read
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    function totalSupply() public view returns (uint256 total) {
        total = fishes.length;
    }

    function balanceOf(address _owner) public view returns (uint256 balance){
        balance = balances[_owner];
    }

    function ownerOf(uint256 _tokenId) public view returns (address owner){
        owner = fishes[_tokenId].owner;
    }

    function _transfer(address _from, address _to, uint256 _tokenId) internal {
        require(fishes[_tokenId].owner == _from);
        //can only transfer if previous owner equals from
        fishes[_tokenId].owner = _to;
        approved[_tokenId] = address(0);
        //reset approved of fish on every transfer
        balances[_from] -= 1;
        //underflow can only happen on 0x
        balances[_to] += 1;
        //overflows only with very very large amounts of fish
        Transfer(_from, _to, _tokenId);
    }

    function transfer(address _to, uint256 _tokenId) public
    onlyFishOwner(_tokenId) //check if msg.sender is the owner of this fish
    returns (bool)
    {
        _transfer(msg.sender, _to, _tokenId);
        //after master modifier invoke internal transfer
        return true;
    }

    function approve(address _to, uint256 _tokenId) public
    onlyFishOwner(_tokenId)
    {
        approved[_tokenId] = _to;
        Approval(msg.sender, _to, _tokenId);
    }

    function transferFrom(address _from, address _to, uint256 _tokenId) public returns (bool) {
        require(approved[_tokenId] == msg.sender || msg.sender == auction);
        Fish storage fish = fishes[_tokenId];

        if (msg.sender == auction) {
            fish.activeBooster = 2;
            //Freeze for auction
            fish.boostedTill = uint64(now + 7 days);
            fish.boosterStrength = 1;
        }
        //require msg.sender to be approved for this token
        _transfer(_from, _to, _tokenId);
        //handles event, balances and approval reset
        return true;
    }

    function takeOwnership(uint256 _tokenId) public {
        require(approved[_tokenId] == msg.sender);
        _transfer(ownerOf(_tokenId), msg.sender, _tokenId);
    }

}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"resolver","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolveTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_chestId","type":"uint16"}],"name":"buyChest","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address[]"},{"name":"_weight","type":"uint32[]"},{"name":"_power","type":"uint8[]"},{"name":"_agility","type":"uint8[]"},{"name":"_speed","type":"uint8[]"},{"name":"_color","type":"bytes16[]"}],"name":"mintFish","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"chestId","type":"uint16"},{"name":"price","type":"uint256"},{"name":"boosters","type":"uint16"},{"name":"isLimited","type":"bool"},{"name":"limit","type":"uint32"},{"name":"raiseChance","type":"uint24"},{"name":"raiseStrength","type":"uint24"},{"name":"onlyBoosterType","type":"uint8"},{"name":"onlyBoosterStrength","type":"uint8"}],"name":"setChestProduct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"implementsERC721","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_seeds","type":"uint256[]"}],"name":"batchResolveAquarium","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"randomHashes","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"total","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"aquariumCost","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"setBeneficiary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"chestProducts","outputs":[{"name":"price","type":"uint256"},{"name":"isLimited","type":"bool"},{"name":"limit","type":"uint32"},{"name":"boosters","type":"uint16"},{"name":"raiseChance","type":"uint24"},{"name":"raiseStrength","type":"uint24"},{"name":"onlyBoosterType","type":"uint8"},{"name":"onlyBoosterStrength","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_booster","type":"uint256"}],"name":"applyBooster","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"weightLostPartLimit","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_input","type":"uint256"}],"name":"doKeccak256","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"pendingFishing","outputs":[{"name":"fisher","type":"address"},{"name":"feePaid","type":"uint256"},{"name":"affiliate","type":"address"},{"name":"seed","type":"uint256"},{"name":"deadline","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_utils","type":"address"}],"name":"setUtils","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_weightPart","type":"uint8"}],"name":"setWeightLostPartLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"chests","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"approved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"auction","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initChestsStore","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_seeds","type":"uint256[]"},{"name":"_affiliate","type":"address"}],"name":"batchFishAquarium","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"takeOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hashesUsed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_hashes","type":"bytes32[]"}],"name":"addHash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"fishes","outputs":[{"name":"owner","type":"address"},{"name":"activeBooster","type":"uint8"},{"name":"boostedTill","type":"uint64"},{"name":"boosterStrength","type":"uint8"},{"name":"boosterRaiseValue","type":"uint24"},{"name":"weight","type":"uint64"},{"name":"power","type":"uint16"},{"name":"agility","type":"uint16"},{"name":"speed","type":"uint16"},{"name":"color","type":"bytes16"},{"name":"canFightAgain","type":"uint64"},{"name":"canBeAttackedAgain","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_auction","type":"address"}],"name":"setAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_boosters","type":"address"}],"name":"setBoosters","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"chestId","type":"uint16"},{"name":"price","type":"uint256"}],"name":"setChestPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"affiliated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_attacker","type":"uint256"},{"name":"_victim","type":"uint256"}],"name":"attack","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_fee","type":"uint256"}],"name":"setAquariumCost","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"boosters","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_boosters","type":"address"},{"name":"_chests","type":"address"},{"name":"_utils","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"hash","type":"bytes32"},{"indexed":false,"name":"fisher","type":"address"},{"indexed":false,"name":"feePaid","type":"uint256"}],"name":"AquariumFished","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"hash","type":"bytes32"},{"indexed":false,"name":"fisher","type":"address"}],"name":"AquariumResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"attacker","type":"uint256"},{"indexed":false,"name":"victim","type":"uint256"},{"indexed":false,"name":"winner","type":"uint256"},{"indexed":false,"name":"weight","type":"uint64"},{"indexed":false,"name":"ap","type":"uint256"},{"indexed":false,"name":"vp","type":"uint256"},{"indexed":false,"name":"random","type":"uint256"}],"name":"Attack","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"boosterId","type":"uint256"}],"name":"BoosterApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"approved","type":"address"},{"indexed":true,"name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052600161020460146101000a81548160ff0219169083151502179055506040805190810160405280600881526020017f4669736862616e6b00000000000000000000000000000000000000000000000081525061020590805190602001906200006e92919062000342565b506040805190810160405280600481526020017f46495348000000000000000000000000000000000000000000000000000000008152506102069080519060200190620000bd92919062000342565b50666a94d74f4300006102095561070861020a55600561020b60006101000a81548161ffff021916908361ffff1602179055503415620000fc57600080fd5b60405160608062005ec28339810160405280805190602001909190805190602001909190805190602001909190505081336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508061020060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550503361020260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508261020b60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508161020c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508061020d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050620003f1565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200038557805160ff1916838001178555620003b6565b82800160010185558215620003b6579182015b82811115620003b557825182559160200191906001019062000398565b5b509050620003c59190620003c9565b5090565b620003ee91905b80821115620003ea576000816000905550600101620003d0565b5090565b90565b615ac180620004016000396000f300606060405260043610610246576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806304f3bcec1461024b57806305ed76c4146102a0578063064701c6146102c957806306fdde03146102e55780630754617214610373578063082d7187146103c8578063095ea7b3146105625780630f3fc29e146105a45780631051db341461062f57806314c783331461065c57806316709c22146106b657806318160ddd146106f5578063197757951461071e5780631c31f7101461074757806323b872dd1461078057806327e235e3146107f957806338af3eed146108465780633fc83dc91461089b5780634e543b261461093b57806351b3666f146109745780635509b160146109a057806357788716146109d15780636224f93e14610a105780636352211e14610ad35780636995350114610b3657806370a0823114610b6f578063763a639014610bbc578063797f87ba14610be25780637d4061e614610c375780637d9f6db514610c9a5780638da5cb5b14610cef57806395d89b4114610d445780639e39db3814610dd2578063a9059cbb14610de7578063b0f94b1614610e41578063b2e6ceeb14610eaf578063b419dd2d14610ed2578063b5b90a2614610efb578063b68d6f3614610f55578063b8c6f579146110a9578063cbc846d9146110e2578063d1d46d2b1461111b578063dbc6f5481461114b578063e1fa76381461119c578063f2b1be45146111c8578063f2fde38b146111eb578063f37a7d4d14611224578063fca3b5aa14611279575b600080fd5b341561025657600080fd5b61025e6112b2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102ab57600080fd5b6102b36112d9565b6040518082815260200191505060405180910390f35b6102e3600480803561ffff169060200190919050506112e0565b005b34156102f057600080fd5b6102f8611675565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033857808201518184015260208101905061031d565b50505050905090810190601f1680156103655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037e57600080fd5b610386611714565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103d357600080fd5b610560600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061173b565b005b341561056d57600080fd5b6105a2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611856565b005b34156105af57600080fd5b61062d600480803561ffff1690602001909190803590602001909190803561ffff16906020019091908035151590602001909190803563ffffffff1690602001909190803562ffffff1690602001909190803562ffffff1690602001909190803560ff1690602001909190803560ff16906020019091905050611985565b005b341561063a57600080fd5b610642611aea565b604051808215151515815260200191505060405180910390f35b341561066757600080fd5b6106b4600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611afe565b005b34156106c157600080fd5b6106d76004808035906020019091905050611b9c565b60405180826000191660001916815260200191505060405180910390f35b341561070057600080fd5b610708611bc1565b6040518082815260200191505060405180910390f35b341561072957600080fd5b610731611bcf565b6040518082815260200191505060405180910390f35b341561075257600080fd5b61077e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611bd6565b005b341561078b57600080fd5b6107df600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611c75565b604051808215151515815260200191505060405180910390f35b341561080457600080fd5b610830600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611e3a565b6040518082815260200191505060405180910390f35b341561085157600080fd5b610859611e53565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156108a657600080fd5b6108bc6004808035906020019091905050611e79565b60405180898152602001881515151581526020018763ffffffff1663ffffffff1681526020018661ffff1661ffff1681526020018562ffffff1662ffffff1681526020018462ffffff1662ffffff1681526020018360ff1660ff1681526020018260ff1660ff1681526020019850505050505050505060405180910390f35b341561094657600080fd5b610972600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611f29565b005b341561097f57600080fd5b61099e6004808035906020019091908035906020019091905050611fc9565b005b34156109ab57600080fd5b6109b3612b0b565b604051808261ffff1661ffff16815260200191505060405180910390f35b34156109dc57600080fd5b6109f26004808035906020019091905050612b20565b60405180826000191660001916815260200191505060405180910390f35b3415610a1b57600080fd5b610a35600480803560001916906020019091905050612b3f565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018267ffffffffffffffff1667ffffffffffffffff1681526020019550505050505060405180910390f35b3415610ade57600080fd5b610af46004808035906020019091905050612bca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610b4157600080fd5b610b6d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612c15565b005b3415610b7a57600080fd5b610ba6600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612cb5565b6040518082815260200191505060405180910390f35b3415610bc757600080fd5b610be0600480803560ff16906020019091905050612cff565b005b3415610bed57600080fd5b610bf5612d7e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610c4257600080fd5b610c586004808035906020019091905050612da5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610ca557600080fd5b610cad612dd9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610cfa57600080fd5b610d02612e00565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610d4f57600080fd5b610d57612e25565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610d97578082015181840152602081019050610d7c565b50505050905090810190601f168015610dc45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610ddd57600080fd5b610de5612ec4565b005b3415610df257600080fd5b610e27600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050612f72565b604051808215151515815260200191505060405180910390f35b610ead60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613006565b005b3415610eba57600080fd5b610ed060048080359060200190919050506131a1565b005b3415610edd57600080fd5b610ee5613225565b6040518082815260200191505060405180910390f35b3415610f0657600080fd5b610f5360048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061322c565b005b3415610f6057600080fd5b610f7660048080359060200190919050506132f1565b604051808d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018c60ff1660ff1681526020018b67ffffffffffffffff1667ffffffffffffffff1681526020018a60ff1660ff1681526020018962ffffff1662ffffff1681526020018867ffffffffffffffff1667ffffffffffffffff1681526020018761ffff1661ffff1681526020018661ffff1661ffff1681526020018561ffff1661ffff168152602001846fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff191681526020018367ffffffffffffffff1667ffffffffffffffff1681526020018267ffffffffffffffff1667ffffffffffffffff1681526020019c5050505050505050505050505060405180910390f35b34156110b457600080fd5b6110e0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613441565b005b34156110ed57600080fd5b611119600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506134e1565b005b341561112657600080fd5b611149600480803561ffff16906020019091908035906020019091905050613581565b005b341561115657600080fd5b611182600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506135ff565b604051808215151515815260200191505060405180910390f35b34156111a757600080fd5b6111c66004808035906020019091908035906020019091905050613620565b005b34156111d357600080fd5b6111e960048080359060200190919050506143a2565b005b34156111f657600080fd5b611222600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050614408565b005b341561122f57600080fd5b61123761455d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561128457600080fd5b6112b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050614584565b005b61020260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61020a5481565b6112e8615766565b60028261ffff1660ff811015156112fb57fe5b600202016101006040519081016040529081600082015481526020016001820160009054906101000a900460ff161515151581526020016001820160019054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160059054906101000a900461ffff1661ffff1661ffff1681526020016001820160079054906101000a900462ffffff1662ffffff1662ffffff16815260200160018201600a9054906101000a900462ffffff1662ffffff1662ffffff16815260200160018201600d9054906101000a900460ff1660ff1660ff16815260200160018201600e9054906101000a900460ff1660ff1660ff168152505090506000816000015111151561140c57600080fd5b8060000151341015151561141f57600080fd5b8060200151158061143a57506000816040015163ffffffff16115b151561144557600080fd5b61020060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2356d233383606001518460a0015185608001518660c001518760e001516040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018661ffff1661ffff1681526020018562ffffff1662ffffff1681526020018462ffffff1662ffffff1681526020018360ff1660ff1681526020018260ff1660ff1681526020019650505050505050600060405180830381600087803b151561156657600080fd5b5af1151561157357600080fd5b50505060028261ffff1660ff8110151561158957fe5b60020201600001543411156115f5573373ffffffffffffffffffffffffffffffffffffffff166108fc60028461ffff1660ff811015156115c557fe5b600202016000015434039081150290604051600060405180830381858888f1935050505015156115f457600080fd5b5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60028461ffff1660ff8110151561164457fe5b60020201600001549081150290604051600060405180830381858888f19350505050151561167157600080fd5b5050565b6102058054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561170c5780601f106116e15761010080835404028352916020019161170c565b820191906000526020600020905b8154815290600101906020018083116116ef57829003601f168201915b505050505081565b61020460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061020460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561179a57600080fd5b600090505b865181101561184d5761184087828151811015156117b957fe5b9060200190602002015187838151811015156117d157fe5b9060200190602002015187848151811015156117e957fe5b90602001906020020151878581518110151561180157fe5b90602001906020020151878681518110151561181957fe5b90602001906020020151878781518110151561183157fe5b90602001906020020151614624565b808060010191505061179f565b50505050505050565b803373ffffffffffffffffffffffffffffffffffffffff166102018281548110151561187e57fe5b906000526020600020906003020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156118d257600080fd5b8261020f600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119e257600080fd5b60028a61ffff1660ff811015156119f557fe5b600202019050888160000181905550878160010160056101000a81548161ffff021916908361ffff160217905550868160010160006101000a81548160ff021916908315150217905550858160010160016101000a81548163ffffffff021916908363ffffffff160217905550848160010160076101000a81548162ffffff021916908362ffffff1602179055508381600101600a6101000a81548162ffffff021916908362ffffff1602179055508281600101600d6101000a81548160ff021916908360ff1602179055508181600101600e6101000a81548160ff021916908360ff16021790555050505050505050505050565b61020460149054906101000a900460ff1681565b600061020260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b5d57600080fd5b600090505b8151811015611b9857611b8b8282815181101515611b7c57fe5b9060200190602002015161483a565b8080600101915050611b62565b5050565b61020781815481101515611bac57fe5b90600052602060002090016000915090505481565b600061020180549050905090565b6102095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c3157600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000803373ffffffffffffffffffffffffffffffffffffffff1661020f600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611d34575061020360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611d3f57600080fd5b61020183815481101515611d4f57fe5b9060005260206000209060030201905061020360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611e235760028160000160146101000a81548160ff021916908360ff16021790555062093a8042018160000160156101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550600181600001601d6101000a81548160ff021916908360ff1602179055505b611e2e858585614e8d565b60019150509392505050565b6102106020528060005260406000206000915090505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028160ff81101515611e8857fe5b600202016000915090508060000154908060010160009054906101000a900460ff16908060010160019054906101000a900463ffffffff16908060010160059054906101000a900461ffff16908060010160079054906101000a900462ffffff169080600101600a9054906101000a900462ffffff169080600101600d9054906101000a900460ff169080600101600e9054906101000a900460ff16905088565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f8457600080fd5b8061020260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080833373ffffffffffffffffffffffffffffffffffffffff1661020182815481101515611ff457fe5b906000526020600020906003020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561204857600080fd5b61020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156120d957600080fd5b5af115156120e657600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561212957600080fd5b600161020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630f99da4a866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156121bc57600080fd5b5af115156121c957600080fd5b5050506040518051905063ffffffff16101515156121e657600080fd5b610201858154811015156121f657fe5b9060005260206000209060030201925061020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166365113528856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561229757600080fd5b5af115156122a457600080fd5b50505060405180519050915060018260ff1614806122c5575060028260ff16145b806122d3575060038260ff16145b156126095761020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631027e242856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561236957600080fd5b5af1151561237657600080fd5b5050506040518051905083600001601d6101000a81548160ff021916908360ff160217905550818360000160146101000a81548160ff021916908360ff1602179055504261020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630f99da4a866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561244b57600080fd5b5af1151561245857600080fd5b5050506040518051905061020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2a9ba05876040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156124f357600080fd5b5af1151561250057600080fd5b505050604051805190500263ffffffff16018360000160156101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555061020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630f8ef9f8856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156125cd57600080fd5b5af115156125da57600080fd5b505050604051805190508360010160006101000a81548162ffffff021916908362ffffff1602179055506129a9565b60048260ff1614156128b2574267ffffffffffffffff168360000160159054906101000a900467ffffffffffffffff1667ffffffffffffffff1611151561264f57600080fd5b61020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631027e242856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156126e057600080fd5b5af115156126ed57600080fd5b5050506040518051905083600001601d6101000a81548160ff021916908360ff16021790555061020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630f99da4a856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156127a457600080fd5b5af115156127b157600080fd5b5050506040518051905061020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2a9ba05866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561284c57600080fd5b5af1151561285957600080fd5b505050604051805190500263ffffffff168360000160158282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506129a8565b60058260ff1614156129a757600161020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630f99da4a866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561295157600080fd5b5af1151561295e57600080fd5b5050506040518051905063ffffffff1614151561297a57600080fd5b60008360020160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5b5b61020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd336000876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515612aa357600080fd5b5af11515612ab057600080fd5b505050604051805190501515612ac557600080fd5b7fa308815bb97242b3add8af5f65bc57d951176a0b0ee1cc7e51638e0da14920738585604051808381526020018281526020019250505060405180910390a15050505050565b61020b60009054906101000a900461ffff1681565b6000816040518082815260200191505060405180910390209050919050565b61020e6020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154908060040160009054906101000a900467ffffffffffffffff16905085565b600061020182815481101515612bdc57fe5b906000526020600020906003020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612c7057600080fd5b8061020d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061021060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612d5a57600080fd5b8060ff1661020b60006101000a81548161ffff021916908361ffff16021790555050565b61020c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61020f6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61020360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6102068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612ebc5780601f10612e9157610100808354040283529160200191612ebc565b820191906000526020600020905b815481529060010190602001808311612e9f57829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612f1f57600080fd5b612f36600160006001600080600080600080611985565b612f53600266354a6ba7a180006003600080600080600080611985565b612f70600366470de4df8200006005600080600080600080611985565b565b6000813373ffffffffffffffffffffffffffffffffffffffff1661020182815481101515612f9c57fe5b906000526020600020906003020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612ff057600080fd5b612ffb338585614e8d565b600191505092915050565b600080835111801561301a5750600a835111155b151561302557600080fd5b82516102095402341015151561303a57600080fd5b825161020854016102078054905011151561305457600080fd5b825161020954023411156130ab573373ffffffffffffffffffffffffffffffffffffffff166108fc8451610209540234039081150290604051600060405180830381858888f1935050505015156130aa57600080fd5b5b600090505b82518110156130e6576130d983828151811015156130ca57fe5b906020019060200201516150ba565b80806001019150506130b0565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151561319c578161020e60006102076001610208540381548110151561313857fe5b9060005260206000209001546000191660001916815260200190815260200160002060020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505050565b3373ffffffffffffffffffffffffffffffffffffffff1661020f600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561320f57600080fd5b61322261321b82612bca565b3383614e8d565b50565b6102085481565b600061020260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561328b57600080fd5b600090505b81518110156132ed5761020780548060010182816132ae91906157c8565b9160005260206000209001600084848151811015156132c957fe5b90602001906020020151909190915090600019169055508080600101915050613290565b5050565b6102018181548110151561330157fe5b90600052602060002090600302016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16908060000160159054906101000a900467ffffffffffffffff169080600001601d9054906101000a900460ff16908060010160009054906101000a900462ffffff16908060010160039054906101000a900467ffffffffffffffff169080600101600b9054906101000a900461ffff169080600101600d9054906101000a900461ffff169080600101600f9054906101000a900461ffff16908060020160009054906101000a900470010000000000000000000000000000000002908060020160109054906101000a900467ffffffffffffffff16908060020160189054906101000a900467ffffffffffffffff1690508c565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561349c57600080fd5b8061020360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561353c57600080fd5b8061020b60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156135dc57600080fd5b8060028361ffff1660ff811015156135f057fe5b60020201600001819055505050565b6102116020528060005260406000206000915054906101000a900460ff1681565b6136286157f4565b6136306157f4565b6000806000806000806000808b3373ffffffffffffffffffffffffffffffffffffffff166102018281548110151561366457fe5b906000526020600020906003020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156136b857600080fd5b6102018d8154811015156136c857fe5b906000526020600020906003020161018060405190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900460ff1660ff1660ff1681526020016000820160159054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601d9054906101000a900460ff1660ff1660ff1681526020016001820160009054906101000a900462ffffff1662ffffff1662ffffff1681526020016001820160039054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160018201600b9054906101000a900461ffff1661ffff1661ffff16815260200160018201600d9054906101000a900461ffff1661ffff1661ffff16815260200160018201600f9054906101000a900461ffff1661ffff1661ffff1681526020016002820160009054906101000a9004700100000000000000000000000000000000026fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff191681526020016002820160109054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016002820160189054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250509a506102018c81548110151561391d57fe5b906000526020600020906003020161018060405190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900460ff1660ff1660ff1681526020016000820160159054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601d9054906101000a900460ff1660ff1660ff1681526020016001820160009054906101000a900462ffffff1662ffffff1662ffffff1681526020016001820160039054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160018201600b9054906101000a900461ffff1661ffff1661ffff16815260200160018201600d9054906101000a900461ffff1661ffff1661ffff16815260200160018201600f9054906101000a900461ffff1661ffff1661ffff1681526020016002820160009054906101000a9004700100000000000000000000000000000000026fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff191681526020016002820160109054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016002820160189054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050995060028b6020015160ff16148015613b865750428b6040015167ffffffffffffffff16115b15613be75760006102018e815481101515613b9d57fe5b906000526020600020906003020160000160146101000a81548160ff021916908360ff160217905550428b6040019067ffffffffffffffff16908167ffffffffffffffff16815250505b60028a6020015160ff16148015613c0c5750428a6040015167ffffffffffffffff1610155b151515613c1857600080fd5b8a610140015167ffffffffffffffff164210151515613c3657600080fd5b89610160015167ffffffffffffffff164210151515613c5457600080fd5b896000015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415614039578960a0015167ffffffffffffffff168b60a0015167ffffffffffffffff1610613cb9578960a00151613cbf565b8a60a001515b9850886102018e815481101515613cd257fe5b906000526020600020906003020160010160038282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550886102018d815481101515613d3357fe5b906000526020600020906003020160010160038282829054906101000a900467ffffffffffffffff160392506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555061020d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ff429fc88c61010001516040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808261ffff1661ffff168152602001915050602060405180830381600087803b1515613e2157600080fd5b5af11515613e2e57600080fd5b505050604051805190506102018e815481101515613e4857fe5b906000526020600020906003020160020160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060006102018d815481101515613e9157fe5b906000526020600020906003020160010160039054906101000a900467ffffffffffffffff1667ffffffffffffffff161415613f6a57613ed33360008e614e8d565b61021060006102018e815481101515613ee857fe5b906000526020600020906003020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190600190039190505550613fb7565b610e1042016102018d815481101515613f7f57fe5b906000526020600020906003020160020160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b7f737ee67d38af00f653596ea4e3350216f7c1192ecbfab7263ab95cfde44ac4058d8d8f8c6000806000604051808881526020018781526020018681526020018567ffffffffffffffff1667ffffffffffffffff16815260200184815260200183815260200182815260200197505050505050505060405180910390a1614393565b60028a60a0015167ffffffffffffffff161080614064575060028b60a0015167ffffffffffffffff16105b1561406e57600080fd5b6140798b60016152e2565b97506140868a60006152e2565b965041600143034061020180549050604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401836000191660001916815260200182815260200193505050506040518091039020955086881161410a578661410c565b875b9450600285029350600184876001900481151561412557fe5b060192508688860103831115156141c2576141408d8d61533a565b91507f737ee67d38af00f653596ea4e3350216f7c1192ecbfab7263ab95cfde44ac4058d8d8f858c8c89604051808881526020018781526020018681526020018567ffffffffffffffff1667ffffffffffffffff16815260200184815260200183815260200182815260200197505050505050505060405180910390a161424a565b6141cc8c8e61533a565b91507f737ee67d38af00f653596ea4e3350216f7c1192ecbfab7263ab95cfde44ac4058d8d8e858c8c89604051808881526020018781526020018681526020018567ffffffffffffffff1667ffffffffffffffff16815260200184815260200183815260200182815260200197505050505050505060405180910390a15b61020d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ff429fc88c61010001516040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808261ffff1661ffff168152602001915050602060405180830381600087803b15156142e857600080fd5b5af115156142f557600080fd5b505050604051805190506102018e81548110151561430f57fe5b906000526020600020906003020160020160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550610e1042016102018d81548110151561435b57fe5b906000526020600020906003020160020160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b50505050505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156143fd57600080fd5b806102098190555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561446357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561449f57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61020b60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156145df57600080fd5b8061020460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060016102018181805490500191508161464091906158be565b506001610201805490500391506102018281548110151561465d57fe5b90600052602060002090600302019050878160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508663ffffffff168160010160036101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508560ff1681600101600b6101000a81548161ffff021916908361ffff1602179055508460ff1681600101600d6101000a81548161ffff021916908361ffff1602179055508360ff1681600101600f6101000a81548161ffff021916908361ffff160217905550828160020160006101000a8154816fffffffffffffffffffffffffffffffff02191690837001000000000000000000000000000000009004021790555061021060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505550818873ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050505050565b6000806148456158f0565b83604051808281526020019150506040518091039020925061020e600084600019166000191681526020019081526020016000209150600073ffffffffffffffffffffffffffffffffffffffff168260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156148db57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580156149ab575061021160008360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15614b5e5761020c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2356d238360020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660016000806000806040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018661ffff1681526020018562ffffff1681526020018462ffffff1681526020018360ff1681526020018260ff1681526020019650505050505050600060405180830381600087803b1515614ad057600080fd5b5af11515614add57600080fd5b505050600161021160008460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b61020d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bdd7908b85846003015461020180549050416040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001945050505050608060405180830381600087803b1515614c3d57600080fd5b5af11515614c4a57600080fd5b505050604051806080016040529050614cf28260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826003600481101515614c9057fe5b6020020151836000600481101515614ca457fe5b6020020151846001600481101515614cb857fe5b6020020151856002600481101515614ccc57fe5b602002015187600301548a18604051808281526020019150506040518091039020614624565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc83600101549081150290604051600060405180830381858888f193505050501515614d5857600080fd5b7fc68a0d9516a961dd6a8877cfeee3727698e55a18f46a8591bedce0f0e785df33838360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a161020e60008460001916600019168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560038201600090556004820160006101000a81549067ffffffffffffffff0219169055505050505050565b8273ffffffffffffffffffffffffffffffffffffffff1661020182815481101515614eb457fe5b906000526020600020906003020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515614f0857600080fd5b8161020182815481101515614f1957fe5b906000526020600020906003020160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061020f600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600161021060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550600161021060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60005b600073ffffffffffffffffffffffffffffffffffffffff1661020e6000610207610208548154811015156150ed57fe5b9060005260206000209001546000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561516857610208600081548092919060010191905055506150bd565b61020e60006102076102085481548110151561518057fe5b906000526020600020900154600019166000191681526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061020954816001018190555081816003018190555061020a5442018160040160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550610208600081548092919060010191905055507fef94156a2f812e69556eed38c92924cd876b114a20297e82345e5d29d336e2376102076001610208540381548110151561527657fe5b90600052602060002090015433610209546040518084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a15050565b60008260a00151826152f557603c6152f8565b60285b60ff16615304856154f5565b0283615311576028615314565b603c5b60ff16615320866155ea565b020162ffffff160267ffffffffffffffff16905092915050565b6000806000806000806102018881548110151561535357fe5b906000526020600020906003020194506102018781548110151561537357fe5b906000526020600020906003020193506153a48560010160039054906101000a900467ffffffffffffffff166156df565b67ffffffffffffffff168460010160039054906101000a900467ffffffffffffffff1667ffffffffffffffff168115156153da57fe5b04925061020b60009054906101000a900461ffff1661ffff168460010160039054906101000a900467ffffffffffffffff1667ffffffffffffffff1681151561541f57fe5b0491508267ffffffffffffffff168267ffffffffffffffff16106154435782615445565b815b905060018167ffffffffffffffff16101561545f57600190505b808560010160038282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550808460010160038282829054906101000a900467ffffffffffffffff160392506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550809550505050505092915050565b6000808260e0015161ffff1691506003836020015160ff16148015615527575042836040015167ffffffffffffffff16115b156155e45781606483606486608001518760600151600a0260ff1601010262ffffff1681151561555357fe5b0403905060018162ffffff1610801561557357506001836060015160ff16145b15615583576001820191506155e3565b60038162ffffff1610801561559f57506002836060015160ff16145b156155af576003820191506155e2565b60058162ffffff161080156155cb57506003836060015160ff16145b156155db576005820191506155e1565b81810191505b5b5b5b50919050565b6000808260c0015161ffff1691506001836020015160ff1614801561561c575042836040015167ffffffffffffffff16115b156156d95781606483606486608001518760600151600a0260ff1601010262ffffff1681151561564857fe5b0403905060018162ffffff1610801561566857506001836060015160ff16145b15615678576001820191506156d8565b60038162ffffff1610801561569457506002836060015160ff16145b156156a4576003820191506156d7565b60058162ffffff161080156156c057506003836060015160ff16145b156156d0576005820191506156d6565b81810191505b5b5b5b50919050565b60008060026001840167ffffffffffffffff168115156156fb57fe5b0490508291505b8167ffffffffffffffff168167ffffffffffffffff161015615760578091506002818267ffffffffffffffff168567ffffffffffffffff1681151561574357fe5b040167ffffffffffffffff1681151561575857fe5b049050615702565b50919050565b6101006040519081016040528060008152602001600015158152602001600063ffffffff168152602001600061ffff168152602001600062ffffff168152602001600062ffffff168152602001600060ff168152602001600060ff1681525090565b8154818355818115116157ef578183600052602060002091820191016157ee919061591e565b5b505050565b61018060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600060ff168152602001600067ffffffffffffffff168152602001600060ff168152602001600062ffffff168152602001600067ffffffffffffffff168152602001600061ffff168152602001600061ffff168152602001600061ffff16815260200160006fffffffffffffffffffffffffffffffff19168152602001600067ffffffffffffffff168152602001600067ffffffffffffffff1681525090565b8154818355818115116158eb576003028160030283600052602060002091820191016158ea9190615943565b5b505050565b6080604051908101604052806004905b600063ffffffff168152602001906001900390816159005790505090565b61594091905b8082111561593c576000816000905550600101615924565b5090565b90565b615a9291905b80821115615a8e57600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a81549060ff02191690556000820160156101000a81549067ffffffffffffffff021916905560008201601d6101000a81549060ff02191690556001820160006101000a81549062ffffff02191690556001820160036101000a81549067ffffffffffffffff021916905560018201600b6101000a81549061ffff021916905560018201600d6101000a81549061ffff021916905560018201600f6101000a81549061ffff02191690556002820160006101000a8154906fffffffffffffffffffffffffffffffff02191690556002820160106101000a81549067ffffffffffffffff02191690556002820160186101000a81549067ffffffffffffffff021916905550600301615949565b5090565b905600a165627a7a72305820c54e82a25b1f2611814f97a7b42581ae02b30240240d3962379aaa9d8a0c8fd60029000000000000000000000000f15f61643eea73be40ad9b72c09ed381fac7a25600000000000000000000000096e666c387b1d25b490a33cdb5a32b8a1f91d3b6000000000000000000000000fa82a58605aff1f44d32b41904e7a43710f69d44

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

-----Decoded View---------------
Found 3 constructor arguments :
Arg [0] : 000000000000000000000000f15f61643eea73be40ad9b72c09ed381fac7a256
Arg [1] : 00000000000000000000000096e666c387b1d25b490a33cdb5a32b8a1f91d3b6
Arg [2] : 000000000000000000000000fa82a58605aff1f44d32b41904e7a43710f69d44


   Swarm Source:
bzzr://c54e82a25b1f2611814f97a7b42581ae02b30240240d3962379aaa9d8a0c8fd6

 

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.