ETH Price: $3,619.34 (-2.29%)

Token

ERC-20: BittyBots (BITTY)
 

Overview

Max Total Supply

979 BITTY

Holders

196

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 BITTY
0x7D81ebCc3234125C1ebd5cEB82B1Ba53c3a26887
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
BittyBots

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 14 : BittyBots.sol
// contracts/BittyBots.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

import "./UIntArrays.sol";

/**
 * 
 * ╔══╦╦══╦══╦═╦╦══╦═╦══╦══╗
 * ║╔╗╠╬╗╔╩╗╔╩╗║║╔╗║║╠╗╔╣══╣
 * ║╔╗║║║║─║║╔╩╗║╔╗║║║║║╠══║
 * ╚══╩╝╚╝─╚╝╚══╩══╩═╝╚╝╚══╝
 *
 * This contract was written by solazy.eth (twitter.com/_solazy). 
 * https://bittybots.io
 * © BittyBots NFT LLC. All rights reserved 
 */

interface IChubbies {
    function ownerOf(uint tokenId) external view returns (address owner);
    function tokensOfOwner(address _owner) external view returns(uint[] memory);
}

interface IJusticeToken {
    function burnFrom(address account, uint256 amount) external;
    function updateLastWithdrawTime(uint _tokenId) external;
}

contract BittyBots is ERC721Enumerable, Ownable  {
    // Generation Related Variables
    struct BittyBot {
        uint helmet;
        uint body;
        uint face;
        uint arms;
        uint engine;
        uint botType;
        uint accessories;
        uint setModifier;
        uint combinedCount;
        uint powerClass;
        uint power;
    }

    mapping(bytes32 => uint) private hashToTokenId;
    mapping(uint => uint) private bittyBots;
    mapping(uint256 => uint256[]) public combinations;

    uint public constant NUM_TRAITS = 7;
    uint public constant NUM_CORE_TRAITS = 6;
    uint public constant NUM_MODELS = 16;
    uint public combinedId = 20000;

    uint public constant TRAIT_INDEX_HELMET = 0;
    uint public constant TRAIT_INDEX_BODY = 1;
    uint public constant TRAIT_INDEX_FACE = 2;
    uint public constant TRAIT_INDEX_ARMS = 3;
    uint public constant TRAIT_INDEX_ENGINE = 4;
    uint public constant TRAIT_INDEX_TYPE = 5;
    uint public constant TRAIT_INDEX_ACCESSORIES = 6;

    uint[NUM_TRAITS] private traitSizes;
    uint[NUM_TRAITS] private traitCounts;
    uint[NUM_TRAITS] private traitRemaining;
    uint public specialBotRemaining;
    
    uint private fallbackModelProbabilities;
    uint private fallbackEngineProbabilities;

    bytes32[NUM_TRAITS] public traitCategories;
    bytes32[][NUM_TRAITS] public traitNames;

    event BittyBotMinted(
        uint indexed tokenId,
        uint[] traits, 
        uint setModifier,
        uint combinedCount,
        uint powerClass,
        uint power
    );

    // ERC721 Sales Related Variables
    uint public constant TOKEN_LIMIT = 20000;
    uint private constant RESERVE_LIMIT = 500;
    uint private constant MAX_CHUBBIES = 10000;
    uint internal constant PRICE = 35000000000000000;

    bool public isSaleActive = false;
    bool public isFreeClaimActive = false;
    bool public isFinalSaleActive = false;

    IChubbies public chubbiesContract;
    IJusticeToken public justiceTokenContract;

    uint public numSold = 0;
    uint public numClaimed = 2;

    string private _baseTokenURI;

    // Withdraw Addresses
    address payable private solazy;
    address payable private kixboy;

    constructor() ERC721("BittyBots","BITTY")  {
        traitSizes = [NUM_MODELS, NUM_MODELS, NUM_MODELS, NUM_MODELS, 10, 4, 7];

        uint[] memory modelDistribution = new uint[](traitSizes[TRAIT_INDEX_HELMET]);
        uint[] memory engineDistribution = new uint[](traitSizes[TRAIT_INDEX_ENGINE]);
        uint[] memory typeDistribution = new uint[](traitSizes[TRAIT_INDEX_TYPE]);
        uint[] memory accessoryDistribution = new uint[](traitSizes[TRAIT_INDEX_ACCESSORIES]);
        uint[] memory specialModelDistribution = new uint[](traitSizes[TRAIT_INDEX_HELMET]);

        traitCounts[TRAIT_INDEX_HELMET] = UIntArrays.packedUintFromArray(modelDistribution);
        traitCounts[TRAIT_INDEX_BODY] = UIntArrays.packedUintFromArray(modelDistribution);
        traitCounts[TRAIT_INDEX_FACE] = UIntArrays.packedUintFromArray(modelDistribution);
        traitCounts[TRAIT_INDEX_ARMS] = UIntArrays.packedUintFromArray(modelDistribution);
        traitCounts[TRAIT_INDEX_ENGINE] = UIntArrays.packedUintFromArray(engineDistribution);
        traitCounts[TRAIT_INDEX_TYPE] = UIntArrays.packedUintFromArray(typeDistribution);
        traitCounts[TRAIT_INDEX_ACCESSORIES] = UIntArrays.packedUintFromArray(accessoryDistribution);

        modelDistribution[0] = 4; 
        for (uint i = 1; i < 13; i++) {
            modelDistribution[i] = 1600; 
        }
        modelDistribution[13] = 360; 
        modelDistribution[14] = 240;
        modelDistribution[15] = 151; 
        for (uint i = 1; i < specialModelDistribution.length; i++) {
            specialModelDistribution[i] = 3; 
        }
        engineDistribution[0] = 4800;
        engineDistribution[1] = 4000;
        engineDistribution[2] = 3200;
        engineDistribution[3] = 2400;
        engineDistribution[4] = 1600;
        engineDistribution[5] = 1600;
        engineDistribution[6] = 1200;
        engineDistribution[7] = 555;
        engineDistribution[8] = 400;
        engineDistribution[9] = 200;
        typeDistribution[0] = 19955;
        typeDistribution[1] = 15;
        typeDistribution[2] = 15;
        typeDistribution[3] = 15;
        accessoryDistribution[0] = 19335;
        accessoryDistribution[1] = 200;
        accessoryDistribution[2] = 200;
        accessoryDistribution[3] = 100;
        accessoryDistribution[4] = 100;
        accessoryDistribution[5] = 10;
        accessoryDistribution[6] = 10;

        traitRemaining[TRAIT_INDEX_HELMET] = UIntArrays.packedUintFromArray(modelDistribution);
        traitRemaining[TRAIT_INDEX_BODY] = UIntArrays.packedUintFromArray(modelDistribution);
        traitRemaining[TRAIT_INDEX_FACE] = UIntArrays.packedUintFromArray(modelDistribution);
        traitRemaining[TRAIT_INDEX_ARMS] = UIntArrays.packedUintFromArray(modelDistribution);
        traitRemaining[TRAIT_INDEX_ENGINE] = UIntArrays.packedUintFromArray(engineDistribution);
        traitRemaining[TRAIT_INDEX_TYPE] = UIntArrays.packedUintFromArray(typeDistribution);
        traitRemaining[TRAIT_INDEX_ACCESSORIES] = UIntArrays.packedUintFromArray(accessoryDistribution);
        specialBotRemaining = UIntArrays.packedUintFromArray(specialModelDistribution);

        fallbackModelProbabilities = UIntArrays.packedUintFromArray(modelDistribution);
        fallbackEngineProbabilities = UIntArrays.packedUintFromArray(engineDistribution);

        traitCategories = [
            bytes32("Helmet"),
            bytes32("Body"),
            bytes32("Face"),
            bytes32("Arms"),
            bytes32("Engine"),
            bytes32("Type"), 
            bytes32("Accessory")
        ];

        bytes32[NUM_MODELS] memory modelNames = [
            bytes32("MXX Torva"),
            bytes32("M01 Ava"),
            bytes32("M02 Shadow King"),
            bytes32("M03 Eni"),
            bytes32("M04 Ultra 7.1"),
            bytes32("M05 Titan"),
            bytes32("M06 Solar Phantom"),
            bytes32("M07 Cyberkat"),
            bytes32("M08 Ziggy"),
            bytes32("M09 Bakken"),
            bytes32("M10 Supaiku"),
            bytes32("M11 Neo"),
            bytes32("M12 Leapor"),
            bytes32("M13 Jupiter"),
            bytes32("M14 Mercury"),
            bytes32("M15 Morpheus")
        ];

        traitNames[TRAIT_INDEX_HELMET] = modelNames;
        traitNames[TRAIT_INDEX_BODY] = modelNames;
        traitNames[TRAIT_INDEX_ARMS] = modelNames;
        traitNames[TRAIT_INDEX_FACE] = modelNames;
        traitNames[TRAIT_INDEX_ENGINE] = [
            bytes32("Love"),
            bytes32("Fire"),
            bytes32("Starshine"),
            bytes32("Luna"),
            bytes32("Solaris"),
            bytes32("Diamond"),
            bytes32("Death"),
            bytes32("Lightning"), // lightning effect
            bytes32("Variable"), // glitch effect
            bytes32("Harmony"), // shiny effect
            bytes32("Error"), // glitchbot
            bytes32("Solid Gold"), // goldbot
            bytes32("Divinity") // godbot
        ];
        traitNames[TRAIT_INDEX_TYPE] = [
            bytes32("Classic"),
            bytes32("Glitch"),
            bytes32("Gold"),
            bytes32("God")
        ];
        traitNames[TRAIT_INDEX_ACCESSORIES] = [
            bytes32("None"),
            bytes32("Bomb"),
            bytes32("Exios Gem"),
            bytes32("Tuera Beam"),
            bytes32("Galactic Visor"),
            bytes32("BB1"),
            bytes32("Hacker Mode")
        ];

        _mintReservedGodBot(msg.sender, 0); // Chubbie #0
        _mintReservedGodBot(msg.sender, 9999); // #Chubbie #9999
        _mintReservedGodBot(msg.sender, 10000);
    }

    // BittyBot helpers

    // Packing optimization to save gas
    function setBittyBot(
        uint _tokenId,
        uint[] memory _traits,
        uint _setModifier,
        uint _combinedCount,
        uint _powerClass,
        uint _power
    ) internal {
        uint bittyBot = _traits[0];
        bittyBot |= _traits[1] << 8;
        bittyBot |= _traits[2] << 16;
        bittyBot |= _traits[3] << 24;
        bittyBot |= _traits[4] << 32;
        bittyBot |= _traits[5] << 40;
        bittyBot |= _traits[6] << 48;
        bittyBot |= _setModifier << 56;
        bittyBot |= _combinedCount << 64;
        bittyBot |= _powerClass << 72;
        bittyBot |= _power << 80;

        bittyBots[_tokenId] = bittyBot; 
    }

    function getBittyBot(uint _tokenId) internal view returns (BittyBot memory _bot) {
        uint bittyBot = bittyBots[_tokenId];
        _bot.helmet = uint256(uint8(bittyBot));
        _bot.body = uint256(uint8(bittyBot >> 8));
        _bot.face = uint256(uint8(bittyBot >> 16));
        _bot.arms = uint256(uint8(bittyBot >> 24));
        _bot.engine = uint256(uint8(bittyBot >> 32));
        _bot.botType = uint256(uint8(bittyBot >> 40));
        _bot.accessories = uint256(uint8(bittyBot >> 48));
        _bot.setModifier = uint256(uint8(bittyBot >> 56));
        _bot.combinedCount = uint256(uint8(bittyBot >> 64));
        _bot.powerClass = uint256(uint8(bittyBot >> 72));
        _bot.power = uint256(uint16(bittyBot >> 80));
    }

    function getTraitRemaining(uint _index) public view returns (uint[] memory) {
        return UIntArrays.arrayFromPackedUint(traitRemaining[_index], traitSizes[_index]);
    }

    function getTraitCounts(uint _index) public view returns (uint[] memory) {
        return UIntArrays.arrayFromPackedUint(traitCounts[_index], traitSizes[_index]);
    }

    // Hash is only determined by core traits and type
    function bittyHash(uint[] memory _traits) public pure returns (bytes32) {
        return UIntArrays.hash(_traits, NUM_CORE_TRAITS);
    }

    function isBotAvailable(uint _claimId) public view returns (bool) {
        return bittyBots[_claimId] == 0;
    }

    function isSpecialBot(uint[] memory _traits) public pure returns (bool) {
        return _traits[TRAIT_INDEX_TYPE] > 0;
    }

    function existTraits(uint[] memory _traits) public view returns (bool) {
        return tokenIdFromTraits(_traits) != 0;
    }

    function tokenIdFromTraits(uint[] memory _traits) public view returns (uint) {
        return hashToTokenId[bittyHash(_traits)];
    }

    function traitsForTokenId(uint _tokenId) public view returns (
        uint[] memory _traits, 
        uint _setModifier, 
        uint _combinedCount,
        uint _powerClass,
        uint _power
    ) {
        (_traits, _setModifier, _combinedCount, _powerClass, _power) = traitsFromBot(getBittyBot(_tokenId));
    }

    function traitsFromBot(BittyBot memory _bot) internal pure returns (
        uint[] memory _traits, 
        uint _setModifier, 
        uint _combinedCount, 
        uint _powerClass, 
        uint _power
    ) {
        _traits = new uint[](NUM_TRAITS);
        _traits[TRAIT_INDEX_HELMET] = _bot.helmet;
        _traits[TRAIT_INDEX_BODY] = _bot.body;
        _traits[TRAIT_INDEX_FACE] = _bot.face;
        _traits[TRAIT_INDEX_ARMS] = _bot.arms;
        _traits[TRAIT_INDEX_ENGINE] = _bot.engine;
        _traits[TRAIT_INDEX_TYPE] = _bot.botType;
        _traits[TRAIT_INDEX_ACCESSORIES] = _bot.accessories;

        _setModifier = _bot.setModifier;
        _combinedCount = _bot.combinedCount;
        _powerClass = _bot.powerClass;
        _power = _bot.power;
    }

    function strConcat(string memory _a, string memory _b) internal pure returns(string memory) {
        return string(abi.encodePacked(bytes(_a), bytes(_b)));
    }

    function bytes32ToString(bytes32 _bytes32) internal pure returns (string memory) {
        uint i = 0;
        while(i < 32 && _bytes32[i] != 0) {
            i++;
        }
        bytes memory bytesArray = new bytes(i);
        for (i = 0; i < 32 && _bytes32[i] != 0; i++) {
            bytesArray[i] = _bytes32[i];
        }
        return string(bytesArray);
    }

    function _mintBot(address _sendTo, uint _tokenId) internal {
        // 1. Try to get random traits from remaining
        uint dna = uint(keccak256(abi.encodePacked(msg.sender, _tokenId, block.difficulty, block.timestamp)));
        uint[] memory traits = randomTraits(dna);
        
        // 2. Try reroll with fixed probabillity model if we hit a duplicate (0.0002% of happening)
        if (existTraits(traits)) {
            uint offset = 0;
            do {
                traits = randomFallbackTraits(dna, offset);
                offset += 1;
                require(offset < 5, "Rerolled traits but failed");
            } while (existTraits(traits));
        }
        
        bytes32 hash = bittyHash(traits);
        hashToTokenId[hash] = _tokenId;
        uint setModifier = setModifierForParts(traits);
        uint power = estimatePowerForBot(traits, new uint[](0), setModifier);
        uint powerClass = powerClassForPower(power);
        setBittyBot(
            _tokenId,
            traits,
            setModifier,
            0,
            powerClass,
            power
        );

        // 3. Update info maps with special treatments for special bots
        if (isSpecialBot(traits)) {
            traitRemaining[TRAIT_INDEX_TYPE] = UIntArrays.decrementPackedUint(traitRemaining[TRAIT_INDEX_TYPE], traits[TRAIT_INDEX_TYPE], 1);
            traitCounts[TRAIT_INDEX_TYPE] = UIntArrays.incrementPackedUint(traitCounts[TRAIT_INDEX_TYPE], traits[TRAIT_INDEX_TYPE], 1);
            specialBotRemaining = UIntArrays.decrementPackedUint(specialBotRemaining, traits[TRAIT_INDEX_HELMET], 1);
        } else {
            for (uint i = 0; i < traits.length; i++) {
                traitRemaining[i] = UIntArrays.decrementPackedUint(traitRemaining[i], traits[i], 1);
                traitCounts[i] = UIntArrays.incrementPackedUint(traitCounts[i], traits[i], 1);
            }
            combinations[_tokenId].push(_tokenId);
        }
        
        _safeMint(_sendTo, _tokenId);
        emit BittyBotMinted(_tokenId, traits, setModifier, 0, powerClass, power);
    }

    function _mintReservedGodBot(address _sendTo, uint _tokenId) internal {
        require(_tokenId == 0 || _tokenId == 9999 || _tokenId == 10000, "Reserved god bots are for 0, 9999, and 10000.");
        uint dna = uint(keccak256(abi.encodePacked(msg.sender, _tokenId, block.difficulty, block.timestamp)));
        uint[] memory traits = new uint[](NUM_TRAITS);
        uint specialType = uint(keccak256(abi.encodePacked(dna))) % 3 + 1;
        uint modelIndex = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(specialBotRemaining, traitSizes[TRAIT_INDEX_HELMET]),  
                                                                      uint(keccak256(abi.encodePacked(dna))));
        traits[TRAIT_INDEX_TYPE] = specialType;
        for (uint i = 0; i < TRAIT_INDEX_TYPE; i++) {
            traits[i] = modelIndex;
        }
        traits[TRAIT_INDEX_ENGINE] = traits[TRAIT_INDEX_TYPE] + 9;
        traits[TRAIT_INDEX_ACCESSORIES] = 0;

        bytes32 hash = bittyHash(traits);
        hashToTokenId[hash] = _tokenId;
        uint setModifier = setModifierForParts(traits);
        uint power = estimatePowerForBot(traits, new uint[](0), setModifier);
        uint powerClass = powerClassForPower(power);

        setBittyBot(
            _tokenId,
            traits,
            setModifier,
            0,
            powerClass,
            power
        );

        traitRemaining[TRAIT_INDEX_TYPE] = UIntArrays.decrementPackedUint(traitRemaining[TRAIT_INDEX_TYPE], traits[TRAIT_INDEX_TYPE], 1);
        traitCounts[TRAIT_INDEX_TYPE] = UIntArrays.incrementPackedUint(traitCounts[TRAIT_INDEX_TYPE], traits[TRAIT_INDEX_TYPE], 1);
        specialBotRemaining = UIntArrays.decrementPackedUint(specialBotRemaining, traits[TRAIT_INDEX_HELMET], 1);

        _safeMint(_sendTo, _tokenId);
        emit BittyBotMinted(_tokenId, traits, setModifier, 0, powerClass, power);
    }

    function randomTraits(uint _dna) internal view returns (uint[] memory) {
        uint[] memory traits = new uint[](NUM_TRAITS);
        for (uint i = 0; i < traitRemaining.length; i++) {
            traits[i] = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(traitRemaining[i], traitSizes[i]),
                                                                uint(keccak256(abi.encodePacked(_dna, i + 1))));
        }

        // Special Bot Treatment
        if (isSpecialBot(traits)) {
            uint modelIndex = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(specialBotRemaining, traitSizes[TRAIT_INDEX_HELMET]),  
                                                                      uint(keccak256(abi.encodePacked(_dna))));
            for (uint i = 0; i < TRAIT_INDEX_TYPE; i++) {
                traits[i] = modelIndex;
            }
            traits[TRAIT_INDEX_ENGINE] = traits[TRAIT_INDEX_TYPE] + 9;
            traits[TRAIT_INDEX_ACCESSORIES] = 0;
        }

        return traits;
    }

    function randomFallbackTraits(uint _dna, uint _offset) internal view returns (uint[] memory) {
        uint[] memory traits = new uint[](NUM_TRAITS);

        for (uint i = 0; i < 4; i++) {
            traits[i] = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(fallbackModelProbabilities, traitSizes[i]), 
                                                                uint(keccak256(abi.encodePacked(_dna, _offset * i))));
        }
        
        traits[TRAIT_INDEX_ENGINE] = UIntArrays.randomIndexFromWeightedArray(UIntArrays.arrayFromPackedUint(fallbackEngineProbabilities, traitSizes[TRAIT_INDEX_ENGINE]), 
                                                                             uint(keccak256(abi.encodePacked(_dna, _offset * TRAIT_INDEX_ENGINE))));
        return traits;
    }

    function metadata(uint _tokenId) public view returns (string memory resultString) {
        if (_exists(_tokenId) == false) {
            return '{}';
        }
        resultString = '{';
        BittyBot memory bot = getBittyBot(_tokenId);
        (
            uint[] memory traits, 
            uint setModifier, 
            uint combinedCount, 
            uint powerClass, 
            uint power
        ) = traitsFromBot(bot);

        for (uint i = 0; i < traits.length; i++) {
            if (i > 0) {
                resultString = strConcat(resultString, ', ');
            }
            resultString = strConcat(resultString, '"');
            resultString = strConcat(resultString, bytes32ToString(traitCategories[i]));
            resultString = strConcat(resultString, '": "');
            resultString = strConcat(resultString, bytes32ToString(traitNames[i][traits[i]]));
            resultString = strConcat(resultString, '"');
        }

        resultString = strConcat(resultString, ', ');

        string[] memory valueCategories = new string[](4);
        valueCategories[0] = 'Full Set';
        valueCategories[1] = 'Combined';
        valueCategories[2] = 'Power Class';
        valueCategories[3] = 'Power';
        uint[] memory values = new uint[](4);
        values[0] = setModifier;
        values[1] = combinedCount;
        values[2] = powerClass;
        values[3] = power;

        for (uint i = 0; i < valueCategories.length; i++) {
            if (i > 0) {
                resultString = strConcat(resultString, ', ');
            }
            resultString = strConcat(resultString, '"');
            resultString = strConcat(resultString, valueCategories[i]);
            resultString = strConcat(resultString, '": ');
            resultString = strConcat(resultString, Strings.toString(values[i]));
        }

        resultString = strConcat(resultString, '}');

        return resultString;
    }

    // COMBINE
    function isSelectedTraitsEligible(uint[] memory _selectedTraits, uint[] memory _selectedBots) public view returns (bool) {
        BittyBot memory bot;
        uint[] memory traits;

        for (uint traitIndex = 0; traitIndex < _selectedTraits.length; traitIndex++) {
            bool traitCheck = false;
            for (uint botIndex = 0; botIndex < _selectedBots.length; botIndex++) {
                bot = getBittyBot(_selectedBots[botIndex]);
                (traits, , , , ) = traitsFromBot(bot);

                if (traits[traitIndex] == _selectedTraits[traitIndex]) {
                    traitCheck = true;
                    break;
                }
            }
            if (traitCheck == false) {
                return false;
            }
        }

        return true;
    }

    function combineFee(uint _combinedCount) public pure returns (uint) {
        if (_combinedCount <= 1) {
            return 0;
        } else {
            return 200 ether * (2 ** (_combinedCount + 1));
        }
    }

    function combine(uint[] memory _selectedTraits, uint[] memory _selectedBots) external {
        // 1. check if bot already exists and not in selected bot
        require(_selectedTraits.length == NUM_TRAITS, "Malformed traits");
        require(_selectedBots.length < 6, "Cannot combine more than 5 bots");

        // 2. check traits is in selected bots
        require(isSelectedTraitsEligible(_selectedTraits, _selectedBots), "Traits not in bots");

        // 3. burn selected bots
        BittyBot memory bot;
        uint[] memory selectedBotTraits;
        uint[] memory traitsToDeduct = new uint[](NUM_TRAITS);
        uint maxCombinedCount = 0;
        uint combinedCount;
        combinations[combinedId].push(combinedId);
        for (uint i = 0; i < _selectedBots.length; i++) {
            require(_exists(_selectedBots[i]), "Selected bot doesn't exist");
            bot = getBittyBot(_selectedBots[i]);
            (selectedBotTraits, , combinedCount, , ) = traitsFromBot(bot);
            require(bot.botType == 0, "Special bots cannot be combined");

            if (combinedCount > maxCombinedCount) {
                maxCombinedCount = combinedCount;
            }

            for (uint j = 0; j < combinations[_selectedBots[i]].length; j++) {
                combinations[combinedId].push(combinations[_selectedBots[i]][j]);
            }

            for (uint j = 0; j < NUM_TRAITS; j++) {
                traitsToDeduct[j] = UIntArrays.incrementPackedUint(traitsToDeduct[j], selectedBotTraits[j], 1);
            }

            // remove hash so that the traits are freed
            delete hashToTokenId[bittyHash(selectedBotTraits)];

            _burn(_selectedBots[i]);
        }
        uint newCombinedCount = maxCombinedCount + 1;
        require(existTraits(_selectedTraits) == false, "Traits already exist");
        require(newCombinedCount < 4, "Cannot combine more than 3 times");

        // Pay fee in Justice Token
        if (newCombinedCount > 1) {
            uint fee = combineFee(newCombinedCount);
            justiceTokenContract.burnFrom(msg.sender, fee);
        }

        justiceTokenContract.updateLastWithdrawTime(combinedId);

        // 4. mint new bot with selected traits
        _safeMint(msg.sender, combinedId);

        bytes32 hash = bittyHash(_selectedTraits);
        hashToTokenId[hash] = combinedId;
        uint setModifier = setModifierForParts(_selectedTraits);
        uint power = estimatePowerForBot(_selectedTraits, _selectedBots, setModifier);
        uint powerClass = powerClassForPower(power);
        setBittyBot(
            combinedId,
            _selectedTraits,
            setModifier,
            newCombinedCount,
            powerClass,
            power
        );

        // Update Trait Count in one sitting to avoid expensive storage hit
        for (uint i = 0; i < NUM_TRAITS; i++) {
            traitsToDeduct[i] = UIntArrays.decrementPackedUint(traitsToDeduct[i], _selectedTraits[i], 1);
            traitCounts[i] -= traitsToDeduct[i];
        }

        emit BittyBotMinted(combinedId, _selectedTraits, setModifier, newCombinedCount, powerClass, power);
        combinedId++;
    }

    // POWER
    function powerForPart(uint _traitCategory, uint _traitIndex) public pure returns (uint) {
        if (_traitCategory == TRAIT_INDEX_HELMET ||
            _traitCategory == TRAIT_INDEX_FACE ||
            _traitCategory == TRAIT_INDEX_ARMS ||
            _traitCategory == TRAIT_INDEX_BODY) {
            if (_traitIndex == 0) {
                return 300;
            } else if (_traitIndex < 13) {
                return 40;
            } else if (_traitIndex < 15) {
                return 80;
            }
            return 150;
        } else if (_traitCategory == TRAIT_INDEX_ENGINE) {
            return 4 * _traitIndex ** 2 + 6 * _traitIndex + 10;
        } else if (_traitCategory == TRAIT_INDEX_ACCESSORIES) {
            if (_traitIndex == 0) {
                return 0;
            } else if (_traitIndex < 3){
                return 100;
            } else if (_traitIndex < 5){
                return 200;
            } else if (_traitIndex < 7){
                return 400;
            }
        }

        return 0;
    }

    function powerForParts(uint[] memory _traits) public pure returns (uint power) {
        for (uint i = 0; i < _traits.length; i++) {
            power += powerForPart(i, _traits[i]);
        }

        return power;
    }

    function setModifierForParts(uint[] memory _traits) public pure returns (uint count) {
        for (uint i = 0; i < 4; i++) {
            uint currentCount = 0;
            for (uint j = 0; j < 4; j++) {
                if (_traits[i] == _traits[j]) {
                    currentCount++;
                }
            }
            if (currentCount > count) {
                count = currentCount;
            }
        }
        return count;
    }

    function powerClassForPower(uint _power) public pure returns (uint) {
        if (_power < 300) {
            return 1;
        } else if (_power < 500) {
            return 2;
        } else if (_power < 800) {
            return 3;
        } else if (_power < 1000) {
            return 4;
        } else if (_power < 1200) {
            return 5;
        } else if (_power < 1400) {
            return 6;
        } else if (_power < 1600) {
            return 7;
        } else if (_power < 1800) {
            return 8;
        } else if (_power < 2000) {
            return 9;
        } else {
            return 10;
        }
    }

    function estimatePowerForBot(uint[] memory _selectedTraits, uint[] memory _selectedBots, uint _setModifier) public view returns (uint power) {
        if (_selectedTraits[TRAIT_INDEX_TYPE] == 1) {
            return 1400;
        } else if (_selectedTraits[TRAIT_INDEX_TYPE] == 2) {
            return 1600;
        } else if (_selectedTraits[TRAIT_INDEX_TYPE] == 3) {
            return 1800;
        }

        // get power of bots
        BittyBot memory bot;
        for (uint i = 0; i < _selectedBots.length; i++) {
            bot = getBittyBot(_selectedBots[i]);
            power += bot.power / 3;
        }

        // get power for parts
        power += powerForParts(_selectedTraits);

        return (_setModifier > 1) ? power * (4 * _setModifier + 4) / 10 : power;
    }

    // Sales related functions
    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }

    function setBaseURI(string memory baseURI) public onlyOwner {
        _baseTokenURI = baseURI;
    }
    
    function tokensOfOwner(address _owner) external view returns(uint[] memory) {
        uint tokenCount = balanceOf(_owner);
        uint[] memory result = new uint[](tokenCount);
        for (uint index = 0; index < tokenCount; index++) {
            result[index] = tokenOfOwnerByIndex(_owner, index);
        }
        return result;
    }

    function numEligibleClaims() public view returns (uint) {
        uint[] memory ownedChubbies = chubbiesContract.tokensOfOwner(msg.sender);
        uint numEligible = 0;
        for (uint i = 0; i < ownedChubbies.length; i++) {
            if (isBotAvailable(ownedChubbies[i])) {
                numEligible++;
            }
        }
        return numEligible;
    }

    function claim(uint _claimId) public {
        require(isFreeClaimActive, "Free claim is not active");
        require(_claimId < MAX_CHUBBIES, "Ineligible Claim");
        require(isBotAvailable(_claimId), "BittyBot has already been claimed");

        if (_claimId < MAX_CHUBBIES) {
            require(chubbiesContract.ownerOf(_claimId) == msg.sender, "No Chubbie to claim BittyBot");
        }

        _mintBot(msg.sender, _claimId);
        numClaimed++;
    }

    function claimN(uint _numClaim) public {
        require(isFreeClaimActive, "Free claim is not active");
        uint[] memory ownedChubbies = chubbiesContract.tokensOfOwner(msg.sender);
        uint claimed = 0;
        for (uint i = 0; i < ownedChubbies.length; i++) {
            if (isBotAvailable(ownedChubbies[i])) {
                _mintBot(msg.sender, ownedChubbies[i]);
                claimed++;
            }
            if (claimed == _numClaim) {
                break;
            }
        }

        numClaimed += claimed;
    }

    function buy(uint _numBuy) public payable {
        uint startIndex = MAX_CHUBBIES + RESERVE_LIMIT + numSold;
        require(isSaleActive, "Sale is not active");
        require(startIndex + _numBuy < TOKEN_LIMIT, "Exceeded 20000 limit");
        require(_numBuy < 11, "You can buy maximum 10 bots");
        require(msg.value >= PRICE * _numBuy, "Ether value sent is below the price");

        for (uint i = 0; i < _numBuy; i++) {
            _mintBot(msg.sender, startIndex + i);
        }
        numSold += _numBuy;
    }

    function buyUnclaimed(uint _numBuy) public payable {
        require(isSaleActive && isFinalSaleActive, "Final sale has already ended");
        require(_numBuy < 11, "You can buy maximum 10 bots");
        require(msg.value >= PRICE * _numBuy, "Ether value sent is below the price");

        uint numBought = 0;
        for (uint i = 0; i < MAX_CHUBBIES; i++) {
            if (isBotAvailable(i)) {
                _mintBot(msg.sender, i);
                numBought++;
            }
            if (numBought == _numBuy) {
                return;
            }
        }
    }

    function setContracts(address _chubbiesContract, address _justiceTokenContract) public onlyOwner {
        chubbiesContract = IChubbies(_chubbiesContract);
        justiceTokenContract = IJusticeToken(_justiceTokenContract);
    }

    function setWidthdrawAddresses(address payable _solazy, address payable _kixboy) public onlyOwner {
        solazy = _solazy;
        kixboy = _kixboy;
    }
    
    function startSale() public onlyOwner {
        isSaleActive = true;
    }

    function stopSale() public onlyOwner {
        isSaleActive = false;
    }

    function startClaim() public onlyOwner {
        isFreeClaimActive = true;
    }

    function stopClaim() public onlyOwner {
        isFreeClaimActive = false;
    }

    function startFinalSale() public onlyOwner {
        isFinalSaleActive = true;
        isFreeClaimActive = false;
    }

    function stopFinalSale() public onlyOwner {
        isFinalSaleActive = false;
    }
    
    function withdraw() public payable {
        require(msg.sender == kixboy || msg.sender == solazy || msg.sender == owner(), "Invalid sender");
        uint halfBalance = address(this).balance / 20 * 9;
        kixboy.transfer(halfBalance);
        solazy.transfer(halfBalance);
        payable(owner()).transfer(address(this).balance);
    }

    function reserveMint(address _sendTo, uint _tokenId) public onlyOwner {
        require(_tokenId > MAX_CHUBBIES && _tokenId < MAX_CHUBBIES + RESERVE_LIMIT, "Not a eligible reserve token");
        _mintBot(_sendTo, _tokenId);
    }

    function reserveBulkMint(address _sendTo, uint _numReserve) public onlyOwner {
        uint numReserved = 0;
        for (uint i = MAX_CHUBBIES; i < MAX_CHUBBIES + RESERVE_LIMIT; i++) {
            if (isBotAvailable(i)) {
                _mintBot(_sendTo, i);
                numReserved++;
            }
            if (numReserved == _numReserve) {
                return;
            }
        }
    }
}

File 2 of 14 : UIntArrays.sol
// contracts/UIntArrays.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;


library UIntArrays {
    function sum(uint[] memory _array) public pure returns (uint result) {
        result = 0;
        for (uint i = 0; i < _array.length; i++){
            result += _array[i];
        }
    }

    function randomIndexFromWeightedArray(uint[] memory _weightedArray, uint _randomNumber) public pure returns (uint) {
        uint totalSumWeight = sum(_weightedArray);
        require(totalSumWeight > 0, "Array has no weight");
        uint randomSumWeight = _randomNumber % totalSumWeight;
        uint currentSumWeight = 0;

        for (uint i = 0; i < _weightedArray.length; i++) {
            currentSumWeight += _weightedArray[i];
            if (randomSumWeight < currentSumWeight) {
                return i;
            }
        }

        return _weightedArray.length - 1;
    } 

    function hash(uint[] memory _array, uint _endIndex) public pure returns (bytes32) {
        bytes memory encoded;
        for (uint i = 0; i < _endIndex; i++) {
            encoded = abi.encode(encoded, _array[i]);
        }

        return keccak256(encoded);
    }

    function arrayFromPackedUint(uint _packed, uint _size) public pure returns (uint[] memory) {
        uint[] memory array = new uint[](_size);

        for (uint i = 0; i < _size; i++) {
            array[i] = uint256(uint16(_packed >> (i * 16)));
        }

        return array;
    }

    function packedUintFromArray(uint[] memory _array) public pure returns (uint _packed) {
        require(_array.length < 17, "pack array > 16");
        for (uint i = 0; i < _array.length; i++) {
            _packed |= _array[i] << (i * 16);
        }
    }

    function elementFromPackedUint(uint _packed, uint _index) public pure returns (uint) {
        return uint256(uint16(_packed >> (_index * 16)));
    }

    function decrementPackedUint(uint _packed, uint _index, uint _number) public pure returns (uint result) {
        result = _packed & ~(((1 << 16) - 1) << (_index * 16));
        result |= (elementFromPackedUint(_packed, _index) - _number) << (_index * 16);
    }

    function incrementPackedUint(uint _packed, uint _index, uint _number) public pure returns (uint result) {
        result = _packed & ~(((1 << 16) - 1) << (_index * 16));
        result |= (elementFromPackedUint(_packed, _index) + _number) << (_index * 16);
    }

    function mergeArrays(uint[] memory _array1, uint[] memory _array2, bool _isPositive) public pure returns (uint[] memory) {
        for (uint i = 0; i < _array1.length; i++) {
            if (_isPositive) {
                _array1[i] += _array2[i];
            } else {
                _array1[i] -= _array2[i];
            }
            
        }
        return _array1;
    }
}

File 3 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 14 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 5 of 14 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 6 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 7 of 14 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 8 of 14 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 9 of 14 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 10 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 14 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 12 of 14 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 13 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 14 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 20
  },
  "evmVersion": "london",
  "libraries": {
    "/Users/alexanderhsu/dev/nft/bittybots/bittybots-contract/contracts/UIntArrays.sol": {
      "UIntArrays": "0xff99Ac97C9a882a815E582b23bB8030F159BC387"
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"traits","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"setModifier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"combinedCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"powerClass","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"power","type":"uint256"}],"name":"BittyBotMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"NUM_CORE_TRAITS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NUM_MODELS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NUM_TRAITS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_ACCESSORIES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_ARMS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_BODY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_ENGINE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_FACE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_HELMET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRAIT_INDEX_TYPE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"bittyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numBuy","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numBuy","type":"uint256"}],"name":"buyUnclaimed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"chubbiesContract","outputs":[{"internalType":"contract IChubbies","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numClaim","type":"uint256"}],"name":"claimN","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"combinations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_selectedTraits","type":"uint256[]"},{"internalType":"uint256[]","name":"_selectedBots","type":"uint256[]"}],"name":"combine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_combinedCount","type":"uint256"}],"name":"combineFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"combinedId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_selectedTraits","type":"uint256[]"},{"internalType":"uint256[]","name":"_selectedBots","type":"uint256[]"},{"internalType":"uint256","name":"_setModifier","type":"uint256"}],"name":"estimatePowerForBot","outputs":[{"internalType":"uint256","name":"power","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"existTraits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getTraitCounts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getTraitRemaining","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimId","type":"uint256"}],"name":"isBotAvailable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFinalSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFreeClaimActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_selectedTraits","type":"uint256[]"},{"internalType":"uint256[]","name":"_selectedBots","type":"uint256[]"}],"name":"isSelectedTraitsEligible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"isSpecialBot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"justiceTokenContract","outputs":[{"internalType":"contract IJusticeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"metadata","outputs":[{"internalType":"string","name":"resultString","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numEligibleClaims","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_power","type":"uint256"}],"name":"powerClassForPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_traitCategory","type":"uint256"},{"internalType":"uint256","name":"_traitIndex","type":"uint256"}],"name":"powerForPart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"powerForParts","outputs":[{"internalType":"uint256","name":"power","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sendTo","type":"address"},{"internalType":"uint256","name":"_numReserve","type":"uint256"}],"name":"reserveBulkMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sendTo","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"reserveMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_chubbiesContract","type":"address"},{"internalType":"address","name":"_justiceTokenContract","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"setModifierForParts","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address payable","name":"_solazy","type":"address"},{"internalType":"address payable","name":"_kixboy","type":"address"}],"name":"setWidthdrawAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"specialBotRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startFinalSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopFinalSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"}],"name":"tokenIdFromTraits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"traitCategories","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"traitNames","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"traitsForTokenId","outputs":[{"internalType":"uint256[]","name":"_traits","type":"uint256[]"},{"internalType":"uint256","name":"_setModifier","type":"uint256"},{"internalType":"uint256","name":"_combinedCount","type":"uint256"},{"internalType":"uint256","name":"_powerClass","type":"uint256"},{"internalType":"uint256","name":"_power","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

6080604052614e20600e556035805462ffffff19169055600060375560026038553480156200002d57600080fd5b5060408051808201825260098152684269747479426f747360b81b602080830191825283518085019094526005845264424954545960d81b9084015281519192916200007c91600091620027ff565b50805162000092906001906020840190620027ff565b505050620000af620000a96200143b60201b60201c565b6200143f565b6040518060e0016040528060108152602001601081526020016010815260200160108152602001600a8152602001600481526020016007815250600f906007620000fb9291906200288e565b50600f546000906001600160401b038111156200011c576200011c62002e60565b60405190808252806020026020018201604052801562000146578160200160208202803683370190505b5090506000600f600401546001600160401b038111156200016b576200016b62002e60565b60405190808252806020026020018201604052801562000195578160200160208202803683370190505b5090506000600f600501546001600160401b03811115620001ba57620001ba62002e60565b604051908082528060200260200182016040528015620001e4578160200160208202803683370190505b5090506000600f600601546001600160401b0381111562000209576200020962002e60565b60405190808252806020026020018201604052801562000233578160200160208202803683370190505b5090506000600f8101546001600160401b0381111562000257576200025762002e60565b60405190808252806020026020018201604052801562000281578160200160208202803683370190505b5060405163036fe36760e01b815290915073ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe36790620002be90889060040162002b3a565b60206040518083038186803b158015620002d757600080fd5b505af4158015620002ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000312919062002a3c565b60165560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe367906200034e90889060040162002b3a565b60206040518083038186803b1580156200036757600080fd5b505af41580156200037c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003a2919062002a3c565b60175560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe36790620003de90889060040162002b3a565b60206040518083038186803b158015620003f757600080fd5b505af41580156200040c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000432919062002a3c565b60185560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe367906200046e90889060040162002b3a565b60206040518083038186803b1580156200048757600080fd5b505af41580156200049c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004c2919062002a3c565b60195560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe36790620004fe90879060040162002b3a565b60206040518083038186803b1580156200051757600080fd5b505af41580156200052c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000552919062002a3c565b601a5560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe367906200058e90869060040162002b3a565b60206040518083038186803b158015620005a757600080fd5b505af4158015620005bc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005e2919062002a3c565b601b5560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe367906200061e90859060040162002b3a565b60206040518083038186803b1580156200063757600080fd5b505af41580156200064c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000672919062002a3c565b601c55845160049086906000906200068e576200068e62002e4a565b602090810291909101015260015b600d811015620006de57610640868281518110620006be57620006be62002e4a565b602090810291909101015280620006d58162002dd3565b9150506200069c565b5061016885600d81518110620006f857620006f862002e4a565b60200260200101818152505060f085600e815181106200071c576200071c62002e4a565b602002602001018181525050609785600f8151811062000740576200074062002e4a565b602090810291909101015260015b81518110156200078f5760038282815181106200076f576200076f62002e4a565b602090810291909101015280620007868162002dd3565b9150506200074e565b506112c084600081518110620007a957620007a962002e4a565b602002602001018181525050610fa084600181518110620007ce57620007ce62002e4a565b602002602001018181525050610c8084600281518110620007f357620007f362002e4a565b6020026020010181815250506109608460038151811062000818576200081862002e4a565b602002602001018181525050610640846004815181106200083d576200083d62002e4a565b6020026020010181815250506106408460058151811062000862576200086262002e4a565b6020026020010181815250506104b08460068151811062000887576200088762002e4a565b60200260200101818152505061022b84600781518110620008ac57620008ac62002e4a565b60200260200101818152505061019084600881518110620008d157620008d162002e4a565b60200260200101818152505060c884600981518110620008f557620008f562002e4a565b602002602001018181525050614df3836000815181106200091a576200091a62002e4a565b602002602001018181525050600f836001815181106200093e576200093e62002e4a565b602002602001018181525050600f8360028151811062000962576200096262002e4a565b602002602001018181525050600f8360038151811062000986576200098662002e4a565b602002602001018181525050614b8782600081518110620009ab57620009ab62002e4a565b60200260200101818152505060c882600181518110620009cf57620009cf62002e4a565b60200260200101818152505060c882600281518110620009f357620009f362002e4a565b60200260200101818152505060648260038151811062000a175762000a1762002e4a565b60200260200101818152505060648260048151811062000a3b5762000a3b62002e4a565b602002602001018181525050600a8260058151811062000a5f5762000a5f62002e4a565b602002602001018181525050600a8260068151811062000a835762000a8362002e4a565b602090810291909101015260405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000ac790889060040162002b3a565b60206040518083038186803b15801562000ae057600080fd5b505af415801562000af5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b1b919062002a3c565b601d5560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000b5790889060040162002b3a565b60206040518083038186803b15801562000b7057600080fd5b505af415801562000b85573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bab919062002a3c565b601e5560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000be790889060040162002b3a565b60206040518083038186803b15801562000c0057600080fd5b505af415801562000c15573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c3b919062002a3c565b601f5560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000c7790889060040162002b3a565b60206040518083038186803b15801562000c9057600080fd5b505af415801562000ca5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ccb919062002a3c565b60205560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000d0790879060040162002b3a565b60206040518083038186803b15801562000d2057600080fd5b505af415801562000d35573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d5b919062002a3c565b60215560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000d9790869060040162002b3a565b60206040518083038186803b15801562000db057600080fd5b505af415801562000dc5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000deb919062002a3c565b60225560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000e2790859060040162002b3a565b60206040518083038186803b15801562000e4057600080fd5b505af415801562000e55573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e7b919062002a3c565b60235560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000eb790849060040162002b3a565b60206040518083038186803b15801562000ed057600080fd5b505af415801562000ee5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f0b919062002a3c565b60245560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000f4790889060040162002b3a565b60206040518083038186803b15801562000f6057600080fd5b505af415801562000f75573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f9b919062002a3c565b60255560405163036fe36760e01b815273ff99ac97c9a882a815e582b23bb8030f159bc3879063036fe3679062000fd790879060040162002b3a565b60206040518083038186803b15801562000ff057600080fd5b505af415801562001005573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200102b919062002a3c565b6026556040805160e0810182526512195b1b595d60d21b815263426f647960e01b6020820152634661636560e01b918101919091526341726d7360e01b606082015265456e67696e6560d01b6080820152635479706560e01b60a0820152684163636573736f727960b81b60c0820152620010ab9060279060076200288e565b506040805161020081018252684d585820546f72766160b81b8152664d30312041766160c81b60208201526e4d303220536861646f77204b696e6760881b91810191909152664d303320456e6960c81b60608201526c4d303420556c74726120372e3160981b60808201526826981a902a34ba30b760b91b60a0820152704d303620536f6c6172205068616e746f6d60781b60c08201526b134c0dc810de58995c9ad85d60a21b60e0820152684d3038205a6967677960b81b6101008201526926981c902130b5b5b2b760b11b6101208201526a4d31302053757061696b7560a81b610140820152664d3131204e656f60c81b61016082015269269899102632b0b837b960b11b6101808201526a26989990253ab834ba32b960a91b6101a08201526a4d3134204d65726375727960a81b6101c08201526b4d3135204d6f72706865757360a01b6101e082015262001207602e826010620028be565b5062001217602f826010620028be565b50620012276031826010620028be565b50620012376030826010620028be565b50604080516101a081018252634c6f766560e01b8152634669726560e01b602082015268537461727368696e6560b81b91810191909152634c756e6160e01b606082015266536f6c6172697360c81b608082015266111a585b5bdb9960ca1b60a082015264088cac2e8d60db1b60c0820152684c696768746e696e6760b81b60e0820152675661726961626c6560c01b610100820152664861726d6f6e7960c81b6101208201526422b93937b960d91b6101408201526914dbdb1a590811dbdb1960b21b61016082015267446976696e69747960c01b6101808201526200132390603290600d620028be565b506040805160808101825266436c617373696360c81b81526508ed8d2e8c6d60d31b60208201526311dbdb1960e21b918101919091526211dbd960ea1b606082015262001375906033906004620028be565b506040805160e081018252634e6f6e6560e01b8152632137b6b160e11b6020820152684578696f732047656d60b81b91810191909152695475657261204265616d60b01b60608201526d23b0b630b1ba34b1902b34b9b7b960911b60808201526242423160e81b60a08201526a4861636b6572204d6f646560a81b60c082015262001405906034906007620028be565b506200141333600062001491565b620014213361270f62001491565b6200142f3361271062001491565b50505050505062002e76565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b801580620014a057508061270f145b80620014ad575080612710145b620015155760405162461bcd60e51b815260206004820152602d60248201527f526573657276656420676f6420626f74732061726520666f7220302c2039393960448201526c1c961030b7321018981818181760991b60648201526084015b60405180910390fd5b6040516001600160601b03193360601b1660208201526034810182905244605482015242607482015260009060940160408051808303601f1901815282825280516020909101206007808452610100840190925292506000919081602001602082028036833701905050905060006003836040516020016200159991815260200190565b6040516020818303038152906040528051906020012060001c620015be919062002df1565b620015cb90600162002c26565b9050600073ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a602454600f6000600781106200161d576200161d62002e4a565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b1580156200165c57600080fd5b505af415801562001671573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200169b91908101906200296c565b60408051602081018990520160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252620016e0929160040162002b4f565b60206040518083038186803b158015620016f957600080fd5b505af41580156200170e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001734919062002a3c565b905081836005815181106200174d576200174d62002e4a565b60200260200101818152505060005b60058110156200179c57818482815181106200177c576200177c62002e4a565b602090810291909101015280620017938162002dd3565b9150506200175c565b5082600581518110620017b357620017b362002e4a565b60200260200101516009620017c9919062002c26565b83600481518110620017df57620017df62002e4a565b60200260200101818152505060008360068151811062001803576200180362002e4a565b602090810291909101015260006200181b8462001b24565b6000818152600b602052604081208890559091506200183a8562001bbd565b60408051600080825260208201909252919250906200185c9087908462001c69565b905060006200186b8262001de4565b90506200187e8988856000858762001e99565b73ff99ac97c9a882a815e582b23bb8030f159bc387631fcd6ae2601d6005015489600581518110620018b457620018b462002e4a565b60209081029190910101516040516001600160e01b031960e085901b168152600481019290925260248201526001604482015260640160206040518083038186803b1580156200190357600080fd5b505af415801562001918573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200193e919062002a3c565b601d6005015573ff99ac97c9a882a815e582b23bb8030f159bc38763b59cd4d7601660050154896005815181106200197a576200197a62002e4a565b60209081029190910101516040516001600160e01b031960e085901b168152600481019290925260248201526001604482015260640160206040518083038186803b158015620019c957600080fd5b505af4158015620019de573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a04919062002a3c565b601b55602454875173ff99ac97c9a882a815e582b23bb8030f159bc38791631fcd6ae2918a9060009062001a3c5762001a3c62002e4a565b60209081029190910101516040516001600160e01b031960e085901b168152600481019290925260248201526001604482015260640160206040518083038186803b15801562001a8b57600080fd5b505af415801562001aa0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001ac6919062002a3c565b60245562001ad58a8a62001fd7565b887f332d8cf97edada810078474590fe8c8a9d3818789435d6aa350a903e45d80fba88856000858760405162001b1095949392919062002b73565b60405180910390a250505050505050505050565b60405163c91286fd60e01b815260009073ff99ac97c9a882a815e582b23bb8030f159bc3879063c91286fd9062001b6390859060069060040162002b4f565b60206040518083038186803b15801562001b7c57600080fd5b505af415801562001b91573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001bb7919062002a3c565b92915050565b6000805b600481101562001c63576000805b600481101562001c3f5784818151811062001bee5762001bee62002e4a565b602002602001015185848151811062001c0b5762001c0b62002e4a565b6020026020010151141562001c2a578162001c268162002dd3565b9250505b8062001c368162002dd3565b91505062001bcf565b508281111562001c4d578092505b508062001c5a8162002dd3565b91505062001bc1565b50919050565b60008360058151811062001c815762001c8162002e4a565b60200260200101516001141562001c9c575061057862001ddd565b8360058151811062001cb25762001cb262002e4a565b60200260200101516002141562001ccd575061064062001ddd565b8360058151811062001ce35762001ce362002e4a565b60200260200101516003141562001cfe575061070862001ddd565b62001d08620028fb565b60005b845181101562001d7b5762001d4285828151811062001d2e5762001d2e62002e4a565b602002602001015162001ffd60201b60201c565b9150600382610140015162001d58919062002c41565b62001d64908462002c26565b92508062001d728162002dd3565b91505062001d0b565b5062001d87856200209d565b62001d93908362002c26565b91506001831162001da5578162001dd9565b600a62001db484600462002d60565b62001dc190600462002c26565b62001dcd908462002d60565b62001dd9919062002c41565b9150505b9392505050565b600061012c82101562001df957506001919050565b6101f482101562001e0c57506002919050565b61032082101562001e1f57506003919050565b6103e882101562001e3257506004919050565b6104b082101562001e4557506005919050565b61057882101562001e5857506006919050565b61064082101562001e6b57506007919050565b61070882101562001e7e57506008919050565b6107d082101562001e9157506009919050565b50600a919050565b60008560008151811062001eb15762001eb162002e4a565b6020026020010151905060088660018151811062001ed35762001ed362002e4a565b6020026020010151901b8117905060108660028151811062001ef95762001ef962002e4a565b6020026020010151901b8117905060188660038151811062001f1f5762001f1f62002e4a565b6020026020010151901b8117905060208660048151811062001f455762001f4562002e4a565b6020026020010151901b8117905060288660058151811062001f6b5762001f6b62002e4a565b6020026020010151901b8117905060308660068151811062001f915762001f9162002e4a565b6020908102919091018101516000998a52600c90915260409889902060509490941b60489590951b9590981b60389690961b97901b179590951792909217171790915550565b62001ff9828260405180602001604052806000815250620020fc60201b60201c565b5050565b62002007620028fb565b6000918252600c60209081526040928390205460ff8082168452600882901c811684840152601082901c811684860152601882901c811660608501529181901c82166080840152602881901c821660a0840152603081901c821660c0840152603881901c821660e08401529283901c8116610100830152604883901c1661012082015260509190911c61ffff1661014082015290565b6000805b825181101562001c6357620020d981848381518110620020c557620020c562002e4a565b60200260200101516200213b60201b60201c565b620020e5908362002c26565b915080620020f38162002dd3565b915050620020a1565b62002108838362002256565b620021176000848484620023ac565b620021365760405162461bcd60e51b81526004016200150c9062002bd4565b505050565b60008215806200214b5750600283145b80620021575750600383145b80620021635750600183145b15620021a8578162002179575061012c62001bb7565b600d8210156200218c5750602862001bb7565b600f8210156200219f5750605062001bb7565b50609662001bb7565b6004831415620021fa57620021bf82600662002d60565b620021cc60028462002ca1565b620021d990600462002d60565b620021e5919062002c26565b620021f290600a62002c26565b905062001bb7565b60068314156200224d5781620022135750600062001bb7565b6003821015620022265750606462001bb7565b600582101562002239575060c862001bb7565b60078210156200224d575061019062001bb7565b50600092915050565b6001600160a01b038216620022ae5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016200150c565b6000818152600260205260409020546001600160a01b031615620023155760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016200150c565b6200232360008383620024dc565b6001600160a01b03821660009081526003602052604081208054600192906200234e90849062002c26565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620023cd846001600160a01b0316620025b860201b620033dd1760201c565b15620024d057604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906200240790339089908890889060040162002abf565b602060405180830381600087803b1580156200242257600080fd5b505af192505050801562002455575060408051601f3d908101601f19168201909252620024529181019062002a56565b60015b620024b5573d80801562002486576040519150601f19603f3d011682016040523d82523d6000602084013e6200248b565b606091505b508051620024ad5760405162461bcd60e51b81526004016200150c9062002bd4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050620024d4565b5060015b949350505050565b620024f48383836200213660201b62000eb01760201c565b6001600160a01b03831662002552576200254c81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b62002578565b816001600160a01b0316836001600160a01b0316146200257857620025788382620025be565b6001600160a01b038216620025925762002136816200266b565b826001600160a01b0316826001600160a01b031614620021365762002136828262002725565b3b151590565b60006001620025d8846200277660201b620020221760201c565b620025e4919062002d82565b60008381526007602052604090205490915080821462002638576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906200267f9060019062002d82565b60008381526009602052604081205460088054939450909284908110620026aa57620026aa62002e4a565b906000526020600020015490508060088381548110620026ce57620026ce62002e4a565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548062002709576200270962002e34565b6001900381819060005260206000200160009055905550505050565b60006200273d836200277660201b620020221760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b038216620027e35760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016200150c565b506001600160a01b031660009081526003602052604090205490565b8280546200280d9062002d9c565b90600052602060002090601f0160209004810192826200283157600085556200287c565b82601f106200284c57805160ff19168380011785556200287c565b828001600101855582156200287c579182015b828111156200287c5782518255916020019190600101906200285f565b506200288a92915062002955565b5090565b82600781019282156200287c57916020028201828111156200287c5782518255916020019190600101906200285f565b8280548282559060005260206000209081019282156200287c57916020028201828111156200287c5782518255916020019190600101906200285f565b60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b808211156200288a576000815560010162002956565b600060208083850312156200298057600080fd5b82516001600160401b03808211156200299857600080fd5b818501915085601f830112620029ad57600080fd5b815181811115620029c257620029c262002e60565b8060051b604051601f19603f83011681018181108582111715620029ea57620029ea62002e60565b604052828152858101935084860182860187018a101562002a0a57600080fd5b600095505b8386101562002a2f57805185526001959095019493860193860162002a0f565b5098975050505050505050565b60006020828403121562002a4f57600080fd5b5051919050565b60006020828403121562002a6957600080fd5b81516001600160e01b03198116811462001ddd57600080fd5b600081518084526020808501945080840160005b8381101562002ab45781518752958201959082019060010162002a96565b509495945050505050565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b8281101562002b0e5785810182015185820160a00152810162002af0565b8281111562002b2157600060a084870101525b5050601f01601f19169190910160a00195945050505050565b60208152600062001ddd602083018462002a82565b60408152600062002b64604083018562002a82565b90508260208301529392505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101562002bae5781518452928401929084019060010162002b90565b505050908301969096525060408101939093526060830191909152608090910152919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000821982111562002c3c5762002c3c62002e08565b500190565b60008262002c535762002c5362002e1e565b500490565b600181815b8085111562002c9957816000190482111562002c7d5762002c7d62002e08565b8085161562002c8b57918102915b93841c939080029062002c5d565b509250929050565b600062001ddd60ff84168360008262002cbd5750600162001bb7565b8162002ccc5750600062001bb7565b816001811462002ce5576002811462002cf05762002d10565b600191505062001bb7565b60ff84111562002d045762002d0462002e08565b50506001821b62001bb7565b5060208310610133831016604e8410600b841016171562002d35575081810a62001bb7565b62002d41838362002c58565b806000190482111562002d585762002d5862002e08565b029392505050565b600081600019048311821515161562002d7d5762002d7d62002e08565b500290565b60008282101562002d975762002d9762002e08565b500390565b600181811c9082168062002db157607f821691505b6020821081141562001c6357634e487b7160e01b600052602260045260246000fd5b600060001982141562002dea5762002dea62002e08565b5060010190565b60008262002e035762002e0362002e1e565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b615b648062002e866000396000f3fe6080604052600436106103925760003560e01c80637abf8786116101df578063b1b299df11610109578063b1b299df146109f8578063b26c128b14610a18578063b66a0e5d14610a38578063b88d4fde14610a4d578063beeeb22814610a6d578063c1bba17714610a8d578063c5d0911014610aad578063c87b56dd14610ac2578063d3ad9be914610ae2578063d4a1515a14610b02578063d8952a4914610b22578063d96a094a14610b42578063e3684e3914610b55578063e36b0b3714610b75578063e985e9c514610b8a578063ecbfc07714610baa578063f2fde38b14610bbf578063f309455a14610bdf578063fa53cd3814610bf5578063ff6c9bc914610c1457600080fd5b80637abf87861461080457806382da046614610824578063840bfb21146108395780638462151c1461084e578063865dfcd91461086e578063891f42b81461088e5780638c3301a9146108a35780638da5cb5b146108b857806395d89b41146108cd57806396bc59c7146108e257806396f0fe8e146109025780639aa362d0146109175780639c2f2a42146109375780639dee08c71461094d578063a22cb4651461096d578063a95e5ddf1461098d578063aa1cd310146109a2578063ada544c5146109c2578063b0ea1802146109d857600080fd5b806342842e0e116102c057806342842e0e146105ed578063454836ad1461060d5780634f6ccce71461062257806355e7d6421461064257806355f804b314610662578063564566a814610682578063565d77041461069c57806358821375146106b15780635c472bc7146106d15780635e1b93a3146106e65780636113f9e41461069c5780636352211e1461070657806368f1ea14146107265780636d1f7e301461073c57806370a0823114610751578063715018a6146107715780637564dd8f1461078657806377fb127c146107a65780637abd00b1146107d357600080fd5b806301ffc9a714610397578063031bd4c4146103cc5780630409df2a146103f0578063052b3d771461042457806306fdde0314610444578063081812fc14610466578063095ea7b31461048657806311f3653f146104a857806318160ddd146104c857806319f8c255146104dd57806323b872dd146104fd5780632f4613831461051d5780632f745c591461053d578063362f24c01461055d578063379607f51461057d57806339bec9881461059d5780633ccfd60b146105b25780633edb6d50146105ba5780633f5b5278146105cd575b600080fd5b3480156103a357600080fd5b506103b76103b2366004615454565b610c29565b60405190151581526020015b60405180910390f35b3480156103d857600080fd5b506103e2614e2081565b6040519081526020016103c3565b3480156103fc57600080fd5b5060355461041790630100000090046001600160a01b031681565b6040516103c391906155a7565b34801561043057600080fd5b506103e261043f3660046154ef565b610c54565b34801561045057600080fd5b50610459610c85565b6040516103c3919061568a565b34801561047257600080fd5b506104176104813660046154d6565b610d17565b34801561049257600080fd5b506104a66104a1366004615275565b610da4565b005b3480156104b457600080fd5b506103b76104c33660046152a1565b610eb5565b3480156104d457600080fd5b506008546103e2565b3480156104e957600080fd5b506103e26104f83660046154d6565b610edb565b34801561050957600080fd5b506104a6610518366004615182565b610f16565b34801561052957600080fd5b506103e26105383660046152a1565b610f47565b34801561054957600080fd5b506103e2610558366004615275565b610fd4565b34801561056957600080fd5b506103e26105783660046152a1565b61106a565b34801561058957600080fd5b506104a66105983660046154d6565b611104565b3480156105a957600080fd5b506103e2600281565b6104a66112d2565b6104a66105c83660046154d6565b611428565b3480156105d957600080fd5b506103e26105e83660046154d6565b611530565b3480156105f957600080fd5b506104a6610608366004615182565b6115dc565b34801561061957600080fd5b506103e2600781565b34801561062e57600080fd5b506103e261063d3660046154d6565b6115f7565b34801561064e57600080fd5b506104a661065d36600461536c565b61168a565b34801561066e57600080fd5b506104a661067d36600461548e565b611e6e565b34801561068e57600080fd5b506035546103b79060ff1681565b3480156106a857600080fd5b506103e2600681565b3480156106bd57600080fd5b506035546103b79062010000900460ff1681565b3480156106dd57600080fd5b506103e2600381565b3480156106f257600080fd5b506103e26107013660046154ef565b611eb0565b34801561071257600080fd5b506104176107213660046154d6565b611fab565b34801561073257600080fd5b506103e260245481565b34801561074857600080fd5b506103e2600581565b34801561075d57600080fd5b506103e261076c36600461510f565b612022565b34801561077d57600080fd5b506104a66120a9565b34801561079257600080fd5b506103e26107a13660046154d6565b6120e4565b3480156107b257600080fd5b506107c66107c13660046154d6565b6120fb565b6040516103c391906155f8565b3480156107df57600080fd5b506107f36107ee3660046154d6565b6121b9565b6040516103c3959493929190615653565b34801561081057600080fd5b506103b761081f3660046154d6565b6121e4565b34801561083057600080fd5b506103e26121f7565b34801561084557600080fd5b506104a66122e3565b34801561085a57600080fd5b506107c661086936600461510f565b612325565b34801561087a57600080fd5b506103e26108893660046154ef565b6123c6565b34801561089a57600080fd5b506103e2601081565b3480156108af57600080fd5b506103e2600481565b3480156108c457600080fd5b506104176123e5565b3480156108d957600080fd5b506104596123f4565b3480156108ee57600080fd5b506103e26108fd3660046152a1565b612403565b34801561090e57600080fd5b506103e2600081565b34801561092357600080fd5b506103e26109323660046153cf565b612428565b34801561094357600080fd5b506103e260385481565b34801561095957600080fd5b506104a66109683660046154d6565b612564565b34801561097957600080fd5b506104a6610988366004615242565b6126ad565b34801561099957600080fd5b506103e2600181565b3480156109ae57600080fd5b506103e26109bd3660046152a1565b61276e565b3480156109ce57600080fd5b506103e2600e5481565b3480156109e457600080fd5b506104a66109f3366004615275565b6127bc565b348015610a0457600080fd5b506107c6610a133660046154d6565b61285d565b348015610a2457600080fd5b506103b7610a3336600461536c565b61288c565b348015610a4457600080fd5b506104a6612962565b348015610a5957600080fd5b506104a6610a683660046151c3565b6129a0565b348015610a7957600080fd5b506103b7610a883660046152a1565b6129d8565b348015610a9957600080fd5b506104a6610aa8366004615149565b6129eb565b348015610ab957600080fd5b506104a6612a48565b348015610ace57600080fd5b50610459610add3660046154d6565b612a85565b348015610aee57600080fd5b50603654610417906001600160a01b031681565b348015610b0e57600080fd5b506104a6610b1d366004615275565b612b4f565b348015610b2e57600080fd5b506104a6610b3d366004615149565b612bdf565b6104a6610b503660046154d6565b612c4a565b348015610b6157600080fd5b50610459610b703660046154d6565b612d9f565b348015610b8157600080fd5b506104a6613258565b348015610b9657600080fd5b506103b7610ba5366004615149565b613293565b348015610bb657600080fd5b506104a66132c1565b348015610bcb57600080fd5b506104a6610bda36600461510f565b613301565b348015610beb57600080fd5b506103e260375481565b348015610c0157600080fd5b506035546103b790610100900460ff1681565b348015610c2057600080fd5b506104a66133a1565b60006001600160e01b0319821663780e9d6360e01b1480610c4e5750610c4e826133e3565b92915050565b600d6020528160005260406000208181548110610c7057600080fd5b90600052602060002001600091509150505481565b606060008054610c9490615a11565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc090615a11565b8015610d0d5780601f10610ce257610100808354040283529160200191610d0d565b820191906000526020600020905b815481529060010190602001808311610cf057829003601f168201915b5050505050905090565b6000610d2282613433565b610d885760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610daf82611fab565b9050806001600160a01b0316836001600160a01b03161415610e1d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d7f565b336001600160a01b0382161480610e395750610e398133613293565b610ea65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610d7f565b610eb08383613450565b505050565b60008082600581518110610ecb57610ecb615ab7565b6020026020010151119050919050565b600060018211610eed57506000919050565b610ef8826001615888565b610f039060026158f7565b610c4e90680ad78ebc5ac62000006159af565b610f2033826134be565b610f3c5760405162461bcd60e51b8152600401610d7f906157ce565b610eb0838383613588565b60405163c91286fd60e01b815260009073ff99ac97c9a882a815e582b23bb8030f159bc3879063c91286fd90610f8490859060069060040161560b565b60206040518083038186803b158015610f9c57600080fd5b505af4158015610fb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4e919061543b565b6000610fdf83612022565b82106110415760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d7f565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000805b60048110156110fe576000805b60048110156110de5784818151811061109657611096615ab7565b60200260200101518584815181106110b0576110b0615ab7565b602002602001015114156110cc57816110c881615a46565b9250505b806110d681615a46565b91505061107b565b50828111156110eb578092505b50806110f681615a46565b91505061106e565b50919050565b603554610100900460ff1661112b5760405162461bcd60e51b8152600401610d7f9061569d565b612710811061116f5760405162461bcd60e51b815260206004820152601060248201526f496e656c696769626c6520436c61696d60801b6044820152606401610d7f565b611178816121e4565b6111ce5760405162461bcd60e51b815260206004820152602160248201527f4269747479426f742068617320616c7265616479206265656e20636c61696d656044820152601960fa1b6064820152608401610d7f565b6127108110156112b0576035546040516331a9108f60e11b8152600481018390523391630100000090046001600160a01b031690636352211e9060240160206040518083038186803b15801561122357600080fd5b505afa158015611237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125b919061512c565b6001600160a01b0316146112b05760405162461bcd60e51b815260206004820152601c60248201527b139bc810da1d58989a59481d1bc818db185a5b48109a5d1d1e509bdd60221b6044820152606401610d7f565b6112ba3382613721565b603880549060006112ca83615a46565b919050555050565b603b546001600160a01b03163314806112f55750603a546001600160a01b031633145b8061131857506113036123e5565b6001600160a01b0316336001600160a01b0316145b6113555760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b73232b960911b6044820152606401610d7f565b60006113626014476158a0565b61136d9060096159af565b603b546040519192506001600160a01b03169082156108fc029083906000818181858888f193505050501580156113a8573d6000803e3d6000fd5b50603a546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156113e3573d6000803e3d6000fd5b506113ec6123e5565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015611424573d6000803e3d6000fd5b5050565b60355460ff168015611442575060355462010000900460ff165b61148d5760405162461bcd60e51b815260206004820152601c60248201527b119a5b985b081cd85b19481a185cc8185b1c9958591e48195b99195960221b6044820152606401610d7f565b600b81106114ad5760405162461bcd60e51b8152600401610d7f90615721565b6114be81667c5850872380006159af565b3410156114dd5760405162461bcd60e51b8152600401610d7f90615756565b6000805b612710811015610eb0576114f4816121e4565b15611511576115033382613721565b8161150d81615a46565b9250505b8282141561151e57505050565b8061152881615a46565b9150506114e1565b600061012c82101561154457506001919050565b6101f482101561155657506002919050565b61032082101561156857506003919050565b6103e882101561157a57506004919050565b6104b082101561158c57506005919050565b61057882101561159e57506006919050565b6106408210156115b057506007919050565b6107088210156115c257506008919050565b6107d08210156115d457506009919050565b50600a919050565b610eb0838383604051806020016040528060008152506129a0565b600061160260085490565b82106116655760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d7f565b6008828154811061167857611678615ab7565b90600052602060002001549050919050565b60078251146116ce5760405162461bcd60e51b815260206004820152601060248201526f4d616c666f726d65642074726169747360801b6044820152606401610d7f565b600681511061171f5760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f7420636f6d62696e65206d6f7265207468616e203520626f7473006044820152606401610d7f565b611729828261288c565b61176a5760405162461bcd60e51b8152602060048201526012602482015271547261697473206e6f7420696e20626f747360701b6044820152606401610d7f565b611772614f53565b6040805160078082526101008201909252606091600091906020820160e08036833701905050600e546000818152600d6020908152604082208054600181018255908352908220019190915590915080805b8651811015611ad6576117ef8782815181106117e2576117e2615ab7565b6020026020010151613433565b6118385760405162461bcd60e51b815260206004820152601a60248201527914d95b1958dd195908189bdd08191bd95cdb89dd08195e1a5cdd60321b6044820152606401610d7f565b61185a87828151811061184d5761184d615ab7565b6020026020010151613cb5565b955061186586613d53565b505060a0890151929750935050156118bf5760405162461bcd60e51b815260206004820152601f60248201527f5370656369616c20626f74732063616e6e6f7420626520636f6d62696e6564006044820152606401610d7f565b828211156118cb578192505b60005b600d60008984815181106118e4576118e4615ab7565b602002602001015181526020019081526020016000208054905081101561198857600d6000600e548152602001908152602001600020600d60008a858151811061193057611930615ab7565b60200260200101518152602001908152602001600020828154811061195757611957615ab7565b600091825260208083209091015483546001810185559383529120909101558061198081615a46565b9150506118ce565b5060005b6007811015611a825773ff99ac97c9a882a815e582b23bb8030f159bc38763b59cd4d78683815181106119c1576119c1615ab7565b60200260200101518884815181106119db576119db615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401611a039392919061581f565b60206040518083038186803b158015611a1b57600080fd5b505af4158015611a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a53919061543b565b858281518110611a6557611a65615ab7565b602090810291909101015280611a7a81615a46565b91505061198c565b50600b6000611a9087610f47565b815260200190815260200160002060009055611ac4878281518110611ab757611ab7615ab7565b6020026020010151613ea1565b80611ace81615a46565b9150506117c4565b506000611ae4836001615888565b9050611aef886129d8565b15611b335760405162461bcd60e51b8152602060048201526014602482015273151c985a5d1cc8185b1c9958591e48195e1a5cdd60621b6044820152606401610d7f565b60048110611b835760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f7420636f6d62696e65206d6f7265207468616e20332074696d65736044820152606401610d7f565b6001811115611bfe576000611b9782610edb565b60365460405163079cc67960e41b8152336004820152602481018390529192506001600160a01b0316906379cc679090604401600060405180830381600087803b158015611be457600080fd5b505af1158015611bf8573d6000803e3d6000fd5b50505050505b603654600e54604051630236e44f60e31b81526001600160a01b03909216916311b7227891611c339160040190815260200190565b600060405180830381600087803b158015611c4d57600080fd5b505af1158015611c61573d6000803e3d6000fd5b50505050611c7133600e54613f36565b6000611c7c89610f47565b600e546000828152600b6020526040812091909155909150611c9d8a61106a565b90506000611cac8b8b84612428565b90506000611cb982611530565b9050611ccb600e548d85888587613f50565b60005b6007811015611e085773ff99ac97c9a882a815e582b23bb8030f159bc387631fcd6ae28a8381518110611d0357611d03615ab7565b60200260200101518f8481518110611d1d57611d1d615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401611d459392919061581f565b60206040518083038186803b158015611d5d57600080fd5b505af4158015611d71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d95919061543b565b898281518110611da757611da7615ab7565b602002602001018181525050888181518110611dc557611dc5615ab7565b602002602001015160168260078110611de057611de0615ab7565b016000828254611df091906159ce565b90915550819050611e0081615a46565b915050611cce565b50600e547f332d8cf97edada810078474590fe8c8a9d3818789435d6aa350a903e45d80fba8d85888587604051611e43959493929190615653565b60405180910390a2600e8054906000611e5b83615a46565b9190505550505050505050505050505050565b33611e776123e5565b6001600160a01b031614611e9d5760405162461bcd60e51b8152600401610d7f90615799565b8051611424906039906020840190614fad565b6000821580611ebf5750600283145b80611eca5750600383145b80611ed55750600183145b15611f125781611ee8575061012c610c4e565b600d821015611ef957506028610c4e565b600f821015611f0a57506050610c4e565b506096610c4e565b6004831415611f5857611f268260066159af565b611f31600284615903565b611f3c9060046159af565b611f469190615888565b611f5190600a615888565b9050610c4e565b6006831415611fa25781611f6e57506000610c4e565b6003821015611f7f57506064610c4e565b6005821015611f90575060c8610c4e565b6007821015611fa25750610190610c4e565b50600092915050565b6000818152600260205260408120546001600160a01b031680610c4e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610d7f565b60006001600160a01b03821661208d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d7f565b506001600160a01b031660009081526003602052604090205490565b336120b26123e5565b6001600160a01b0316146120d85760405162461bcd60e51b8152600401610d7f90615799565b6120e26000614079565b565b602781600781106120f457600080fd5b0154905081565b606073ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a6016846007811061212a5761212a615ab7565b0154600f856007811061213f5761213f615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b15801561217d57600080fd5b505af4158015612191573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c4e91908101906152d5565b60606000806000806121d26121cd87613cb5565b613d53565b939a9299509097509550909350915050565b6000908152600c60205260409020541590565b603554604051632118854760e21b8152600091829163010000009091046001600160a01b031690638462151c906122329033906004016155a7565b60006040518083038186803b15801561224a57600080fd5b505afa15801561225e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261228691908101906152d5565b90506000805b82518110156122dc576122b78382815181106122aa576122aa615ab7565b60200260200101516121e4565b156122ca57816122c681615a46565b9250505b806122d481615a46565b91505061228c565b5092915050565b336122ec6123e5565b6001600160a01b0316146123125760405162461bcd60e51b8152600401610d7f90615799565b6035805462ffff00191662010000179055565b6060600061233283612022565b90506000816001600160401b0381111561234e5761234e615acd565b604051908082528060200260200182016040528015612377578160200160208202803683370190505b50905060005b828110156123be5761238f8582610fd4565b8282815181106123a1576123a1615ab7565b6020908102919091010152806123b681615a46565b91505061237d565b509392505050565b602e82600781106123d657600080fd5b018181548110610c7057600080fd5b600a546001600160a01b031690565b606060018054610c9490615a11565b6000600b600061241284610f47565b8152602001908152602001600020549050919050565b60008360058151811061243d5761243d615ab7565b602002602001015160011415612456575061057861255d565b8360058151811061246957612469615ab7565b602002602001015160021415612482575061064061255d565b8360058151811061249557612495615ab7565b6020026020010151600314156124ae575061070861255d565b6124b6614f53565b60005b8451811015612509576124d785828151811061184d5761184d615ab7565b915060038261014001516124eb91906158a0565b6124f59084615888565b92508061250181615a46565b9150506124b9565b506125138561276e565b61251d9083615888565b91506001831161252d5781612559565b600a61253a8460046159af565b612545906004615888565b61254f90846159af565b61255991906158a0565b9150505b9392505050565b603554610100900460ff1661258b5760405162461bcd60e51b8152600401610d7f9061569d565b603554604051632118854760e21b8152600091630100000090046001600160a01b031690638462151c906125c39033906004016155a7565b60006040518083038186803b1580156125db57600080fd5b505afa1580156125ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261261791908101906152d5565b90506000805b82518110156126905761263b8382815181106122aa576122aa615ab7565b15612671576126633384838151811061265657612656615ab7565b6020026020010151613721565b8161266d81615a46565b9250505b8382141561267e57612690565b8061268881615a46565b91505061261d565b5080603860008282546126a39190615888565b9091555050505050565b6001600160a01b0382163314156127025760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610d7f565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000805b82518110156110fe5761279e8184838151811061279157612791615ab7565b6020026020010151611eb0565b6127a89083615888565b9150806127b481615a46565b915050612772565b336127c56123e5565b6001600160a01b0316146127eb5760405162461bcd60e51b8152600401610d7f90615799565b6127108111801561280857506128056101f4612710615888565b81105b6128535760405162461bcd60e51b815260206004820152601c60248201527b2737ba10309032b634b3b4b13632903932b9b2b93b32903a37b5b2b760211b6044820152606401610d7f565b6114248282613721565b606073ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a601d846007811061212a5761212a615ab7565b6000612896614f53565b606060005b8551811015612956576000805b8651811015612930576128c687828151811061184d5761184d615ab7565b94506128d185613d53565b50508a519296508a92869250821090506128ed576128ed615ab7565b602002602001015184848151811061290757612907615ab7565b6020026020010151141561291e5760019150612930565b8061292881615a46565b9150506128a8565b5080612943576000945050505050610c4e565b508061294e81615a46565b91505061289b565b50600195945050505050565b3361296b6123e5565b6001600160a01b0316146129915760405162461bcd60e51b8152600401610d7f90615799565b6035805460ff19166001179055565b6129aa33836134be565b6129c65760405162461bcd60e51b8152600401610d7f906157ce565b6129d2848484846140cb565b50505050565b60006129e382612403565b151592915050565b336129f46123e5565b6001600160a01b031614612a1a5760405162461bcd60e51b8152600401610d7f90615799565b603a80546001600160a01b039384166001600160a01b031991821617909155603b8054929093169116179055565b33612a516123e5565b6001600160a01b031614612a775760405162461bcd60e51b8152600401610d7f90615799565b6035805462ff000019169055565b6060612a9082613433565b612af45760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610d7f565b6000612afe6140fe565b90506000815111612b1e576040518060200160405280600081525061255d565b80612b288461410d565b604051602001612b39929190615578565b6040516020818303038152906040529392505050565b33612b586123e5565b6001600160a01b031614612b7e5760405162461bcd60e51b8152600401610d7f90615799565b60006127105b612b926101f4612710615888565b8110156129d257612ba2816121e4565b15612bbf57612bb18482613721565b81612bbb81615a46565b9250505b82821415612bcd5750505050565b80612bd781615a46565b915050612b84565b33612be86123e5565b6001600160a01b031614612c0e5760405162461bcd60e51b8152600401610d7f90615799565b603580546301000000600160b81b03191663010000006001600160a01b0394851602179055603680546001600160a01b03191691909216179055565b603754600090612c5e6101f4612710615888565b612c689190615888565b60355490915060ff16612cb25760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610d7f565b614e20612cbf8383615888565b10612d035760405162461bcd60e51b8152602060048201526014602482015273115e18d959591959080c8c0c0c0c081b1a5b5a5d60621b6044820152606401610d7f565b600b8210612d235760405162461bcd60e51b8152600401610d7f90615721565b612d3482667c5850872380006159af565b341015612d535760405162461bcd60e51b8152600401610d7f90615756565b60005b82811015612d8357612d7133612d6c8385615888565b613721565b80612d7b81615a46565b915050612d56565b508160376000828254612d969190615888565b90915550505050565b6060612daa82613433565b612dcc5750506040805180820190915260028152617b7d60f01b602082015290565b506040805180820190915260018152607b60f81b60208201526000612df083613cb5565b90506000806000806000612e0386613d53565b9450945094509450945060005b8551811015612f49578015612e4657612e438860405180604001604052806002815260200161016160f51b81525061420a565b97505b612e6988604051806040016040528060018152602001601160f91b81525061420a565b9750612e9188612e8c60278460078110612e8557612e85615ab7565b0154614236565b61420a565b9750612eb98860405180604001604052806004815260200163111d101160e11b81525061420a565b9750612f1088612e8c602e8460078110612ed557612ed5615ab7565b01898581518110612ee857612ee8615ab7565b602002602001015181548110612f0057612f00615ab7565b9060005260206000200154614236565b9750612f3588604051806040016040528060018152602001601160f91b81525061420a565b975080612f4181615a46565b915050612e10565b50612f6e8760405180604001604052806002815260200161016160f51b81525061420a565b60408051600480825260a0820190925291985060009190816020015b6060815260200190600190039081612f8a57905050905060405180604001604052806008815260200167119d5b1b0814d95d60c21b81525081600081518110612fd557612fd5615ab7565b60200260200101819052506040518060400160405280600881526020016710dbdb589a5b995960c21b8152508160018151811061301457613014615ab7565b60200260200101819052506040518060400160405280600b81526020016a506f77657220436c61737360a81b8152508160028151811061305657613056615ab7565b6020026020010181905250604051806040016040528060058152602001642837bbb2b960d91b8152508160038151811061309257613092615ab7565b602090810291909101015260408051600480825260a0820190925260009181602001602082028036833701905050905085816000815181106130d6576130d6615ab7565b60200260200101818152505084816001815181106130f6576130f6615ab7565b602002602001018181525050838160028151811061311657613116615ab7565b602002602001018181525050828160038151811061313657613136615ab7565b60200260200101818152505060005b825181101561322657801561317b576131788a60405180604001604052806002815260200161016160f51b81525061420a565b99505b61319e8a604051806040016040528060018152602001601160f91b81525061420a565b99506131c38a8483815181106131b6576131b6615ab7565b602002602001015161420a565b99506131ea8a604051806040016040528060038152602001620111d160ed1b81525061420a565b99506132128a612e8c84848151811061320557613205615ab7565b602002602001015161410d565b99508061321e81615a46565b915050613145565b5061324a89604051806040016040528060018152602001607d60f81b81525061420a565b9a9950505050505050505050565b336132616123e5565b6001600160a01b0316146132875760405162461bcd60e51b8152600401610d7f90615799565b6035805460ff19169055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336132ca6123e5565b6001600160a01b0316146132f05760405162461bcd60e51b8152600401610d7f90615799565b6035805461ff001916610100179055565b3361330a6123e5565b6001600160a01b0316146133305760405162461bcd60e51b8152600401610d7f90615799565b6001600160a01b0381166133955760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d7f565b61339e81614079565b50565b336133aa6123e5565b6001600160a01b0316146133d05760405162461bcd60e51b8152600401610d7f90615799565b6035805461ff0019169055565b3b151590565b60006001600160e01b031982166380ac58cd60e01b148061341457506001600160e01b03198216635b5e139f60e01b145b80610c4e57506301ffc9a760e01b6001600160e01b0319831614610c4e565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061348582611fab565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006134c982613433565b61352a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d7f565b600061353583611fab565b9050806001600160a01b0316846001600160a01b031614806135705750836001600160a01b031661356584610d17565b6001600160a01b0316145b8061358057506135808185613293565b949350505050565b826001600160a01b031661359b82611fab565b6001600160a01b0316146136035760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610d7f565b6001600160a01b0382166136655760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d7f565b613670838383614350565b61367b600082613450565b6001600160a01b03831660009081526003602052604081208054600192906136a49084906159ce565b90915550506001600160a01b03821660009081526003602052604081208054600192906136d2908490615888565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020615b0f83398151915291a4505050565b6040516001600160601b03193360601b166020820152603481018290524460548201524260748201526000906094016040516020818303038152906040528051906020012060001c9050600061377682614408565b9050613781816129d8565b156137fe5760005b61379383826147fc565b91506137a0600182615888565b9050600581106137ef5760405162461bcd60e51b815260206004820152601a60248201527914995c9bdb1b1959081d1c985a5d1cc8189d5d0819985a5b195960321b6044820152606401610d7f565b6137f8826129d8565b61378957505b600061380982610f47565b6000818152600b602052604081208690559091506138268361106a565b604080516000808252602082019092529192509061384690859084612428565b9050600061385382611530565b905061386487868560008587613f50565b61386d85610eb5565b15613a835773ff99ac97c9a882a815e582b23bb8030f159bc387631fcd6ae2601d60050154876005815181106138a5576138a5615ab7565b602002602001015160016040518463ffffffff1660e01b81526004016138cd9392919061581f565b60206040518083038186803b1580156138e557600080fd5b505af41580156138f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061391d919061543b565b601d6005015573ff99ac97c9a882a815e582b23bb8030f159bc38763b59cd4d76016600501548760058151811061395657613956615ab7565b602002602001015160016040518463ffffffff1660e01b815260040161397e9392919061581f565b60206040518083038186803b15801561399657600080fd5b505af41580156139aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139ce919061543b565b601b55602454855173ff99ac97c9a882a815e582b23bb8030f159bc38791631fcd6ae2918890600090613a0357613a03615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401613a2b9392919061581f565b60206040518083038186803b158015613a4357600080fd5b505af4158015613a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7b919061543b565b602455613c60565b60005b8551811015613c3d5773ff99ac97c9a882a815e582b23bb8030f159bc387631fcd6ae2601d8360078110613abc57613abc615ab7565b0154888481518110613ad057613ad0615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401613af89392919061581f565b60206040518083038186803b158015613b1057600080fd5b505af4158015613b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b48919061543b565b601d8260078110613b5b57613b5b615ab7565b015573ff99ac97c9a882a815e582b23bb8030f159bc38763b59cd4d760168360078110613b8a57613b8a615ab7565b0154888481518110613b9e57613b9e615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401613bc69392919061581f565b60206040518083038186803b158015613bde57600080fd5b505af4158015613bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c16919061543b565b60168260078110613c2957613c29615ab7565b015580613c3581615a46565b915050613a86565b506000878152600d60209081526040822080546001810182559083529120018790555b613c6a8888613f36565b867f332d8cf97edada810078474590fe8c8a9d3818789435d6aa350a903e45d80fba868560008587604051613ca3959493929190615653565b60405180910390a25050505050505050565b613cbd614f53565b6000918252600c60209081526040928390205460ff8082168452600882901c811684840152601082901c811684860152601882901c811660608501529181901c82166080840152602881901c821660a0840152603081901c821660c0840152603881901c821660e08401529283901c8116610100830152604883901c1661012082015260509190911c61ffff1661014082015290565b60408051600780825261010082019092526060916000918291829182916020820160e080368337019050509450856000015185600081518110613d9857613d98615ab7565b602002602001018181525050856020015185600181518110613dbc57613dbc615ab7565b602002602001018181525050856040015185600281518110613de057613de0615ab7565b602002602001018181525050856060015185600381518110613e0457613e04615ab7565b602002602001018181525050856080015185600481518110613e2857613e28615ab7565b6020026020010181815250508560a0015185600581518110613e4c57613e4c615ab7565b6020026020010181815250508560c0015185600681518110613e7057613e70615ab7565b60209081029190910101525050505060e0820151610100830151610120840151610140909401519294919390929091565b6000613eac82611fab565b9050613eba81600084614350565b613ec5600083613450565b6001600160a01b0381166000908152600360205260408120805460019290613eee9084906159ce565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020615b0f833981519152908390a45050565b611424828260405180602001604052806000815250614b57565b600085600081518110613f6557613f65615ab7565b60200260200101519050600886600181518110613f8457613f84615ab7565b6020026020010151901b81179050601086600281518110613fa757613fa7615ab7565b6020026020010151901b81179050601886600381518110613fca57613fca615ab7565b6020026020010151901b81179050602086600481518110613fed57613fed615ab7565b6020026020010151901b8117905060288660058151811061401057614010615ab7565b6020026020010151901b8117905060308660068151811061403357614033615ab7565b6020908102919091018101516000998a52600c90915260409889902060509490941b60489590951b9590981b60389690961b97901b179590951792909217171790915550565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6140d6848484613588565b6140e284848484614b8a565b6129d25760405162461bcd60e51b8152600401610d7f906156cf565b606060398054610c9490615a11565b6060816141315750506040805180820190915260018152600360fc1b602082015290565b8160005b811561415b578061414581615a46565b91506141549050600a836158a0565b9150614135565b6000816001600160401b0381111561417557614175615acd565b6040519080825280601f01601f19166020018201604052801561419f576020820181803683370190505b5090505b8415613580576141b46001836159ce565b91506141c1600a86615a61565b6141cc906030615888565b60f81b8183815181106141e1576141e1615ab7565b60200101906001600160f81b031916908160001a905350614203600a866158a0565b94506141a3565b6060828260405160200161421f929190615578565b604051602081830303815290604052905092915050565b606060005b602081108015614269575082816020811061425857614258615ab7565b1a60f81b6001600160f81b03191615155b15614280578061427881615a46565b91505061423b565b6000816001600160401b0381111561429a5761429a615acd565b6040519080825280601f01601f1916602001820160405280156142c4576020820181803683370190505b509050600091505b6020821080156142fa57508382602081106142e9576142e9615ab7565b1a60f81b6001600160f81b03191615155b1561255d5783826020811061431157614311615ab7565b1a60f81b81838151811061432757614327615ab7565b60200101906001600160f81b031916908160001a9053508161434881615a46565b9250506142cc565b6001600160a01b0383166143ab576143a681600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6143ce565b816001600160a01b0316836001600160a01b0316146143ce576143ce8382614c97565b6001600160a01b0382166143e557610eb081614d34565b826001600160a01b0316826001600160a01b031614610eb057610eb08282614de3565b6040805160078082526101008201909252606091600091906020820160e08036833701905050905060005b60078110156145e65773ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a601d856007811061448357614483615ab7565b0154600f866007811061449857614498615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b1580156144d657600080fd5b505af41580156144ea573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261451291908101906152d5565b8661451e856001615888565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614567929160040161560b565b60206040518083038186803b15801561457f57600080fd5b505af4158015614593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145b7919061543b565b8282815181106145c9576145c9615ab7565b6020908102919091010152806145de81615a46565b915050614433565b506145f081610eb5565b15610c4e57600073ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a602454600f60006007811061464257614642615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b15801561468057600080fd5b505af4158015614694573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526146bc91908101906152d5565b60408051602081018990520160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b1682526146ff929160040161560b565b60206040518083038186803b15801561471757600080fd5b505af415801561472b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061474f919061543b565b905060005b600581101561478d578183828151811061477057614770615ab7565b60209081029190910101528061478581615a46565b915050614754565b50816005815181106147a1576147a1615ab7565b602002602001015160096147b59190615888565b826004815181106147c8576147c8615ab7565b6020026020010181815250506000826006815181106147e9576147e9615ab7565b6020026020010181815250505092915050565b6040805160078082526101008201909252606091600091906020820160e08036833701905050905060005b60048110156149c75773ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a602554600f866007811061487a5761487a615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b1580156148b857600080fd5b505af41580156148cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526148f491908101906152d5565b876148ff85896159af565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614948929160040161560b565b60206040518083038186803b15801561496057600080fd5b505af4158015614974573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614998919061543b565b8282815181106149aa576149aa615ab7565b6020908102919091010152806149bf81615a46565b915050614827565b5073ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a602654600f600460078110614a1357614a13615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b158015614a5157600080fd5b505af4158015614a65573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614a8d91908101906152d5565b86614a996004886159af565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614ae2929160040161560b565b60206040518083038186803b158015614afa57600080fd5b505af4158015614b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b32919061543b565b81600481518110614b4557614b45615ab7565b60209081029190910101529392505050565b614b618383614e27565b614b6e6000848484614b8a565b610eb05760405162461bcd60e51b8152600401610d7f906156cf565b60006001600160a01b0384163b15614c8c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614bce9033908990889088906004016155bb565b602060405180830381600087803b158015614be857600080fd5b505af1925050508015614c18575060408051601f3d908101601f19168201909252614c1591810190615471565b60015b614c72573d808015614c46576040519150601f19603f3d011682016040523d82523d6000602084013e614c4b565b606091505b508051614c6a5760405162461bcd60e51b8152600401610d7f906156cf565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613580565b506001949350505050565b60006001614ca484612022565b614cae91906159ce565b600083815260076020526040902054909150808214614d01576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090614d46906001906159ce565b60008381526009602052604081205460088054939450909284908110614d6e57614d6e615ab7565b906000526020600020015490508060088381548110614d8f57614d8f615ab7565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614dc757614dc7615aa1565b6001900381819060005260206000200160009055905550505050565b6000614dee83612022565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216614e7d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d7f565b614e8681613433565b15614ed25760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610d7f565b614ede60008383614350565b6001600160a01b0382166000908152600360205260408120805460019290614f07908490615888565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020615b0f833981519152908290a45050565b60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054614fb990615a11565b90600052602060002090601f016020900481019282614fdb5760008555615021565b82601f10614ff457805160ff1916838001178555615021565b82800160010185558215615021579182015b82811115615021578251825591602001919060010190615006565b5061502d929150615031565b5090565b5b8082111561502d5760008155600101615032565b60006001600160401b0383111561505f5761505f615acd565b615072601f8401601f1916602001615835565b905082815283838301111561508657600080fd5b828260208301376000602084830101529392505050565b600082601f8301126150ae57600080fd5b813560206150c36150be83615865565b615835565b80838252828201915082860187848660051b89010111156150e357600080fd5b60005b85811015615102578135845292840192908401906001016150e6565b5090979650505050505050565b60006020828403121561512157600080fd5b813561255d81615ae3565b60006020828403121561513e57600080fd5b815161255d81615ae3565b6000806040838503121561515c57600080fd5b823561516781615ae3565b9150602083013561517781615ae3565b809150509250929050565b60008060006060848603121561519757600080fd5b83356151a281615ae3565b925060208401356151b281615ae3565b929592945050506040919091013590565b600080600080608085870312156151d957600080fd5b84356151e481615ae3565b935060208501356151f481615ae3565b92506040850135915060608501356001600160401b0381111561521657600080fd5b8501601f8101871361522757600080fd5b61523687823560208401615046565b91505092959194509250565b6000806040838503121561525557600080fd5b823561526081615ae3565b91506020830135801515811461517757600080fd5b6000806040838503121561528857600080fd5b823561529381615ae3565b946020939093013593505050565b6000602082840312156152b357600080fd5b81356001600160401b038111156152c957600080fd5b6135808482850161509d565b600060208083850312156152e857600080fd5b82516001600160401b038111156152fe57600080fd5b8301601f8101851361530f57600080fd5b805161531d6150be82615865565b80828252848201915084840188868560051b870101111561533d57600080fd5b600094505b83851015615360578051835260019490940193918501918501615342565b50979650505050505050565b6000806040838503121561537f57600080fd5b82356001600160401b038082111561539657600080fd5b6153a28683870161509d565b935060208501359150808211156153b857600080fd5b506153c58582860161509d565b9150509250929050565b6000806000606084860312156153e457600080fd5b83356001600160401b03808211156153fb57600080fd5b6154078783880161509d565b9450602086013591508082111561541d57600080fd5b5061542a8682870161509d565b925050604084013590509250925092565b60006020828403121561544d57600080fd5b5051919050565b60006020828403121561546657600080fd5b813561255d81615af8565b60006020828403121561548357600080fd5b815161255d81615af8565b6000602082840312156154a057600080fd5b81356001600160401b038111156154b657600080fd5b8201601f810184136154c757600080fd5b61358084823560208401615046565b6000602082840312156154e857600080fd5b5035919050565b6000806040838503121561550257600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561554157815187529582019590820190600101615525565b509495945050505050565b600081518084526155648160208601602086016159e5565b601f01601f19169290920160200192915050565b6000835161558a8184602088016159e5565b83519083019061559e8183602088016159e5565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906155ee9083018461554c565b9695505050505050565b60208152600061255d6020830184615511565b604080825283519082018190526000906020906060840190828701845b8281101561564457815184529284019290840190600101615628565b50505092019290925292915050565b60a08152600061566660a0830188615511565b90508560208301528460408301528360608301528260808301529695505050505050565b60208152600061255d602083018461554c565b6020808252601890820152774672656520636c61696d206973206e6f742061637469766560401b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601b908201527a596f752063616e20627579206d6178696d756d20313020626f747360281b604082015260600190565b60208082526023908201527f45746865722076616c75652073656e742069732062656c6f772074686520707260408201526269636560e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b9283526020830191909152604082015260600190565b604051601f8201601f191681016001600160401b038111828210171561585d5761585d615acd565b604052919050565b60006001600160401b0382111561587e5761587e615acd565b5060051b60200190565b6000821982111561589b5761589b615a75565b500190565b6000826158af576158af615a8b565b500490565b600181815b808511156158ef5781600019048211156158d5576158d5615a75565b808516156158e257918102915b93841c93908002906158b9565b509250929050565b600061255d838361590e565b600061255d60ff8416835b60008261591d57506001610c4e565b8161592a57506000610c4e565b8160018114615940576002811461594a57615966565b6001915050610c4e565b60ff84111561595b5761595b615a75565b50506001821b610c4e565b5060208310610133831016604e8410600b8410161715615989575081810a610c4e565b61599383836158b4565b80600019048211156159a7576159a7615a75565b029392505050565b60008160001904831182151516156159c9576159c9615a75565b500290565b6000828210156159e0576159e0615a75565b500390565b60005b83811015615a005781810151838201526020016159e8565b838111156129d25750506000910152565b600181811c90821680615a2557607f821691505b602082108114156110fe57634e487b7160e01b600052602260045260246000fd5b6000600019821415615a5a57615a5a615a75565b5060010190565b600082615a7057615a70615a8b565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461339e57600080fd5b6001600160e01b03198116811461339e57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122071160c52e04c58f9c033e70dcca0c8fbfe5ed3eec8cb53f6c7421a31aeda777564736f6c63430008070033

Deployed Bytecode

0x6080604052600436106103925760003560e01c80637abf8786116101df578063b1b299df11610109578063b1b299df146109f8578063b26c128b14610a18578063b66a0e5d14610a38578063b88d4fde14610a4d578063beeeb22814610a6d578063c1bba17714610a8d578063c5d0911014610aad578063c87b56dd14610ac2578063d3ad9be914610ae2578063d4a1515a14610b02578063d8952a4914610b22578063d96a094a14610b42578063e3684e3914610b55578063e36b0b3714610b75578063e985e9c514610b8a578063ecbfc07714610baa578063f2fde38b14610bbf578063f309455a14610bdf578063fa53cd3814610bf5578063ff6c9bc914610c1457600080fd5b80637abf87861461080457806382da046614610824578063840bfb21146108395780638462151c1461084e578063865dfcd91461086e578063891f42b81461088e5780638c3301a9146108a35780638da5cb5b146108b857806395d89b41146108cd57806396bc59c7146108e257806396f0fe8e146109025780639aa362d0146109175780639c2f2a42146109375780639dee08c71461094d578063a22cb4651461096d578063a95e5ddf1461098d578063aa1cd310146109a2578063ada544c5146109c2578063b0ea1802146109d857600080fd5b806342842e0e116102c057806342842e0e146105ed578063454836ad1461060d5780634f6ccce71461062257806355e7d6421461064257806355f804b314610662578063564566a814610682578063565d77041461069c57806358821375146106b15780635c472bc7146106d15780635e1b93a3146106e65780636113f9e41461069c5780636352211e1461070657806368f1ea14146107265780636d1f7e301461073c57806370a0823114610751578063715018a6146107715780637564dd8f1461078657806377fb127c146107a65780637abd00b1146107d357600080fd5b806301ffc9a714610397578063031bd4c4146103cc5780630409df2a146103f0578063052b3d771461042457806306fdde0314610444578063081812fc14610466578063095ea7b31461048657806311f3653f146104a857806318160ddd146104c857806319f8c255146104dd57806323b872dd146104fd5780632f4613831461051d5780632f745c591461053d578063362f24c01461055d578063379607f51461057d57806339bec9881461059d5780633ccfd60b146105b25780633edb6d50146105ba5780633f5b5278146105cd575b600080fd5b3480156103a357600080fd5b506103b76103b2366004615454565b610c29565b60405190151581526020015b60405180910390f35b3480156103d857600080fd5b506103e2614e2081565b6040519081526020016103c3565b3480156103fc57600080fd5b5060355461041790630100000090046001600160a01b031681565b6040516103c391906155a7565b34801561043057600080fd5b506103e261043f3660046154ef565b610c54565b34801561045057600080fd5b50610459610c85565b6040516103c3919061568a565b34801561047257600080fd5b506104176104813660046154d6565b610d17565b34801561049257600080fd5b506104a66104a1366004615275565b610da4565b005b3480156104b457600080fd5b506103b76104c33660046152a1565b610eb5565b3480156104d457600080fd5b506008546103e2565b3480156104e957600080fd5b506103e26104f83660046154d6565b610edb565b34801561050957600080fd5b506104a6610518366004615182565b610f16565b34801561052957600080fd5b506103e26105383660046152a1565b610f47565b34801561054957600080fd5b506103e2610558366004615275565b610fd4565b34801561056957600080fd5b506103e26105783660046152a1565b61106a565b34801561058957600080fd5b506104a66105983660046154d6565b611104565b3480156105a957600080fd5b506103e2600281565b6104a66112d2565b6104a66105c83660046154d6565b611428565b3480156105d957600080fd5b506103e26105e83660046154d6565b611530565b3480156105f957600080fd5b506104a6610608366004615182565b6115dc565b34801561061957600080fd5b506103e2600781565b34801561062e57600080fd5b506103e261063d3660046154d6565b6115f7565b34801561064e57600080fd5b506104a661065d36600461536c565b61168a565b34801561066e57600080fd5b506104a661067d36600461548e565b611e6e565b34801561068e57600080fd5b506035546103b79060ff1681565b3480156106a857600080fd5b506103e2600681565b3480156106bd57600080fd5b506035546103b79062010000900460ff1681565b3480156106dd57600080fd5b506103e2600381565b3480156106f257600080fd5b506103e26107013660046154ef565b611eb0565b34801561071257600080fd5b506104176107213660046154d6565b611fab565b34801561073257600080fd5b506103e260245481565b34801561074857600080fd5b506103e2600581565b34801561075d57600080fd5b506103e261076c36600461510f565b612022565b34801561077d57600080fd5b506104a66120a9565b34801561079257600080fd5b506103e26107a13660046154d6565b6120e4565b3480156107b257600080fd5b506107c66107c13660046154d6565b6120fb565b6040516103c391906155f8565b3480156107df57600080fd5b506107f36107ee3660046154d6565b6121b9565b6040516103c3959493929190615653565b34801561081057600080fd5b506103b761081f3660046154d6565b6121e4565b34801561083057600080fd5b506103e26121f7565b34801561084557600080fd5b506104a66122e3565b34801561085a57600080fd5b506107c661086936600461510f565b612325565b34801561087a57600080fd5b506103e26108893660046154ef565b6123c6565b34801561089a57600080fd5b506103e2601081565b3480156108af57600080fd5b506103e2600481565b3480156108c457600080fd5b506104176123e5565b3480156108d957600080fd5b506104596123f4565b3480156108ee57600080fd5b506103e26108fd3660046152a1565b612403565b34801561090e57600080fd5b506103e2600081565b34801561092357600080fd5b506103e26109323660046153cf565b612428565b34801561094357600080fd5b506103e260385481565b34801561095957600080fd5b506104a66109683660046154d6565b612564565b34801561097957600080fd5b506104a6610988366004615242565b6126ad565b34801561099957600080fd5b506103e2600181565b3480156109ae57600080fd5b506103e26109bd3660046152a1565b61276e565b3480156109ce57600080fd5b506103e2600e5481565b3480156109e457600080fd5b506104a66109f3366004615275565b6127bc565b348015610a0457600080fd5b506107c6610a133660046154d6565b61285d565b348015610a2457600080fd5b506103b7610a3336600461536c565b61288c565b348015610a4457600080fd5b506104a6612962565b348015610a5957600080fd5b506104a6610a683660046151c3565b6129a0565b348015610a7957600080fd5b506103b7610a883660046152a1565b6129d8565b348015610a9957600080fd5b506104a6610aa8366004615149565b6129eb565b348015610ab957600080fd5b506104a6612a48565b348015610ace57600080fd5b50610459610add3660046154d6565b612a85565b348015610aee57600080fd5b50603654610417906001600160a01b031681565b348015610b0e57600080fd5b506104a6610b1d366004615275565b612b4f565b348015610b2e57600080fd5b506104a6610b3d366004615149565b612bdf565b6104a6610b503660046154d6565b612c4a565b348015610b6157600080fd5b50610459610b703660046154d6565b612d9f565b348015610b8157600080fd5b506104a6613258565b348015610b9657600080fd5b506103b7610ba5366004615149565b613293565b348015610bb657600080fd5b506104a66132c1565b348015610bcb57600080fd5b506104a6610bda36600461510f565b613301565b348015610beb57600080fd5b506103e260375481565b348015610c0157600080fd5b506035546103b790610100900460ff1681565b348015610c2057600080fd5b506104a66133a1565b60006001600160e01b0319821663780e9d6360e01b1480610c4e5750610c4e826133e3565b92915050565b600d6020528160005260406000208181548110610c7057600080fd5b90600052602060002001600091509150505481565b606060008054610c9490615a11565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc090615a11565b8015610d0d5780601f10610ce257610100808354040283529160200191610d0d565b820191906000526020600020905b815481529060010190602001808311610cf057829003601f168201915b5050505050905090565b6000610d2282613433565b610d885760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610daf82611fab565b9050806001600160a01b0316836001600160a01b03161415610e1d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d7f565b336001600160a01b0382161480610e395750610e398133613293565b610ea65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610d7f565b610eb08383613450565b505050565b60008082600581518110610ecb57610ecb615ab7565b6020026020010151119050919050565b600060018211610eed57506000919050565b610ef8826001615888565b610f039060026158f7565b610c4e90680ad78ebc5ac62000006159af565b610f2033826134be565b610f3c5760405162461bcd60e51b8152600401610d7f906157ce565b610eb0838383613588565b60405163c91286fd60e01b815260009073ff99ac97c9a882a815e582b23bb8030f159bc3879063c91286fd90610f8490859060069060040161560b565b60206040518083038186803b158015610f9c57600080fd5b505af4158015610fb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4e919061543b565b6000610fdf83612022565b82106110415760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d7f565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000805b60048110156110fe576000805b60048110156110de5784818151811061109657611096615ab7565b60200260200101518584815181106110b0576110b0615ab7565b602002602001015114156110cc57816110c881615a46565b9250505b806110d681615a46565b91505061107b565b50828111156110eb578092505b50806110f681615a46565b91505061106e565b50919050565b603554610100900460ff1661112b5760405162461bcd60e51b8152600401610d7f9061569d565b612710811061116f5760405162461bcd60e51b815260206004820152601060248201526f496e656c696769626c6520436c61696d60801b6044820152606401610d7f565b611178816121e4565b6111ce5760405162461bcd60e51b815260206004820152602160248201527f4269747479426f742068617320616c7265616479206265656e20636c61696d656044820152601960fa1b6064820152608401610d7f565b6127108110156112b0576035546040516331a9108f60e11b8152600481018390523391630100000090046001600160a01b031690636352211e9060240160206040518083038186803b15801561122357600080fd5b505afa158015611237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125b919061512c565b6001600160a01b0316146112b05760405162461bcd60e51b815260206004820152601c60248201527b139bc810da1d58989a59481d1bc818db185a5b48109a5d1d1e509bdd60221b6044820152606401610d7f565b6112ba3382613721565b603880549060006112ca83615a46565b919050555050565b603b546001600160a01b03163314806112f55750603a546001600160a01b031633145b8061131857506113036123e5565b6001600160a01b0316336001600160a01b0316145b6113555760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b73232b960911b6044820152606401610d7f565b60006113626014476158a0565b61136d9060096159af565b603b546040519192506001600160a01b03169082156108fc029083906000818181858888f193505050501580156113a8573d6000803e3d6000fd5b50603a546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156113e3573d6000803e3d6000fd5b506113ec6123e5565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015611424573d6000803e3d6000fd5b5050565b60355460ff168015611442575060355462010000900460ff165b61148d5760405162461bcd60e51b815260206004820152601c60248201527b119a5b985b081cd85b19481a185cc8185b1c9958591e48195b99195960221b6044820152606401610d7f565b600b81106114ad5760405162461bcd60e51b8152600401610d7f90615721565b6114be81667c5850872380006159af565b3410156114dd5760405162461bcd60e51b8152600401610d7f90615756565b6000805b612710811015610eb0576114f4816121e4565b15611511576115033382613721565b8161150d81615a46565b9250505b8282141561151e57505050565b8061152881615a46565b9150506114e1565b600061012c82101561154457506001919050565b6101f482101561155657506002919050565b61032082101561156857506003919050565b6103e882101561157a57506004919050565b6104b082101561158c57506005919050565b61057882101561159e57506006919050565b6106408210156115b057506007919050565b6107088210156115c257506008919050565b6107d08210156115d457506009919050565b50600a919050565b610eb0838383604051806020016040528060008152506129a0565b600061160260085490565b82106116655760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d7f565b6008828154811061167857611678615ab7565b90600052602060002001549050919050565b60078251146116ce5760405162461bcd60e51b815260206004820152601060248201526f4d616c666f726d65642074726169747360801b6044820152606401610d7f565b600681511061171f5760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f7420636f6d62696e65206d6f7265207468616e203520626f7473006044820152606401610d7f565b611729828261288c565b61176a5760405162461bcd60e51b8152602060048201526012602482015271547261697473206e6f7420696e20626f747360701b6044820152606401610d7f565b611772614f53565b6040805160078082526101008201909252606091600091906020820160e08036833701905050600e546000818152600d6020908152604082208054600181018255908352908220019190915590915080805b8651811015611ad6576117ef8782815181106117e2576117e2615ab7565b6020026020010151613433565b6118385760405162461bcd60e51b815260206004820152601a60248201527914d95b1958dd195908189bdd08191bd95cdb89dd08195e1a5cdd60321b6044820152606401610d7f565b61185a87828151811061184d5761184d615ab7565b6020026020010151613cb5565b955061186586613d53565b505060a0890151929750935050156118bf5760405162461bcd60e51b815260206004820152601f60248201527f5370656369616c20626f74732063616e6e6f7420626520636f6d62696e6564006044820152606401610d7f565b828211156118cb578192505b60005b600d60008984815181106118e4576118e4615ab7565b602002602001015181526020019081526020016000208054905081101561198857600d6000600e548152602001908152602001600020600d60008a858151811061193057611930615ab7565b60200260200101518152602001908152602001600020828154811061195757611957615ab7565b600091825260208083209091015483546001810185559383529120909101558061198081615a46565b9150506118ce565b5060005b6007811015611a825773ff99ac97c9a882a815e582b23bb8030f159bc38763b59cd4d78683815181106119c1576119c1615ab7565b60200260200101518884815181106119db576119db615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401611a039392919061581f565b60206040518083038186803b158015611a1b57600080fd5b505af4158015611a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a53919061543b565b858281518110611a6557611a65615ab7565b602090810291909101015280611a7a81615a46565b91505061198c565b50600b6000611a9087610f47565b815260200190815260200160002060009055611ac4878281518110611ab757611ab7615ab7565b6020026020010151613ea1565b80611ace81615a46565b9150506117c4565b506000611ae4836001615888565b9050611aef886129d8565b15611b335760405162461bcd60e51b8152602060048201526014602482015273151c985a5d1cc8185b1c9958591e48195e1a5cdd60621b6044820152606401610d7f565b60048110611b835760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f7420636f6d62696e65206d6f7265207468616e20332074696d65736044820152606401610d7f565b6001811115611bfe576000611b9782610edb565b60365460405163079cc67960e41b8152336004820152602481018390529192506001600160a01b0316906379cc679090604401600060405180830381600087803b158015611be457600080fd5b505af1158015611bf8573d6000803e3d6000fd5b50505050505b603654600e54604051630236e44f60e31b81526001600160a01b03909216916311b7227891611c339160040190815260200190565b600060405180830381600087803b158015611c4d57600080fd5b505af1158015611c61573d6000803e3d6000fd5b50505050611c7133600e54613f36565b6000611c7c89610f47565b600e546000828152600b6020526040812091909155909150611c9d8a61106a565b90506000611cac8b8b84612428565b90506000611cb982611530565b9050611ccb600e548d85888587613f50565b60005b6007811015611e085773ff99ac97c9a882a815e582b23bb8030f159bc387631fcd6ae28a8381518110611d0357611d03615ab7565b60200260200101518f8481518110611d1d57611d1d615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401611d459392919061581f565b60206040518083038186803b158015611d5d57600080fd5b505af4158015611d71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d95919061543b565b898281518110611da757611da7615ab7565b602002602001018181525050888181518110611dc557611dc5615ab7565b602002602001015160168260078110611de057611de0615ab7565b016000828254611df091906159ce565b90915550819050611e0081615a46565b915050611cce565b50600e547f332d8cf97edada810078474590fe8c8a9d3818789435d6aa350a903e45d80fba8d85888587604051611e43959493929190615653565b60405180910390a2600e8054906000611e5b83615a46565b9190505550505050505050505050505050565b33611e776123e5565b6001600160a01b031614611e9d5760405162461bcd60e51b8152600401610d7f90615799565b8051611424906039906020840190614fad565b6000821580611ebf5750600283145b80611eca5750600383145b80611ed55750600183145b15611f125781611ee8575061012c610c4e565b600d821015611ef957506028610c4e565b600f821015611f0a57506050610c4e565b506096610c4e565b6004831415611f5857611f268260066159af565b611f31600284615903565b611f3c9060046159af565b611f469190615888565b611f5190600a615888565b9050610c4e565b6006831415611fa25781611f6e57506000610c4e565b6003821015611f7f57506064610c4e565b6005821015611f90575060c8610c4e565b6007821015611fa25750610190610c4e565b50600092915050565b6000818152600260205260408120546001600160a01b031680610c4e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610d7f565b60006001600160a01b03821661208d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d7f565b506001600160a01b031660009081526003602052604090205490565b336120b26123e5565b6001600160a01b0316146120d85760405162461bcd60e51b8152600401610d7f90615799565b6120e26000614079565b565b602781600781106120f457600080fd5b0154905081565b606073ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a6016846007811061212a5761212a615ab7565b0154600f856007811061213f5761213f615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b15801561217d57600080fd5b505af4158015612191573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c4e91908101906152d5565b60606000806000806121d26121cd87613cb5565b613d53565b939a9299509097509550909350915050565b6000908152600c60205260409020541590565b603554604051632118854760e21b8152600091829163010000009091046001600160a01b031690638462151c906122329033906004016155a7565b60006040518083038186803b15801561224a57600080fd5b505afa15801561225e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261228691908101906152d5565b90506000805b82518110156122dc576122b78382815181106122aa576122aa615ab7565b60200260200101516121e4565b156122ca57816122c681615a46565b9250505b806122d481615a46565b91505061228c565b5092915050565b336122ec6123e5565b6001600160a01b0316146123125760405162461bcd60e51b8152600401610d7f90615799565b6035805462ffff00191662010000179055565b6060600061233283612022565b90506000816001600160401b0381111561234e5761234e615acd565b604051908082528060200260200182016040528015612377578160200160208202803683370190505b50905060005b828110156123be5761238f8582610fd4565b8282815181106123a1576123a1615ab7565b6020908102919091010152806123b681615a46565b91505061237d565b509392505050565b602e82600781106123d657600080fd5b018181548110610c7057600080fd5b600a546001600160a01b031690565b606060018054610c9490615a11565b6000600b600061241284610f47565b8152602001908152602001600020549050919050565b60008360058151811061243d5761243d615ab7565b602002602001015160011415612456575061057861255d565b8360058151811061246957612469615ab7565b602002602001015160021415612482575061064061255d565b8360058151811061249557612495615ab7565b6020026020010151600314156124ae575061070861255d565b6124b6614f53565b60005b8451811015612509576124d785828151811061184d5761184d615ab7565b915060038261014001516124eb91906158a0565b6124f59084615888565b92508061250181615a46565b9150506124b9565b506125138561276e565b61251d9083615888565b91506001831161252d5781612559565b600a61253a8460046159af565b612545906004615888565b61254f90846159af565b61255991906158a0565b9150505b9392505050565b603554610100900460ff1661258b5760405162461bcd60e51b8152600401610d7f9061569d565b603554604051632118854760e21b8152600091630100000090046001600160a01b031690638462151c906125c39033906004016155a7565b60006040518083038186803b1580156125db57600080fd5b505afa1580156125ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261261791908101906152d5565b90506000805b82518110156126905761263b8382815181106122aa576122aa615ab7565b15612671576126633384838151811061265657612656615ab7565b6020026020010151613721565b8161266d81615a46565b9250505b8382141561267e57612690565b8061268881615a46565b91505061261d565b5080603860008282546126a39190615888565b9091555050505050565b6001600160a01b0382163314156127025760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610d7f565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000805b82518110156110fe5761279e8184838151811061279157612791615ab7565b6020026020010151611eb0565b6127a89083615888565b9150806127b481615a46565b915050612772565b336127c56123e5565b6001600160a01b0316146127eb5760405162461bcd60e51b8152600401610d7f90615799565b6127108111801561280857506128056101f4612710615888565b81105b6128535760405162461bcd60e51b815260206004820152601c60248201527b2737ba10309032b634b3b4b13632903932b9b2b93b32903a37b5b2b760211b6044820152606401610d7f565b6114248282613721565b606073ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a601d846007811061212a5761212a615ab7565b6000612896614f53565b606060005b8551811015612956576000805b8651811015612930576128c687828151811061184d5761184d615ab7565b94506128d185613d53565b50508a519296508a92869250821090506128ed576128ed615ab7565b602002602001015184848151811061290757612907615ab7565b6020026020010151141561291e5760019150612930565b8061292881615a46565b9150506128a8565b5080612943576000945050505050610c4e565b508061294e81615a46565b91505061289b565b50600195945050505050565b3361296b6123e5565b6001600160a01b0316146129915760405162461bcd60e51b8152600401610d7f90615799565b6035805460ff19166001179055565b6129aa33836134be565b6129c65760405162461bcd60e51b8152600401610d7f906157ce565b6129d2848484846140cb565b50505050565b60006129e382612403565b151592915050565b336129f46123e5565b6001600160a01b031614612a1a5760405162461bcd60e51b8152600401610d7f90615799565b603a80546001600160a01b039384166001600160a01b031991821617909155603b8054929093169116179055565b33612a516123e5565b6001600160a01b031614612a775760405162461bcd60e51b8152600401610d7f90615799565b6035805462ff000019169055565b6060612a9082613433565b612af45760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610d7f565b6000612afe6140fe565b90506000815111612b1e576040518060200160405280600081525061255d565b80612b288461410d565b604051602001612b39929190615578565b6040516020818303038152906040529392505050565b33612b586123e5565b6001600160a01b031614612b7e5760405162461bcd60e51b8152600401610d7f90615799565b60006127105b612b926101f4612710615888565b8110156129d257612ba2816121e4565b15612bbf57612bb18482613721565b81612bbb81615a46565b9250505b82821415612bcd5750505050565b80612bd781615a46565b915050612b84565b33612be86123e5565b6001600160a01b031614612c0e5760405162461bcd60e51b8152600401610d7f90615799565b603580546301000000600160b81b03191663010000006001600160a01b0394851602179055603680546001600160a01b03191691909216179055565b603754600090612c5e6101f4612710615888565b612c689190615888565b60355490915060ff16612cb25760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610d7f565b614e20612cbf8383615888565b10612d035760405162461bcd60e51b8152602060048201526014602482015273115e18d959591959080c8c0c0c0c081b1a5b5a5d60621b6044820152606401610d7f565b600b8210612d235760405162461bcd60e51b8152600401610d7f90615721565b612d3482667c5850872380006159af565b341015612d535760405162461bcd60e51b8152600401610d7f90615756565b60005b82811015612d8357612d7133612d6c8385615888565b613721565b80612d7b81615a46565b915050612d56565b508160376000828254612d969190615888565b90915550505050565b6060612daa82613433565b612dcc5750506040805180820190915260028152617b7d60f01b602082015290565b506040805180820190915260018152607b60f81b60208201526000612df083613cb5565b90506000806000806000612e0386613d53565b9450945094509450945060005b8551811015612f49578015612e4657612e438860405180604001604052806002815260200161016160f51b81525061420a565b97505b612e6988604051806040016040528060018152602001601160f91b81525061420a565b9750612e9188612e8c60278460078110612e8557612e85615ab7565b0154614236565b61420a565b9750612eb98860405180604001604052806004815260200163111d101160e11b81525061420a565b9750612f1088612e8c602e8460078110612ed557612ed5615ab7565b01898581518110612ee857612ee8615ab7565b602002602001015181548110612f0057612f00615ab7565b9060005260206000200154614236565b9750612f3588604051806040016040528060018152602001601160f91b81525061420a565b975080612f4181615a46565b915050612e10565b50612f6e8760405180604001604052806002815260200161016160f51b81525061420a565b60408051600480825260a0820190925291985060009190816020015b6060815260200190600190039081612f8a57905050905060405180604001604052806008815260200167119d5b1b0814d95d60c21b81525081600081518110612fd557612fd5615ab7565b60200260200101819052506040518060400160405280600881526020016710dbdb589a5b995960c21b8152508160018151811061301457613014615ab7565b60200260200101819052506040518060400160405280600b81526020016a506f77657220436c61737360a81b8152508160028151811061305657613056615ab7565b6020026020010181905250604051806040016040528060058152602001642837bbb2b960d91b8152508160038151811061309257613092615ab7565b602090810291909101015260408051600480825260a0820190925260009181602001602082028036833701905050905085816000815181106130d6576130d6615ab7565b60200260200101818152505084816001815181106130f6576130f6615ab7565b602002602001018181525050838160028151811061311657613116615ab7565b602002602001018181525050828160038151811061313657613136615ab7565b60200260200101818152505060005b825181101561322657801561317b576131788a60405180604001604052806002815260200161016160f51b81525061420a565b99505b61319e8a604051806040016040528060018152602001601160f91b81525061420a565b99506131c38a8483815181106131b6576131b6615ab7565b602002602001015161420a565b99506131ea8a604051806040016040528060038152602001620111d160ed1b81525061420a565b99506132128a612e8c84848151811061320557613205615ab7565b602002602001015161410d565b99508061321e81615a46565b915050613145565b5061324a89604051806040016040528060018152602001607d60f81b81525061420a565b9a9950505050505050505050565b336132616123e5565b6001600160a01b0316146132875760405162461bcd60e51b8152600401610d7f90615799565b6035805460ff19169055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336132ca6123e5565b6001600160a01b0316146132f05760405162461bcd60e51b8152600401610d7f90615799565b6035805461ff001916610100179055565b3361330a6123e5565b6001600160a01b0316146133305760405162461bcd60e51b8152600401610d7f90615799565b6001600160a01b0381166133955760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d7f565b61339e81614079565b50565b336133aa6123e5565b6001600160a01b0316146133d05760405162461bcd60e51b8152600401610d7f90615799565b6035805461ff0019169055565b3b151590565b60006001600160e01b031982166380ac58cd60e01b148061341457506001600160e01b03198216635b5e139f60e01b145b80610c4e57506301ffc9a760e01b6001600160e01b0319831614610c4e565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061348582611fab565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006134c982613433565b61352a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d7f565b600061353583611fab565b9050806001600160a01b0316846001600160a01b031614806135705750836001600160a01b031661356584610d17565b6001600160a01b0316145b8061358057506135808185613293565b949350505050565b826001600160a01b031661359b82611fab565b6001600160a01b0316146136035760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610d7f565b6001600160a01b0382166136655760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d7f565b613670838383614350565b61367b600082613450565b6001600160a01b03831660009081526003602052604081208054600192906136a49084906159ce565b90915550506001600160a01b03821660009081526003602052604081208054600192906136d2908490615888565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020615b0f83398151915291a4505050565b6040516001600160601b03193360601b166020820152603481018290524460548201524260748201526000906094016040516020818303038152906040528051906020012060001c9050600061377682614408565b9050613781816129d8565b156137fe5760005b61379383826147fc565b91506137a0600182615888565b9050600581106137ef5760405162461bcd60e51b815260206004820152601a60248201527914995c9bdb1b1959081d1c985a5d1cc8189d5d0819985a5b195960321b6044820152606401610d7f565b6137f8826129d8565b61378957505b600061380982610f47565b6000818152600b602052604081208690559091506138268361106a565b604080516000808252602082019092529192509061384690859084612428565b9050600061385382611530565b905061386487868560008587613f50565b61386d85610eb5565b15613a835773ff99ac97c9a882a815e582b23bb8030f159bc387631fcd6ae2601d60050154876005815181106138a5576138a5615ab7565b602002602001015160016040518463ffffffff1660e01b81526004016138cd9392919061581f565b60206040518083038186803b1580156138e557600080fd5b505af41580156138f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061391d919061543b565b601d6005015573ff99ac97c9a882a815e582b23bb8030f159bc38763b59cd4d76016600501548760058151811061395657613956615ab7565b602002602001015160016040518463ffffffff1660e01b815260040161397e9392919061581f565b60206040518083038186803b15801561399657600080fd5b505af41580156139aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139ce919061543b565b601b55602454855173ff99ac97c9a882a815e582b23bb8030f159bc38791631fcd6ae2918890600090613a0357613a03615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401613a2b9392919061581f565b60206040518083038186803b158015613a4357600080fd5b505af4158015613a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7b919061543b565b602455613c60565b60005b8551811015613c3d5773ff99ac97c9a882a815e582b23bb8030f159bc387631fcd6ae2601d8360078110613abc57613abc615ab7565b0154888481518110613ad057613ad0615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401613af89392919061581f565b60206040518083038186803b158015613b1057600080fd5b505af4158015613b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b48919061543b565b601d8260078110613b5b57613b5b615ab7565b015573ff99ac97c9a882a815e582b23bb8030f159bc38763b59cd4d760168360078110613b8a57613b8a615ab7565b0154888481518110613b9e57613b9e615ab7565b602002602001015160016040518463ffffffff1660e01b8152600401613bc69392919061581f565b60206040518083038186803b158015613bde57600080fd5b505af4158015613bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c16919061543b565b60168260078110613c2957613c29615ab7565b015580613c3581615a46565b915050613a86565b506000878152600d60209081526040822080546001810182559083529120018790555b613c6a8888613f36565b867f332d8cf97edada810078474590fe8c8a9d3818789435d6aa350a903e45d80fba868560008587604051613ca3959493929190615653565b60405180910390a25050505050505050565b613cbd614f53565b6000918252600c60209081526040928390205460ff8082168452600882901c811684840152601082901c811684860152601882901c811660608501529181901c82166080840152602881901c821660a0840152603081901c821660c0840152603881901c821660e08401529283901c8116610100830152604883901c1661012082015260509190911c61ffff1661014082015290565b60408051600780825261010082019092526060916000918291829182916020820160e080368337019050509450856000015185600081518110613d9857613d98615ab7565b602002602001018181525050856020015185600181518110613dbc57613dbc615ab7565b602002602001018181525050856040015185600281518110613de057613de0615ab7565b602002602001018181525050856060015185600381518110613e0457613e04615ab7565b602002602001018181525050856080015185600481518110613e2857613e28615ab7565b6020026020010181815250508560a0015185600581518110613e4c57613e4c615ab7565b6020026020010181815250508560c0015185600681518110613e7057613e70615ab7565b60209081029190910101525050505060e0820151610100830151610120840151610140909401519294919390929091565b6000613eac82611fab565b9050613eba81600084614350565b613ec5600083613450565b6001600160a01b0381166000908152600360205260408120805460019290613eee9084906159ce565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020615b0f833981519152908390a45050565b611424828260405180602001604052806000815250614b57565b600085600081518110613f6557613f65615ab7565b60200260200101519050600886600181518110613f8457613f84615ab7565b6020026020010151901b81179050601086600281518110613fa757613fa7615ab7565b6020026020010151901b81179050601886600381518110613fca57613fca615ab7565b6020026020010151901b81179050602086600481518110613fed57613fed615ab7565b6020026020010151901b8117905060288660058151811061401057614010615ab7565b6020026020010151901b8117905060308660068151811061403357614033615ab7565b6020908102919091018101516000998a52600c90915260409889902060509490941b60489590951b9590981b60389690961b97901b179590951792909217171790915550565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6140d6848484613588565b6140e284848484614b8a565b6129d25760405162461bcd60e51b8152600401610d7f906156cf565b606060398054610c9490615a11565b6060816141315750506040805180820190915260018152600360fc1b602082015290565b8160005b811561415b578061414581615a46565b91506141549050600a836158a0565b9150614135565b6000816001600160401b0381111561417557614175615acd565b6040519080825280601f01601f19166020018201604052801561419f576020820181803683370190505b5090505b8415613580576141b46001836159ce565b91506141c1600a86615a61565b6141cc906030615888565b60f81b8183815181106141e1576141e1615ab7565b60200101906001600160f81b031916908160001a905350614203600a866158a0565b94506141a3565b6060828260405160200161421f929190615578565b604051602081830303815290604052905092915050565b606060005b602081108015614269575082816020811061425857614258615ab7565b1a60f81b6001600160f81b03191615155b15614280578061427881615a46565b91505061423b565b6000816001600160401b0381111561429a5761429a615acd565b6040519080825280601f01601f1916602001820160405280156142c4576020820181803683370190505b509050600091505b6020821080156142fa57508382602081106142e9576142e9615ab7565b1a60f81b6001600160f81b03191615155b1561255d5783826020811061431157614311615ab7565b1a60f81b81838151811061432757614327615ab7565b60200101906001600160f81b031916908160001a9053508161434881615a46565b9250506142cc565b6001600160a01b0383166143ab576143a681600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6143ce565b816001600160a01b0316836001600160a01b0316146143ce576143ce8382614c97565b6001600160a01b0382166143e557610eb081614d34565b826001600160a01b0316826001600160a01b031614610eb057610eb08282614de3565b6040805160078082526101008201909252606091600091906020820160e08036833701905050905060005b60078110156145e65773ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a601d856007811061448357614483615ab7565b0154600f866007811061449857614498615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b1580156144d657600080fd5b505af41580156144ea573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261451291908101906152d5565b8661451e856001615888565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614567929160040161560b565b60206040518083038186803b15801561457f57600080fd5b505af4158015614593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145b7919061543b565b8282815181106145c9576145c9615ab7565b6020908102919091010152806145de81615a46565b915050614433565b506145f081610eb5565b15610c4e57600073ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a602454600f60006007811061464257614642615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b15801561468057600080fd5b505af4158015614694573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526146bc91908101906152d5565b60408051602081018990520160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b1682526146ff929160040161560b565b60206040518083038186803b15801561471757600080fd5b505af415801561472b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061474f919061543b565b905060005b600581101561478d578183828151811061477057614770615ab7565b60209081029190910101528061478581615a46565b915050614754565b50816005815181106147a1576147a1615ab7565b602002602001015160096147b59190615888565b826004815181106147c8576147c8615ab7565b6020026020010181815250506000826006815181106147e9576147e9615ab7565b6020026020010181815250505092915050565b6040805160078082526101008201909252606091600091906020820160e08036833701905050905060005b60048110156149c75773ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a602554600f866007811061487a5761487a615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b1580156148b857600080fd5b505af41580156148cc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526148f491908101906152d5565b876148ff85896159af565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614948929160040161560b565b60206040518083038186803b15801561496057600080fd5b505af4158015614974573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614998919061543b565b8282815181106149aa576149aa615ab7565b6020908102919091010152806149bf81615a46565b915050614827565b5073ff99ac97c9a882a815e582b23bb8030f159bc38763b7207e5673ff99ac97c9a882a815e582b23bb8030f159bc387638d4c873a602654600f600460078110614a1357614a13615ab7565b01546040516001600160e01b031960e085901b1681526004810192909252602482015260440160006040518083038186803b158015614a5157600080fd5b505af4158015614a65573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614a8d91908101906152d5565b86614a996004886159af565b60408051602081019390935282015260600160408051601f198184030181529082905280516020909101206001600160e01b031960e085901b168252614ae2929160040161560b565b60206040518083038186803b158015614afa57600080fd5b505af4158015614b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b32919061543b565b81600481518110614b4557614b45615ab7565b60209081029190910101529392505050565b614b618383614e27565b614b6e6000848484614b8a565b610eb05760405162461bcd60e51b8152600401610d7f906156cf565b60006001600160a01b0384163b15614c8c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614bce9033908990889088906004016155bb565b602060405180830381600087803b158015614be857600080fd5b505af1925050508015614c18575060408051601f3d908101601f19168201909252614c1591810190615471565b60015b614c72573d808015614c46576040519150601f19603f3d011682016040523d82523d6000602084013e614c4b565b606091505b508051614c6a5760405162461bcd60e51b8152600401610d7f906156cf565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613580565b506001949350505050565b60006001614ca484612022565b614cae91906159ce565b600083815260076020526040902054909150808214614d01576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090614d46906001906159ce565b60008381526009602052604081205460088054939450909284908110614d6e57614d6e615ab7565b906000526020600020015490508060088381548110614d8f57614d8f615ab7565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614dc757614dc7615aa1565b6001900381819060005260206000200160009055905550505050565b6000614dee83612022565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216614e7d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d7f565b614e8681613433565b15614ed25760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610d7f565b614ede60008383614350565b6001600160a01b0382166000908152600360205260408120805460019290614f07908490615888565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020615b0f833981519152908290a45050565b60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054614fb990615a11565b90600052602060002090601f016020900481019282614fdb5760008555615021565b82601f10614ff457805160ff1916838001178555615021565b82800160010185558215615021579182015b82811115615021578251825591602001919060010190615006565b5061502d929150615031565b5090565b5b8082111561502d5760008155600101615032565b60006001600160401b0383111561505f5761505f615acd565b615072601f8401601f1916602001615835565b905082815283838301111561508657600080fd5b828260208301376000602084830101529392505050565b600082601f8301126150ae57600080fd5b813560206150c36150be83615865565b615835565b80838252828201915082860187848660051b89010111156150e357600080fd5b60005b85811015615102578135845292840192908401906001016150e6565b5090979650505050505050565b60006020828403121561512157600080fd5b813561255d81615ae3565b60006020828403121561513e57600080fd5b815161255d81615ae3565b6000806040838503121561515c57600080fd5b823561516781615ae3565b9150602083013561517781615ae3565b809150509250929050565b60008060006060848603121561519757600080fd5b83356151a281615ae3565b925060208401356151b281615ae3565b929592945050506040919091013590565b600080600080608085870312156151d957600080fd5b84356151e481615ae3565b935060208501356151f481615ae3565b92506040850135915060608501356001600160401b0381111561521657600080fd5b8501601f8101871361522757600080fd5b61523687823560208401615046565b91505092959194509250565b6000806040838503121561525557600080fd5b823561526081615ae3565b91506020830135801515811461517757600080fd5b6000806040838503121561528857600080fd5b823561529381615ae3565b946020939093013593505050565b6000602082840312156152b357600080fd5b81356001600160401b038111156152c957600080fd5b6135808482850161509d565b600060208083850312156152e857600080fd5b82516001600160401b038111156152fe57600080fd5b8301601f8101851361530f57600080fd5b805161531d6150be82615865565b80828252848201915084840188868560051b870101111561533d57600080fd5b600094505b83851015615360578051835260019490940193918501918501615342565b50979650505050505050565b6000806040838503121561537f57600080fd5b82356001600160401b038082111561539657600080fd5b6153a28683870161509d565b935060208501359150808211156153b857600080fd5b506153c58582860161509d565b9150509250929050565b6000806000606084860312156153e457600080fd5b83356001600160401b03808211156153fb57600080fd5b6154078783880161509d565b9450602086013591508082111561541d57600080fd5b5061542a8682870161509d565b925050604084013590509250925092565b60006020828403121561544d57600080fd5b5051919050565b60006020828403121561546657600080fd5b813561255d81615af8565b60006020828403121561548357600080fd5b815161255d81615af8565b6000602082840312156154a057600080fd5b81356001600160401b038111156154b657600080fd5b8201601f810184136154c757600080fd5b61358084823560208401615046565b6000602082840312156154e857600080fd5b5035919050565b6000806040838503121561550257600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561554157815187529582019590820190600101615525565b509495945050505050565b600081518084526155648160208601602086016159e5565b601f01601f19169290920160200192915050565b6000835161558a8184602088016159e5565b83519083019061559e8183602088016159e5565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906155ee9083018461554c565b9695505050505050565b60208152600061255d6020830184615511565b604080825283519082018190526000906020906060840190828701845b8281101561564457815184529284019290840190600101615628565b50505092019290925292915050565b60a08152600061566660a0830188615511565b90508560208301528460408301528360608301528260808301529695505050505050565b60208152600061255d602083018461554c565b6020808252601890820152774672656520636c61696d206973206e6f742061637469766560401b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601b908201527a596f752063616e20627579206d6178696d756d20313020626f747360281b604082015260600190565b60208082526023908201527f45746865722076616c75652073656e742069732062656c6f772074686520707260408201526269636560e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b9283526020830191909152604082015260600190565b604051601f8201601f191681016001600160401b038111828210171561585d5761585d615acd565b604052919050565b60006001600160401b0382111561587e5761587e615acd565b5060051b60200190565b6000821982111561589b5761589b615a75565b500190565b6000826158af576158af615a8b565b500490565b600181815b808511156158ef5781600019048211156158d5576158d5615a75565b808516156158e257918102915b93841c93908002906158b9565b509250929050565b600061255d838361590e565b600061255d60ff8416835b60008261591d57506001610c4e565b8161592a57506000610c4e565b8160018114615940576002811461594a57615966565b6001915050610c4e565b60ff84111561595b5761595b615a75565b50506001821b610c4e565b5060208310610133831016604e8410600b8410161715615989575081810a610c4e565b61599383836158b4565b80600019048211156159a7576159a7615a75565b029392505050565b60008160001904831182151516156159c9576159c9615a75565b500290565b6000828210156159e0576159e0615a75565b500390565b60005b83811015615a005781810151838201526020016159e8565b838111156129d25750506000910152565b600181811c90821680615a2557607f821691505b602082108114156110fe57634e487b7160e01b600052602260045260246000fd5b6000600019821415615a5a57615a5a615a75565b5060010190565b600082615a7057615a70615a8b565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461339e57600080fd5b6001600160e01b03198116811461339e57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122071160c52e04c58f9c033e70dcca0c8fbfe5ed3eec8cb53f6c7421a31aeda777564736f6c63430008070033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.