ETH Price: $1,972.50 (-4.23%)

Contract

0x42e0836fC7410893Da8CfDc39CA8add0FE166848
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...231356152025-08-14 0:08:59204 days ago1755130139IN
Homesick: H.H Token
0 ETH0.000200933.38051338
Set Approval For...219498992025-03-01 5:22:47370 days ago1740806567IN
Homesick: H.H Token
0 ETH0.000043430.7307498
Set Approval For...212179082024-11-18 23:31:47472 days ago1731972707IN
Homesick: H.H Token
0 ETH0.000469112.5
Set Approval For...191792742024-02-07 22:25:11757 days ago1707344711IN
Homesick: H.H Token
0 ETH0.0017775329.904746
Safe Transfer Fr...190512002024-01-20 22:57:11775 days ago1705791431IN
Homesick: H.H Token
0 ETH0.000876611.52402624
Safe Transfer Fr...190150372024-01-15 21:42:11780 days ago1705354931IN
Homesick: H.H Token
0 ETH0.0024859826.57471653
Safe Transfer Fr...190150352024-01-15 21:41:47780 days ago1705354907IN
Homesick: H.H Token
0 ETH0.0027137525.63067614
Set Approval For...185265592023-11-08 10:11:35849 days ago1699438295IN
Homesick: H.H Token
0 ETH0.0014203323.8664088
Set Approval For...184700222023-10-31 12:10:47857 days ago1698754247IN
Homesick: H.H Token
0 ETH0.0008339822.22296806
Safe Transfer Fr...184695202023-10-31 10:29:23857 days ago1698748163IN
Homesick: H.H Token
0 ETH0.0009617618.57044531
Safe Transfer Fr...183728772023-10-17 21:49:11870 days ago1697579351IN
Homesick: H.H Token
0 ETH0.000566868.47745235
Safe Transfer Fr...183728692023-10-17 21:47:35870 days ago1697579255IN
Homesick: H.H Token
0 ETH0.000748758.43397172
Safe Transfer Fr...183728662023-10-17 21:46:59870 days ago1697579219IN
Homesick: H.H Token
0 ETH0.000733527.86281559
Set Approval For...182874482023-10-05 23:00:35882 days ago1696546835IN
Homesick: H.H Token
0 ETH0.000224385.97908209
Set Approval For...182874402023-10-05 22:58:59882 days ago1696546739IN
Homesick: H.H Token
0 ETH0.000355825.98624502
Set Approval For...181291022023-09-13 18:15:47904 days ago1694628947IN
Homesick: H.H Token
0 ETH0.0015819126.61358507
Set Approval For...181285432023-09-13 16:22:47905 days ago1694622167IN
Homesick: H.H Token
0 ETH0.0008571614.42061147
Set Approval For...180963742023-09-09 4:11:47909 days ago1694232707IN
Homesick: H.H Token
0 ETH0.000360129.59613266
Set Approval For...178702802023-08-08 12:43:47941 days ago1691498627IN
Homesick: H.H Token
0 ETH0.0013112622.06038891
Set Approval For...175688742023-06-27 6:16:11983 days ago1687846571IN
Homesick: H.H Token
0 ETH0.0006851111.52617761
Set Approval For...175082902023-06-18 17:57:11991 days ago1687111031IN
Homesick: H.H Token
0 ETH0.0009152815.39850683
Withdraw171752402023-05-02 19:45:111038 days ago1683056711IN
Homesick: H.H Token
0 ETH0.0077560394.19633361
Start Score Accu...170611142023-04-16 18:08:111054 days ago1681668491IN
Homesick: H.H Token
0 ETH0.003579124.63081861
Mint HOME Token170610922023-04-16 18:03:471054 days ago1681668227IN
Homesick: H.H Token
0 ETH0.0045007324.07391989
Start Score Accu...170418932023-04-14 0:25:591057 days ago1681431959IN
Homesick: H.H Token
0 ETH0.00331723.14565862
View all transactions

Latest 9 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer171752402023-05-02 19:45:111038 days ago1683056711
Homesick: H.H Token
0.12 ETH
Transfer164192302023-01-16 12:04:471145 days ago1673870687
Homesick: H.H Token
0.52 ETH
Transfer163583862023-01-08 0:07:591153 days ago1673136479
Homesick: H.H Token
0.28 ETH
Transfer163324712023-01-04 9:16:351157 days ago1672823795
Homesick: H.H Token
0.16 ETH
Transfer163057002022-12-31 15:40:471161 days ago1672501247
Homesick: H.H Token
0.28 ETH
Transfer162935582022-12-29 23:00:111162 days ago1672354811
Homesick: H.H Token
0.24 ETH
Transfer162623182022-12-25 14:20:471167 days ago1671978047
Homesick: H.H Token
0.56 ETH
Transfer162427082022-12-22 20:43:111169 days ago1671741791
Homesick: H.H Token
0.76 ETH
Transfer162319352022-12-21 8:38:471171 days ago1671611927
Homesick: H.H Token
5.76 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Homesick

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : Homesick.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @creator: mhxalt.eth
/// @author: seesharp.eth

import "./contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";

import "operator-filter-registry/src/DefaultOperatorFilterer.sol";

interface ITerraformer {
    function mint(uint256 tokenID1, uint256 tokenID2, uint256 tokenID3, address to_mint) external returns (uint32);
    function burn(uint256 tokenID) external returns (uint32[3] memory);
    function setHOMETokensFinished() external;
}

contract Homesick is ERC721A, DefaultOperatorFilterer, Ownable {
    using Address for address;

    event HomeTokenFound(uint256 indexed tokenId, address indexed addr);
    event ScoreAccumulationStarted(address indexed addr, uint256 tokenID1, uint256 tokenID2, uint256 tokenID3);

    address public terraformerAddr;

    string public baseURI;
    string public homeBaseURI;
    string public specimenExtension = ".png";
    string public homeExtension = ".png";
    string public homeAnimationExtension = ".mp4";
    uint256 constant public maxSupply = 999; // HOME tokens are not in this, they will be minted by burning one token so supply will remain static
    uint256 public mintedSupply = 0;
    uint256 public remainingAirDropSupply = 78;

    uint256 constant public mintPrice = 40e15;

    uint256 public mintPublicActiveTs = 0;

    struct Metadata {
        uint8 specimen_type;
        uint8 is_locked;
        uint16 potentia;

        uint16 original_token_index;
        
        int32 creation_date;
        uint32 seed;
    }
    struct HomeMetadata {
        uint16 original_token_index;
        uint16 token_order;
        
        uint32 creation_date;
        uint32 exoshellSeed;
        uint32 sonicSeed;
        uint32 self_creation_time;
    }
    mapping(uint256 => Metadata) public tokenMetadata; // tokenID => Metadata
    mapping(uint256 => HomeMetadata) public homeTokenMetadata; // tokenID => Metadata
    mapping(uint256 => uint8) public isHomeToken; // tokenID => 1 if home, 0 otherwise

    uint256 public scoreAccumulationStartTs = 0;
    struct WalletInfo {
        uint32 accumulation_start_ts;
        uint32 terraformerID;

        uint64 total_potentia;

        uint32 score_change_ts;
        uint64 score_change_tm_accumulated_score;
    }
    mapping(address => WalletInfo) public walletInfo;
    uint64 constant public homeMintScoreRequirement = /* getPlayerScoreForPotentia(30) */ 100 * 60 * 60 * 24 * 30; // NOTE: getPlayerScoreForPotentia(30) must be 100!!
    uint256 public remainingHomeTokens = 91;
    uint256 public homeTokenEndTs = 0;
    uint256 private currentHomeTokenIndex = 0;

    uint32 constant private specimenTypeCount = 23;
    // NOTE: min is inclusive and max (minPotentiaPerType + potentiaDiff) is NOT inclusive!!
    uint8[specimenTypeCount] private minPotentiaPerType = [20,30,60,20,70,30,10,40,10,20,30,50,70,70,50,40,80,60,40,80,70,10,30];
    uint8 private potentiaDiff = 10;
    int32[specimenTypeCount] private specimenCreationDatePerType = [int32(-1567953989),int32(-1258123589),int32(997258411),int32(-1097426789),int32(21798811),int32(947056411),int32(332662411),int32(-848843647),int32(755075611),int32(1045466011),int32(2079983611),int32(567288607),int32(35817394),int32(1781409545),int32(1835903611),int32(171321211),int32(379113211),int32(1654460011),int32(1541448031),int32(641934031),int32(899825400),int32(197582431),int32(804672811)];
    uint16[specimenTypeCount] private specimenSeedStarts = [1055,3847,3944,1289,1939,3135,2305,3868,1944,3466,2044,2104,3566,965,3861,841,3433,744,3771,1376,2108,1874,1506];
    // NOTE: biggest value of this array should be (specimenTypeCount - 1)
    uint8[maxSupply] private typeOfIndex = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22];
    string[specimenTypeCount] private specimenTypeNames = [unicode"ÆC", unicode"ISÙ", unicode"ŮRY", unicode"IT§I", unicode"ŤIBA", unicode"CØA", unicode"ØSIA", unicode"ŮNA", unicode"SØA", unicode"XØN", unicode"NAĐ", unicode"GŁEA", unicode"ØRIA", unicode"ŮDIA", unicode"XφM", unicode"ØTRI", unicode"ZA∀", unicode"MÆ", unicode"ZÆ", unicode"LØM", unicode"HXM", unicode"ICª", unicode"EŁI"];

    constructor() ERC721A("Homesick", "H.H") {}

    bytes16 private constant __SYMBOLS = "0123456789abcdef";
    function toStringDecimal(uint256 value, uint256 decimal_point_pos) 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 = 1;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            if (digits == decimal_point_pos) {
                buffer[digits] = '.';
                digits -= 1;
            }
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }
    function toString(uint256 value, uint256 length) internal pure returns (string memory) {
        unchecked {
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                length--;
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), __SYMBOLS))
                }
                value /= 10;
                if (length == 0) break;
            }
            require(value == 0, "Strings: length insufficient");
            return buffer;
        }
    }
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        if (isHomeToken[tokenId] == 0) {
            uint8 sign = 32; // ' '
            uint32 creation_date;
            if (tokenMetadata[tokenId].creation_date < 0) {
                sign = 45; // '-'
                creation_date = uint32(int32(-1) * tokenMetadata[tokenId].creation_date);
            } else {
                creation_date = uint32(tokenMetadata[tokenId].creation_date);
            }

            if (tokenMetadata[tokenId].is_locked == 1 && remainingHomeTokens != 0) {
                bytes memory metadata;
                {
                    metadata = abi.encodePacked(
                        '{"description":"With the use of 3D and AI mediums, HOXID has carefully curated 999 unique pieces from the latent space, creating a beautiful collection of specimens.","image":"',
                        baseURI,
                        Strings.toString(tokenMetadata[tokenId].original_token_index),
                        specimenExtension,
                        '","name":"Specimen #',
                        toString(tokenId, 4),
                        '","attributes":[{"trait_type":"Type Name","value":"',
                        specimenTypeNames[tokenMetadata[tokenId].specimen_type],
                        '"},{"trait_type":"Seed","value":"'
                    );
                }
                {
                    metadata = abi.encodePacked(
                        metadata,
                        Strings.toHexString(tokenMetadata[tokenId].seed, 4),
                        '"},{"trait_type":"Locked","value":"',
                        'Locked',
                        '"},{"trait_type":"Potentia","value":',
                        toStringDecimal(tokenMetadata[tokenId].potentia, 1),
                        '},{"display_type":"date","trait_type":"Creation Date","value":',
                        sign,
                        Strings.toString(creation_date),
                        '}]}'
                    );
                }
                return string(
                    abi.encodePacked(
                        "data:application/json;base64,",
                        Base64.encode(metadata)
                    )    
                );
            } else {
                bytes memory metadata;
                {
                    metadata = abi.encodePacked(
                        '{"description":"With the use of 3D and AI mediums, HOXID has carefully curated 999 unique pieces from the latent space, creating a beautiful collection of specimens.","image":"',
                        baseURI,
                        Strings.toString(tokenMetadata[tokenId].original_token_index),
                        specimenExtension,
                        '","name":"Specimen #',
                        toString(tokenId, 4),
                        '","attributes":[{"trait_type":"Type Name","value":"',
                        specimenTypeNames[tokenMetadata[tokenId].specimen_type],
                        '"},{"trait_type":"Seed","value":"'
                    );
                }
                {
                    metadata = abi.encodePacked(
                        metadata,
                        Strings.toHexString(tokenMetadata[tokenId].seed, 4),
                        '"},{"trait_type":"Potentia","value":',
                        toStringDecimal(tokenMetadata[tokenId].potentia, 1),
                        '},{"display_type":"date","trait_type":"Creation Date","value":',
                        sign,
                        Strings.toString(creation_date),
                        '}]}'
                    );
                }
                return string(
                    abi.encodePacked(
                        "data:application/json;base64,",
                        Base64.encode(metadata)
                    )    
                );
            }
        } else {
            bytes memory metadata;
            {
                bytes memory URI = abi.encodePacked(homeBaseURI, Strings.toString(homeTokenMetadata[tokenId].original_token_index));
                metadata = abi.encodePacked(
                    '{"description":"Home  \\n*The place where you live or feel you belong.*  \\n  \\nThis 1/1 special piece is part of the HOMESICK collection, with its unique generative sound design.","image":"',
                    URI,
                    homeExtension,
                    '","animation_url":"',
                    URI,
                    homeAnimationExtension
                );
            }
            {
                metadata = abi.encodePacked(
                    metadata,
                    '","name":"HOME #',
                    toString(homeTokenMetadata[tokenId].token_order, 2),
                    '","attributes":[{"trait_type":"Exoshell Seed","value":"',
                    Strings.toHexString(homeTokenMetadata[tokenId].exoshellSeed, 4),
                    '"},{"trait_type":"Sonic Seed","value":"'
                );
            }
            {
                metadata = abi.encodePacked(
                    metadata,
                    Strings.toHexString(homeTokenMetadata[tokenId].sonicSeed, 4),
                    '"},{"trait_type":"Type Name","value":"HOME"},{"trait_type":"Self Creation Time (Hours)","value":',
                    Strings.toString(homeTokenMetadata[tokenId].self_creation_time / 60 / 60),
                    '},{"display_type":"date","trait_type":"Creation Date","value":',
                    Strings.toString(homeTokenMetadata[tokenId].creation_date),
                    '}]}'
                );
            }
            return string(
                abi.encodePacked(
                    "data:application/json;base64,",
                    Base64.encode(metadata)
                )    
            );
        }
    }

    mapping(uint => uint) private _availableTokens;
    // Implements https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle. Modified from ERC721R
    function getRandomUnusedTokenIndex(uint256 randomIndex, uint256 remainingTokenCount)
        internal
        returns (uint256)
    {
        uint256 valAtIndex = _availableTokens[randomIndex];
        uint256 result;
        if (valAtIndex == 0) {
            // This means the index itself is still an available token
            result = randomIndex;
        } else {
            // This means the index itself is not an available token, but the val at that index is.
            result = valAtIndex;
        }

        uint256 lastIndex = remainingTokenCount - 1;
        uint256 lastValInArray = _availableTokens[lastIndex];
        
        if (randomIndex != lastIndex) {
            // Replace the value at indexToUse, now that it's been used.
            // Replace it with the data from the last index in the array, since we are going to decrease the array size afterwards.
            if (lastValInArray == 0) {
                // This means the index itself is still an available token
                _availableTokens[randomIndex] = lastIndex;
            } else {
                // This means the index itself is not an available token, but the val at that index is.
                _availableTokens[randomIndex] = lastValInArray;
            }
        }
        if (lastValInArray != 0) {
            // Gas refund courtsey of @dievardump
            delete _availableTokens[lastIndex];
        }
        
        return result;
    }
    function getTypeOfIndex(uint256 randomIndex)
        internal view
        returns (uint8)
    {
        return typeOfIndex[randomIndex];
    }

    mapping(uint => uint) private _availableHomeTokens;
    // Implements https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle. Modified from ERC721R
    function getRandomUnusedHomeTokenIndex(uint256 randomIndex, uint256 remainingTokenCount)
        internal
        returns (uint256)
    {
        uint256 valAtIndex = _availableHomeTokens[randomIndex];
        uint256 result;
        if (valAtIndex == 0) {
            // This means the index itself is still an available token
            result = randomIndex;
        } else {
            // This means the index itself is not an available token, but the val at that index is.
            result = valAtIndex;
        }

        uint256 lastIndex = remainingTokenCount - 1;
        uint256 lastValInArray = _availableHomeTokens[lastIndex];
        
        if (randomIndex != lastIndex) {
            // Replace the value at indexToUse, now that it's been used.
            // Replace it with the data from the last index in the array, since we are going to decrease the array size afterwards.
            if (lastValInArray == 0) {
                // This means the index itself is still an available token
                _availableHomeTokens[randomIndex] = lastIndex;
            } else {
                // This means the index itself is not an available token, but the val at that index is.
                _availableHomeTokens[randomIndex] = lastValInArray;
            }
        }
        if (lastValInArray != 0) {
            // Gas refund courtsey of @dievardump
            delete _availableHomeTokens[lastIndex];
        }
        
        return result;
    }
    function mint(uint256 _mintAmount) public payable {
        require(!msg.sender.isContract(), "Should not be called from a contract!!");

        require(mintPublicActiveTs != 0, "public mint date is not set");
        require(block.timestamp >= mintPublicActiveTs, "wait for public mint time");

        require(_mintAmount > 0, "need to mint at least 1 NFT");
        require(_mintAmount < 11, "max mint per tx is 10 NFTs");
        require((mintedSupply + remainingAirDropSupply + _mintAmount) <= maxSupply, "max NFT limit exceeded");

        require(msg.value >= _mintAmount * mintPrice, "insufficient funds");

        uint64 total_potentia = 0;
        uint256 end = mintedSupply + _mintAmount;
        for (uint256 i = mintedSupply; i < end; i++) {
            uint256 remainingTokenCount = maxSupply - i;

            uint256 random_seed = uint256(keccak256(abi.encodePacked(block.difficulty, block.timestamp, i)));
            uint32 _random_index = uint32((random_seed & 0xFFFF) % remainingTokenCount);
            uint256 random_unused_index = getRandomUnusedTokenIndex(_random_index, remainingTokenCount);
            uint8 specimen_type = getTypeOfIndex(random_unused_index);
            
            uint16 potentia = uint16(((random_seed >> 16) & 0xFFFF) % (potentiaDiff));
            potentia += uint16(minPotentiaPerType[specimen_type]);

            int32 creation_date = specimenCreationDatePerType[specimen_type] + int32(int256(uint256((random_seed >> 32) & (0xFFFFFFFF)) % 86400) - int256(43200));
            uint32 seed = uint32(((random_seed >> 64) & 0xFFFFF) | (uint32(specimenSeedStarts[specimen_type]) << 20));

            Metadata memory _localMetadata = Metadata(specimen_type, 0, potentia, uint16(random_unused_index), creation_date, seed);
            tokenMetadata[i] = _localMetadata;
            total_potentia += potentia;
        }
        mintedSupply += _mintAmount;

        WalletInfo memory localWalletTo = walletInfo[msg.sender];
        if (localWalletTo.accumulation_start_ts != 0) {
            uint64 toCurrentScore = getPlayerAccumulatedScore(localWalletTo);
            localWalletTo.score_change_ts = uint32(block.timestamp);
            localWalletTo.score_change_tm_accumulated_score = toCurrentScore;
        }
        localWalletTo.total_potentia += total_potentia;
        walletInfo[msg.sender] = localWalletTo;

        _safeMint(msg.sender, _mintAmount);
    }

    /**
    * SCORE RELATED FUNCTIONS
    */
    function startScoreAccumulation() external onlyOwner {
        scoreAccumulationStartTs = uint32(block.timestamp);
    }
    function startScoreAccumulation(uint256 tokenID1, uint256 tokenID2, uint256 tokenID3) public {
        require(scoreAccumulationStartTs != 0, "Score accumulation hasn't started yet");

        require(tokenID1 != tokenID2, "All tokens must be unique");
        require(tokenID2 != tokenID3, "All tokens must be unique");
        require(tokenID1 != tokenID3, "All tokens must be unique");

        require(ownerOf(tokenID1) == msg.sender, "Not the owner of locked tokens");
        require(ownerOf(tokenID2) == msg.sender, "Not the owner of locked tokens");
        require(ownerOf(tokenID3) == msg.sender, "Not the owner of locked tokens");

        // HOME tokens cannot be locked
        require(isHomeToken[tokenID1] == 0, "Cannot lock HOME tokens");
        require(isHomeToken[tokenID2] == 0, "Cannot lock HOME tokens");
        require(isHomeToken[tokenID3] == 0, "Cannot lock HOME tokens");

        WalletInfo memory localWalletInfo = walletInfo[msg.sender];
        require(localWalletInfo.accumulation_start_ts == 0, "Already started");
        // We don't need to check if the tokens have already been locked since a wallet cannot have multiple terraformers

        uint32 terraformerID = ITerraformer(terraformerAddr).mint(tokenID1, tokenID2, tokenID3, msg.sender);

        localWalletInfo.accumulation_start_ts = uint32(block.timestamp);
        localWalletInfo.terraformerID = terraformerID;
        walletInfo[msg.sender] = localWalletInfo;

        tokenMetadata[tokenID1].is_locked = 1;
        tokenMetadata[tokenID2].is_locked = 1;
        tokenMetadata[tokenID3].is_locked = 1;

        emit ScoreAccumulationStarted(msg.sender, tokenID1, tokenID2, tokenID3);
    }
    function sqrt(uint x) internal pure returns (uint y) {
        uint z = (x + 1) / 2;
        y = x;
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
    }
    function getPlayerScoreForPotentia(uint256 total_potentia) public pure returns (uint64) {
        total_potentia -= 20;
        total_potentia *= 1000000000000000; // 15 0es (one 0 less because potentia is fixed point with one decimal)
        return uint64(sqrt(sqrt(sqrt(total_potentia))));
    }
    function getPlayerAccumulatedScore(WalletInfo memory info) internal view returns (uint64) {
        if (scoreAccumulationStartTs == 0) { return 0; }
        if (info.accumulation_start_ts == 0) { return 0; } // user hasn't started to accumulate points
        
        uint256 check_ts = block.timestamp;
        if (remainingHomeTokens == 0) { 
            check_ts = homeTokenEndTs;
        }
        
        if (info.score_change_ts != 0) {
            return uint64(check_ts - info.score_change_ts) * getPlayerScoreForPotentia(info.total_potentia) + info.score_change_tm_accumulated_score;
        } else {
            return uint64(check_ts - info.accumulation_start_ts) * getPlayerScoreForPotentia(info.total_potentia);
        }
    }
    function getPlayerAccumulatedScore(address _addr) public view returns (uint64) {
        if (scoreAccumulationStartTs == 0) { return 0; }
        if (walletInfo[_addr].accumulation_start_ts == 0) { return 0; } // user hasn't started to accumulate points
        
        uint256 check_ts = block.timestamp;
        if (remainingHomeTokens == 0) { 
            check_ts = homeTokenEndTs;
        }
        
        if (walletInfo[_addr].score_change_ts != 0) {
            return uint64(check_ts - walletInfo[_addr].score_change_ts) * getPlayerScoreForPotentia(walletInfo[_addr].total_potentia) + walletInfo[_addr].score_change_tm_accumulated_score;
        } else {
            return uint64(check_ts - walletInfo[_addr].accumulation_start_ts) * getPlayerScoreForPotentia(walletInfo[_addr].total_potentia);
        }
    }
    function updateWalletInfoRemoveToken(address from, uint256 tokenID) internal {
        WalletInfo memory localWalletFrom = walletInfo[from];
        Metadata memory localMetadata = tokenMetadata[tokenID];

        if (localMetadata.is_locked == 1) { // transfer of locked token, burn ticket and remove score
            uint32 terraformerID = localWalletFrom.terraformerID;
            uint32[3] memory tokenIDs = ITerraformer(terraformerAddr).burn(terraformerID);

            tokenMetadata[tokenIDs[0]].is_locked = 0;
            tokenMetadata[tokenIDs[1]].is_locked = 0;
            tokenMetadata[tokenIDs[2]].is_locked = 0;

            localWalletFrom.accumulation_start_ts = 0;
            localWalletFrom.terraformerID = 0;
            localWalletFrom.score_change_ts = 0;
            localWalletFrom.score_change_tm_accumulated_score = 0;
            localWalletFrom.total_potentia -= localMetadata.potentia;
        } else {
            if (localWalletFrom.accumulation_start_ts != 0) {
                uint64 fromCurrentScore = getPlayerAccumulatedScore(localWalletFrom);
                localWalletFrom.score_change_ts = uint32(block.timestamp);
                localWalletFrom.score_change_tm_accumulated_score = fromCurrentScore;
            }
            localWalletFrom.total_potentia -= localMetadata.potentia;
        }
        walletInfo[from] = localWalletFrom;
    }
    function _afterTokenTransfers(
        address from, // this is 0x0 only when this is mint
        address to,
        uint256 startTokenId,
        uint256 // this is always 1 if its not a mint
    ) internal virtual override {
        if (from == address(0x0)) return; // mint calculates this itself
        if (remainingHomeTokens == 0) return; // HOME minting ended

        // HOME tokens does not affect anything
        if (isHomeToken[startTokenId] != 0) return;
        
        updateWalletInfoRemoveToken(from, startTokenId);
        Metadata memory localMetadata = tokenMetadata[startTokenId];

        if (to != address(0x0)) {
            WalletInfo memory localWalletTo = walletInfo[to];
            if (localWalletTo.accumulation_start_ts != 0) {
                uint64 toCurrentScore = getPlayerAccumulatedScore(localWalletTo);
                localWalletTo.score_change_ts = uint32(block.timestamp);
                localWalletTo.score_change_tm_accumulated_score = toCurrentScore;
            }
            localWalletTo.total_potentia += localMetadata.potentia;
            walletInfo[to] = localWalletTo;
        }
    }


    function mintHOMEToken(uint256 _tokenID) public {
        require(msg.sender == ownerOf(_tokenID), "Not your token!");
        require(remainingHomeTokens > 0, "All ultimate planets have been found");
        uint64 accumulatedScore = getPlayerAccumulatedScore(msg.sender);
        require(accumulatedScore > homeMintScoreRequirement, "Not enough accumulated score");

        require(isHomeToken[_tokenID] == 0, "Cannot burn HOME tokens");
        require(tokenMetadata[_tokenID].is_locked == 1, "Need to supply locked token to mint HOME token");

        uint256 random_seed = uint256(keccak256(abi.encodePacked(block.difficulty, block.timestamp, mintedSupply + currentHomeTokenIndex)));
        uint32 _random_index = uint32((random_seed & 0xFFFF) % remainingHomeTokens);
        uint256 random_unused_index = getRandomUnusedHomeTokenIndex(_random_index, remainingHomeTokens);
        uint32 exoshell_seed = uint32(((random_seed >> 32) & 0xFFFFFFFF));
        uint32 sonic_seed = uint32(((random_seed >> 64) & 0xFFFFFFFF));
        
        HomeMetadata memory _localMetadata = HomeMetadata(uint16(random_unused_index), 
                uint16(currentHomeTokenIndex),
                uint32(block.timestamp), exoshell_seed, sonic_seed, 
                uint32(block.timestamp - walletInfo[msg.sender].accumulation_start_ts));
        homeTokenMetadata[_tokenID] = _localMetadata;
        isHomeToken[_tokenID] = 1;

        // this will automatically reset counters, reduce total score and burn terraformer token
        updateWalletInfoRemoveToken(msg.sender, _tokenID);
        delete tokenMetadata[_tokenID];

        remainingHomeTokens -= 1;
        currentHomeTokenIndex += 1;

        if (remainingHomeTokens == 0) {
            ITerraformer(terraformerAddr).setHOMETokensFinished();
            homeTokenEndTs = block.timestamp;
        }

        emit HomeTokenFound(_tokenID, msg.sender);
    }



    /**
    * ADMIN FUNCTIONS
    */
    function airDrop(address[] memory _targets, uint256[] memory _mintAmounts) external onlyOwner {
        require((_targets.length) == (_mintAmounts.length), "array lengths should match");

        uint256 txMintedAmount = 0;
        uint256 currentIndex = mintedSupply;
        for (uint256 i = 0; i < _targets.length; i++) {
            uint64 total_potentia = 0;

            for (uint256 j = 0; j < _mintAmounts[i]; j++) {
                uint256 remainingTokenCount = maxSupply - (currentIndex);

                uint256 random_seed = uint256(keccak256(abi.encodePacked(block.difficulty, block.timestamp, currentIndex)));
                uint32 _random_index = uint32((random_seed & 0xFFFF) % remainingTokenCount);
                uint256 random_unused_index = getRandomUnusedTokenIndex(_random_index, remainingTokenCount);
                uint8 specimen_type = getTypeOfIndex(random_unused_index);
                
                uint16 potentia = uint16(((random_seed >> 16) & 0xFFFF) % (potentiaDiff));
                potentia += uint16(minPotentiaPerType[specimen_type]);

                int32 creation_date = specimenCreationDatePerType[specimen_type] + int32(int256(uint256((random_seed >> 32) & (0xFFFFFFFF)) % 86400) - int256(43200));
                uint32 seed = uint32(((random_seed >> 64) & 0xFFFFF) | (uint32(specimenSeedStarts[specimen_type]) << 20));

                Metadata memory _localMetadata = Metadata(specimen_type, 0, potentia, uint16(random_unused_index), creation_date, seed);
                tokenMetadata[currentIndex] = _localMetadata;
                total_potentia += potentia;

                currentIndex++;
            }

            txMintedAmount += _mintAmounts[i];
            _safeMint(_targets[i], _mintAmounts[i]);

            WalletInfo memory localWalletTo = walletInfo[_targets[i]];
            if (localWalletTo.accumulation_start_ts != 0) {
                uint64 toCurrentScore = getPlayerAccumulatedScore(localWalletTo);
                localWalletTo.score_change_ts = uint32(block.timestamp);
                localWalletTo.score_change_tm_accumulated_score = toCurrentScore;
            }
            localWalletTo.total_potentia += total_potentia;
            walletInfo[_targets[i]] = localWalletTo;
        }

        require(txMintedAmount <= remainingAirDropSupply, "max NFT limit exceeded");

        remainingAirDropSupply -= txMintedAmount;
        mintedSupply += txMintedAmount;
    }

    function activatePublicMint(uint256 _mintPublicActiveTs) external onlyOwner {
        require(mintPublicActiveTs == 0, "Already activated");
        mintPublicActiveTs = _mintPublicActiveTs;
    }
    function deactivatePublicMint() external onlyOwner {
        mintPublicActiveTs = 0;
    }

    function setTerraformerAddr(address _newterraformerAddr) external onlyOwner {
        terraformerAddr = _newterraformerAddr;
    }

    function setBaseURI(string memory _newBaseURI) external onlyOwner {
        baseURI = _newBaseURI;
    }

    function setHomeBaseURI(string memory _newHomeBaseURI) external onlyOwner {
        homeBaseURI = _newHomeBaseURI;
    }

    function setSpecimenExtension(string memory _newSpecimenExtension) external onlyOwner {
        specimenExtension = _newSpecimenExtension;
    }
    function setHomeExtension(string memory _newHomeExtension) external onlyOwner {
        homeExtension = _newHomeExtension;
    }
    function setHomeAnimationExtension(string memory _newHomeAnimationExtension) external onlyOwner {
        homeAnimationExtension = _newHomeAnimationExtension;
    }


    /**
     * ROYALTY FUNCTIONS
     */
    uint256 private _royaltyBps;
    address payable private _royaltyRecipient;

    function withdraw() external onlyOwner {
        require(_royaltyRecipient != address(0x0), "Must set royalty recipient");

        (bool os, ) = _royaltyRecipient.call{value: address(this).balance}("");
        require(os);
    }

    function withdrawERC20(address erc20_addr) external onlyOwner {
        require(_royaltyRecipient != address(0x0), "Must set royalty recipient");

        IERC20 erc20_int = IERC20(erc20_addr);
        uint256 balance = erc20_int.balanceOf(address(this));

        bool os = erc20_int.transfer(_royaltyRecipient, balance);
        require(os);
    }
    
    function updateRoyalties(address payable recipient, uint256 bps) external onlyOwner {
        _royaltyRecipient = recipient;
        _royaltyBps = bps;
    }

    bytes4 constant private _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;
    bytes4 constant private _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a;
    bytes4 constant private _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;


    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) {
        return ERC721A.supportsInterface(interfaceId) || interfaceId == _INTERFACE_ID_ROYALTIES_CREATORCORE
            || interfaceId == _INTERFACE_ID_ROYALTIES_EIP2981 || interfaceId == _INTERFACE_ID_ROYALTIES_RARIBLE;
    }

    function getRoyalties(uint256) external view returns (address payable[] memory recipients, uint256[] memory bps) {
        if (_royaltyRecipient != address(0x0)) {
            recipients = new address payable[](1);
            recipients[0] = _royaltyRecipient;
            bps = new uint256[](1);
            bps[0] = _royaltyBps;
        }
        return (recipients, bps);
    }

    function getFeeRecipients(uint256) external view returns (address payable[] memory recipients) {
        if (_royaltyRecipient != address(0x0)) {
            recipients = new address payable[](1);
            recipients[0] = _royaltyRecipient;
        }
        return recipients;
    }

    function getFeeBps(uint256) external view returns (uint[] memory bps) {
        if (_royaltyRecipient != address(0x0)) {
            bps = new uint256[](1);
            bps[0] = _royaltyBps;
        }
        return bps;
    }

    function royaltyInfo(uint256, uint256 value) external view returns (address, uint256) {
        return (_royaltyRecipient, value*_royaltyBps/10000);
    }
    
    receive() external payable {
    }


    /**
     * OPENSEA FILTER STUFF
     */
    function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }
    function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) {
        super.approve(operator, tokenId);
    }
    function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }
    function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
        public
        override
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, data);
    }
}

File 2 of 17 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";

/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 */
abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64 {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        /// @solidity memory-safe-assembly
        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// SPDX-License-Identifier: MIT
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

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

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @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 override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr && curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @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) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        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 = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSender()) revert ApproveToCaller();

        _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 {
        _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 {
        _transfer(from, to, tokenId);
        if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity, _data, true);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(
        address to,
        uint256 quantity,
        bytes memory _data,
        bool safe
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (safe && to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex != end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex != end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev This is equivalent to _burn(tokenId, false)
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        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 TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

File 9 of 17 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";

/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

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;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

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 13 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function unregister(address addr) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

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
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"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":true,"internalType":"address","name":"addr","type":"address"}],"name":"HomeTokenFound","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":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenID1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenID2","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenID3","type":"uint256"}],"name":"ScoreAccumulationStarted","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":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPublicActiveTs","type":"uint256"}],"name":"activatePublicMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_targets","type":"address[]"},{"internalType":"uint256[]","name":"_mintAmounts","type":"uint256[]"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deactivatePublicMint","outputs":[],"stateMutability":"nonpayable","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":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getPlayerAccumulatedScore","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"total_potentia","type":"uint256"}],"name":"getPlayerScoreForPotentia","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"homeAnimationExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"homeBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"homeExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"homeMintScoreRequirement","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"homeTokenEndTs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"homeTokenMetadata","outputs":[{"internalType":"uint16","name":"original_token_index","type":"uint16"},{"internalType":"uint16","name":"token_order","type":"uint16"},{"internalType":"uint32","name":"creation_date","type":"uint32"},{"internalType":"uint32","name":"exoshellSeed","type":"uint32"},{"internalType":"uint32","name":"sonicSeed","type":"uint32"},{"internalType":"uint32","name":"self_creation_time","type":"uint32"}],"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":"","type":"uint256"}],"name":"isHomeToken","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"mintHOMEToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPublicActiveTs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"remainingAirDropSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainingHomeTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","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":"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":[],"name":"scoreAccumulationStartTs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newHomeAnimationExtension","type":"string"}],"name":"setHomeAnimationExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newHomeBaseURI","type":"string"}],"name":"setHomeBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newHomeExtension","type":"string"}],"name":"setHomeExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newSpecimenExtension","type":"string"}],"name":"setSpecimenExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newterraformerAddr","type":"address"}],"name":"setTerraformerAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"specimenExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID1","type":"uint256"},{"internalType":"uint256","name":"tokenID2","type":"uint256"},{"internalType":"uint256","name":"tokenID3","type":"uint256"}],"name":"startScoreAccumulation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startScoreAccumulation","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":[],"name":"terraformerAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenMetadata","outputs":[{"internalType":"uint8","name":"specimen_type","type":"uint8"},{"internalType":"uint8","name":"is_locked","type":"uint8"},{"internalType":"uint16","name":"potentia","type":"uint16"},{"internalType":"uint16","name":"original_token_index","type":"uint16"},{"internalType":"int32","name":"creation_date","type":"int32"},{"internalType":"uint32","name":"seed","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","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":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"updateRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletInfo","outputs":[{"internalType":"uint32","name":"accumulation_start_ts","type":"uint32"},{"internalType":"uint32","name":"terraformerID","type":"uint32"},{"internalType":"uint64","name":"total_potentia","type":"uint64"},{"internalType":"uint32","name":"score_change_ts","type":"uint32"},{"internalType":"uint64","name":"score_change_tm_accumulated_score","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20_addr","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c060405260046080908152632e706e6760e01b60a052600c9062000025908262002b22565b506040805180820190915260048152632e706e6760e01b6020820152600d9062000050908262002b22565b506040805180820190915260048152630b9b5c0d60e21b6020820152600e906200007b908262002b22565b506000600f819055604e60105560118190556015819055605b60179081556018829055601991909155604080516102e0810182526014808252601e60208301819052603c9383018490526060830182905260466080840181905260a08401829052600a60c08501819052602860e08601819052610100860182905261012086019490945261014085018390526032610160860181905261018086018390526101a086018390526101c08601526101e08501849052605061020086018190526102208601969096526102408501939093526102608401949094526102808301939093526102a08201526102c08101919091526200017b91601a9190620027ac565b50601b805460ff1916600a179055604080516102e081018252635d751444198152634afd7144196020820152633b70f4ab91810191909152634169676419606082015263014c9f9b6080820152633872ef1b60a08201526313d4068b60c0820152633298537e1960e0820152632d018a1b610100820152633e508b9b610120820152637bfa07fb6101408201526321d0231f61016082015263022287b2610180820152636a2e27096101a0820152636d6daa7b6101c0820152630a36277b6101e0820152631698cefb61020082015263629d0e6b610220820152635be0a15f61024082015263264322cf6102608201526335a23ef8610280820152630bc6de5f6102a0820152632ff6552b6102c08201526200029c90601c90601762002846565b50604080516102e08101825261041f8152610f076020820152610f689181019190915261050960608201526107936080820152610c3f60a082015261090160c0820152610f1c60e0820152610798610100820152610d8a6101208201526107fc610140820152610838610160820152610dee6101808201526103c56101a0820152610f156101c08201526103496101e0820152610d696102008201526102e8610220820152610ebb61024082015261056061026082015261083c6102808201526107526102a08201526105e26102c08201526200037e90601f906017620028d8565b5060408051617ce081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e08101829052610200810182905261022081018290526102408101829052610260810182905261028081018290526102a081018290526102c081018290526102e08101829052610300810182905261032081018290526103408101829052610360810182905261038081018290526103a081018290526103c081018290526103e08101829052610400810182905261042081018290526104408101829052610460810182905261048081018290526104a081018290526104c081019190915260016104e08201819052610500820181905261052082018190526105408201819052610560820181905261058082018190526105a082018190526105c082018190526105e08201819052610600820181905261062082018190526106408201819052610660820181905261068082018190526106a082018190526106c082018190526106e08201819052610700820181905261072082018190526107408201819052610760820181905261078082018190526107a082018190526107c082018190526107e08201819052610800820181905261082082018190526108408201819052610860820181905261088082018190526108a082018190526108c082018190526108e08201819052610900820181905261092082018190526109408201819052610960820181905261098082018190526109a082018190526109c082015260026109e08201819052610a008201819052610a208201819052610a408201819052610a608201819052610a808201819052610aa08201819052610ac08201819052610ae08201819052610b008201819052610b208201819052610b408201819052610b608201819052610b808201819052610ba08201819052610bc08201819052610be08201819052610c008201819052610c208201819052610c408201819052610c608201819052610c808201819052610ca08201819052610cc08201819052610ce08201819052610d008201819052610d208201819052610d408201819052610d608201819052610d808201819052610da08201819052610dc08201819052610de08201819052610e008201819052610e208201819052610e408201819052610e608201819052610e808201819052610ea08201819052610ec08201819052610ee08201819052610f008201819052610f208201819052610f408201819052610f608201819052610f808201819052610fa08201819052610fc08201819052610fe08201819052611000820181905261102082018190526110408201819052611060820181905261108082018190526110a082018190526110c082018190526110e08201819052611100820152600361112082018190526111408201819052611160820181905261118082018190526111a082018190526111c082018190526111e08201819052611200820181905261122082018190526112408201819052611260820181905261128082018190526112a082018190526112c082018190526112e08201819052611300820181905261132082018190526113408201819052611360820181905261138082018190526113a082018190526113c082018190526113e08201819052611400820181905261142082018190526114408201819052611460820181905261148082018190526114a082018190526114c082018190526114e08201819052611500820181905261152082018190526115408201819052611560820181905261158082018190526115a082018190526115c082018190526115e08201819052611600820181905261162082018190526116408201526004611660820181905261168082018190526116a082018190526116c082018190526116e08201819052611700820181905261172082018190526117408201819052611760820181905261178082018190526117a082018190526117c082018190526117e08201819052611800820181905261182082018190526118408201819052611860820181905261188082018190526118a082018190526118c082018190526118e08201819052611900820181905261192082018190526119408201819052611960820181905261198082018190526119a082018190526119c082018190526119e08201819052611a008201819052611a208201819052611a408201819052611a608201819052611a808201819052611aa08201819052611ac08201819052611ae08201819052611b008201819052611b208201819052611b408201819052611b608201819052611b808201819052611ba08201819052611bc08201819052611be08201819052611c008201819052611c208201819052611c408201819052611c608201819052611c808201819052611ca08201819052611cc08201819052611ce08201819052611d008201819052611d208201819052611d408201819052611d608201819052611d808201819052611da08201819052611dc08201819052611de08201819052611e008201819052611e208201819052611e408201819052611e608201819052611e808201819052611ea08201819052611ec08201819052611ee08201819052611f008201819052611f208201819052611f408201819052611f608201819052611f808201819052611fa08201819052611fc08201819052611fe08201526005612000820181905261202082018190526120408201819052612060820181905261208082018190526120a082018190526120c082018190526120e08201819052612100820181905261212082018190526121408201819052612160820181905261218082018190526121a082018190526121c082018190526121e08201819052612200820181905261222082018190526122408201819052612260820181905261228082018190526122a082018190526122c082018190526122e082018190526123008201819052612320820181905261234082018190526123608201819052612380820190815260056020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a082018190526101c082018190526101e08201819052610200820181905261022082018190526102408201819052610260820152600661028082018190526102a082018190526102c082018190526102e08201819052610300820181905261032082018190526103408201819052610360820181905261038082018190526103a082018190526103c082018190526103e08201819052610400820181905261042082018190526104408201819052610460820181905261048082018190526104a082018190526104c082018190526104e08201819052610500820181905261052082018190526105408201819052610560820181905261058082018190526105a082018190526105c082018190526105e08201819052610600820181905261062082018190526106408201819052610660820181905261068082018190526106a082018190526106c082018190526106e08201819052610700820181905261072082018190526107408201526007610760820181905261078082018190526107a082018190526107c082018190526107e08201819052610800820181905261082082018190526108408201819052610860820181905261088082018190526108a082018190526108c082018190526108e08201819052610900820181905261092082018190526109408201819052610960820181905261098082018190526109a082018190526109c082018190526109e08201819052610a008201526008610a208201819052610a408201819052610a608201819052610a808201819052610aa08201819052610ac08201819052610ae08201819052610b008201819052610b208201819052610b408201819052610b608201819052610b808201819052610ba08201819052610bc08201819052610be08201819052610c008201819052610c208201819052610c408201819052610c608201819052610c808201819052610ca08201819052610cc08201819052610ce08201819052610d008201819052610d208201526009610d408201819052610d608201819052610d808201819052610da08201819052610dc08201819052610de08201819052610e008201819052610e208201819052610e408201819052610e608201819052610e808201819052610ea08201819052610ec08201819052610ee08201819052610f008201819052610f208201819052610f408201819052610f608201819052610f808201819052610fa08201819052610fc08201819052610fe08201819052611000820181905261102082018190526110408201819052611060820181905261108082018190526110a082018190526110c082018190526110e08201819052611100820181905261112082018190526111408201819052611160820181905261118082018190526111a082018190526111c082018190526111e0820181905261120082018190526112208201819052611240820152600a611260820181905261128082018190526112a082018190526112c082018190526112e08201819052611300820181905261132082018190526113408201819052611360820181905261138082018190526113a082018190526113c082018190526113e08201819052611400820181905261142082018190526114408201819052611460820181905261148082018190526114a082018190526114c082018190526114e08201819052611500820181905261152082018190526115408201819052611560820181905261158082018190526115a082018190526115c082018190526115e08201819052611600820181905261162082018190526116408201819052611660820181905261168082018190526116a082018190526116c082018190526116e0820152600b611700820181905261172082018190526117408201819052611760820181905261178082018190526117a082018190526117c082018190526117e08201819052611800820181905261182082018190526118408201819052611860820181905261188082018190526118a082018190526118c082018190526118e08201819052611900820181905261192082018190526119408201819052611960820181905261198082018190526119a082018190526119c082018190526119e08201819052611a008201819052611a208201819052611a408201819052611a608201819052611a80820152600c611aa08201819052611ac08201819052611ae08201819052611b008201819052611b208201819052611b408201819052611b608201819052611b80820152600d611ba08201819052611bc08201819052611be08201819052611c008201819052611c208201819052611c408201819052611c608201819052611c808201819052611ca08201819052611cc08201819052611ce08201819052611d008201819052611d208201819052611d408201819052611d608201819052611d808201819052611da08201819052611dc08201819052611de08201819052611e008201819052611e208201819052611e408201819052611e608201819052611e808201819052611ea08201819052611ec08201819052611ee08201819052611f008201819052611f208201819052611f408201819052611f608201819052611f808201819052611fa08201819052611fc08201819052611fe08201819052612000820181905261202082018190526120408201819052612060820181905261208082018190526120a0820152600e6120c082018190526120e08201819052612100820181905261212082018190526121408201819052612160820181905261218082018190526121a082018190526121c082018190526121e08201819052612200820181905261222082018190526122408201819052612260820181905261228082018190526122a082018190526122c082018190526122e08201819052612300820181905261232082018190526123408201819052612360820181905261238082018190526123a082018190526123c082018181526123e08301829052612400830182905261242083018290526124408301829052612460830182905261248083018290526124a083018290526124c083018290526124e08301829052612500830182905261252083018290526125408301829052612560830182905261258083018290526125a083018290526125c083018290526125e08301829052612600830182905261262083018290526126408301829052612660830182905261268083018290526126a083018290526126c083018290526126e08301829052612700830182905261272083018290526127408301829052612760830182905261278083018290526127a083018290526127c083018290526127e083018290526128008301829052612820830182905261284083018290526128608301829052612880830191909152600f6128a083018190526128c083018190526128e08301819052612900830181905261292083018190526129408301819052612960830181905261298083018190526129a083018190526129c083018190526129e08301819052612a008301819052612a208301819052612a408301819052612a608301819052612a808301819052612aa08301819052612ac08301819052612ae08301819052612b008301819052612b208301819052612b408301819052612b608301819052612b808301819052612ba08301819052612bc08301819052612be08301819052612c008301819052612c208301819052612c408301819052612c608301819052612c808301819052612ca08301819052612cc08301819052612ce08301819052612d008301819052612d208301819052612d408301819052612d608301819052612d808301819052612da08301819052612dc08301819052612de08301819052612e008301819052612e208301819052612e408301819052612e608301819052612e808301819052612ea08301819052612ec08301819052612ee08301819052612f008301819052612f208301819052612f408301819052612f608301819052612f808301819052612fa090920182905290602090610c008301819052610c208301819052610c408301819052610c608301819052610c808301819052610ca08301819052610cc08301819052610ce08301819052610d008301819052610d208301819052610d408301819052610d608301819052610d808301819052610da08301819052610dc08301819052610de08301526010610e008301819052610e208301819052610e408301819052610e608301819052610e808301819052610ea08301819052610ec08301819052610ee08301819052610f008301819052610f208301819052610f408301819052610f608301526011610f808301819052610fa08301819052610fc08301819052610fe08301819052611000830181905261102083018190526110408301819052611060830181905261108083018190526110a083018190526110c083018190526110e08301819052611100830181905261112083018190526111408301819052611160830181905261118083018190526111a083018190526111c083018190526111e08301819052611200830181905261122083018190526112408301819052611260830181905261128083018190526112a083018190526112c083018190526112e08301819052611300830181905261132083018190526113408301526012611360830181905261138083018190526113a083018190526113c083018190526113e08301819052611400830181905261142083018190526114408301819052611460830181905261148083018190526114a083018190526114c083018190526114e08301819052611500830181905261152083018190526115408301819052611560830181905261158083018190526115a083018190526115c083018190526115e08301819052611600830181905261162083018190526116408301819052611660830181905261168083018190526116a083018190526116c083018190526116e08301819052611700830181905261172083018190526117408301819052611760830181905261178083018190526117a083018190526117c083018190526117e08301819052611800830181905261182083018190526118408301819052611860830181905261188083018190526118a083018190526118c083018190526118e08301819052611900830181905261192083018190526119408301819052611960830181905261198083018190526119a083018190526119c083018190526119e08301819052611a008301819052611a208301819052611a408301819052611a608301819052611a808301819052611aa08301819052611ac08301819052611ae08301819052611b008301819052611b208301819052611b408301819052611b608301819052611b808301819052611ba08301819052611bc08301819052611be08301819052611c008301819052611c208301819052611c408301819052611c608301819052611c808301819052611ca08301819052611cc08301819052611ce08301819052611d008301819052611d208301819052611d408301819052611d608301819052611d808301819052611da08301819052611dc08301819052611de08301819052611e008301819052611e208301526013611e408301819052611e608301819052611e808301819052611ea08301819052611ec08301819052611ee08301819052611f008301819052611f208301819052611f408301819052611f608301819052611f808301819052611fa08301819052611fc08301819052611fe08301819052612000830181905261202083018190526120408301819052612060830181905261208083018190526120a083018190526120c083018190526120e08301819052612100830181905261212083018190526121408301819052612160830181905261218083018190526121a083018190526121c083018190526121e08301819052612200830181905261222083018190526122408301819052612260830181905261228083018190526122a083018190526122c083018190526122e08301819052612300830181905261232083018190526123408301819052612360830181905261238083018190526123a0909201918252601391018181526020810182905260408101829052606081018290526080810182905260a0810182905260c0810191909152601460e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a082018190526101c082018190526101e08201819052610200820181905261022082018190526102408201819052610260820181905261028082018190526102a082018190526102c082018190526102e08201819052610300820181905261032082018190526103408201819052610360820181905261038082018190526103a082018190526103c082018190526103e08201819052610400820181905261042082018190526104408201819052610460820181905261048082018190526104a082018190526104c082018190526104e08201819052610500820181905261052082018190526105408201819052610560820181905261058082018190526105a082018190526105c082018190526105e08201819052610600820181905261062082018190526106408201819052610660820181905261068082018190526106a082018190526106c082018190526106e08201819052610700820181905261072082018190526107408201819052610760820181905261078082018190526107a082018190526107c082018190526107e08201819052610800820181905261082082018190526108408201819052610860820181905261088082018190526108a082018190526108c082018190526108e08201819052610900820181905261092082018190526109408201819052610960820181905261098082018190526109a082018190526109c082018190526109e08201819052610a008201819052610a208201819052610a408201819052610a608201819052610a808201819052610aa08201819052610ac08201819052610ae08201819052610b008201819052610b208201819052610b408201819052610b608201526015610b808201819052610ba08201819052610bc08201819052610be08201819052610c008201819052610c208201819052610c408201819052610c608201819052610c808201819052610ca08201819052610cc08201819052610ce08201819052610d008201819052610d208201819052610d408201819052610d608201819052610d808201819052610da08201819052610dc08201819052610de08201819052610e008201526016610e208201819052610e408201819052610e608201819052610e808201819052610ea08201819052610ec08201819052610ee08201819052610f008201819052610f208201819052610f408201819052610f608201819052610f808201819052610fa08201819052610fc08201819052610fe08201819052611000820181905261102082018190526110408201819052611060820181905261108082018190526110a082018190526110c082018190526110e08201819052611100820181905261112082018190526111408201819052611160820181905261118082018190526111a082018190526111c090910152620022c9906021906103e762002961565b50604080516103208101825260036102e0820181815262c3864360e81b6103008401528252825180840184526004808252634953c39960e01b602083810191909152808501929092528451808601865281815263c5ae525960e01b8184015284860152845180860186526005808252644954c2a74960d81b8285015260608601919091528551808701875281815264c5a449424160d81b818501526080860152855180870187528281526343c3984160e01b8185015260a08601528551808701875281815264c39853494160d81b8185015260c08601528551808701875282815263c5ae4e4160e01b8185015260e0860152855180870187528281526353c3984160e01b8185015261010086015285518087018752828152632c61cc2760e11b81850152610120860152855180870187528281526304e41c4960e41b81850152610140860152855180870187528181526447c581454160d81b818501526101608601528551808701875281815264c39852494160d81b818501526101808601528551808701875281815264c5ae44494160d81b818501526101a0860152855180870187528281526358cf864d60e01b818501526101c08601528551808701875281815264c39854524960d81b818501526101e08601528551808701875290815263b483c51160df1b81840152610200850152845180860186528381526226e1c360e91b8184015261022085015284518086018652838152622d61c360e91b8184015261024085015284518086018652818152634cc3984d60e01b81840152610260850152845180860186529283526248584d60e81b83830152610280840192909252835180850185528281526324a1e15560e11b818301526102a084015283518085019094529083526345c5814960e01b908301526102c081019190915262002577906041906017620029b7565b503480156200258557600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb6600160405180604001604052806008815260200167486f6d657369636b60c01b815250604051806040016040528060038152602001620905c960eb1b8152508160029081620025eb919062002b22565b506003620025fa828262002b22565b506000805550506daaeb6d7670e522a718067333cd4e3b15620027465780156200269457604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200267557600080fd5b505af11580156200268a573d6000803e3d6000fd5b5050505062002746565b6001600160a01b03821615620026e55760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200265a565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200272c57600080fd5b505af115801562002741573d6000803e3d6000fd5b505050505b50620027549050336200275a565b62002bee565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600183019183908215620028345791602002820160005b838211156200280357835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302620027c3565b8015620028325782816101000a81549060ff021916905560010160208160000104928301926001030262002803565b505b506200284292915062002a03565b5090565b600383019183908215620028345791602002820160005b83821115620028a657835183826101000a81548163ffffffff021916908360030b63ffffffff16021790555092602001926004016020816003010492830192600103026200285d565b8015620028325782816101000a81549063ffffffff0219169055600401602081600301049283019260010302620028a6565b600283019183908215620028345791602002820160005b838211156200293157835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302620028ef565b8015620028325782816101000a81549061ffff021916905560020160208160010104928301926001030262002931565b60208301918390821562002834579160200282016000838211156200280357835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302620027c3565b8260178101928215620029f5579160200282015b82811115620029f55782518290620029e4908262002b22565b5091602001919060010190620029cb565b506200284292915062002a1a565b5b8082111562002842576000815560010162002a04565b808211156200284257600062002a31828262002a3b565b5060010162002a1a565b50805462002a499062002a93565b6000825580601f1062002a5a575050565b601f01602090049060005260206000209081019062002a7a919062002a03565b50565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168062002aa857607f821691505b60208210810362002ac957634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562002b1d57600081815260208120601f850160051c8101602086101562002af85750805b601f850160051c820191505b8181101562002b195782815560010162002b04565b5050505b505050565b81516001600160401b0381111562002b3e5762002b3e62002a7d565b62002b568162002b4f845462002a93565b8462002acf565b602080601f83116001811462002b8e576000841562002b755750858301515b600019600386901b1c1916600185901b17855562002b19565b600085815260208120601f198616915b8281101562002bbf5788860151825594840194600190910190840162002b9e565b508582101562002bde5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b615de48062002bfe6000396000f3fe6080604052600436106103905760003560e01c8063715018a6116101dc578063c1bd8cf911610102578063e378a027116100a0578063f4f3b2001161006f578063f4f3b20014610c08578063fb59417414610c28578063fb6c565414610c3d578063fc5e7d4e14610c5d57600080fd5b8063e378a02714610b88578063e985e9c514610ba8578063ead8d95414610bc8578063f2fde38b14610be857600080fd5b8063d3bd8f92116100dc578063d3bd8f9214610b28578063d3f1a06014610b3d578063d5abeb0114610b52578063de2fe9dd14610b6857600080fd5b8063c1bd8cf914610ada578063c5dd60e114610af0578063c87b56dd14610b0857600080fd5b806395d89b411161017a578063ad08454d11610149578063ad08454d14610a49578063b88d4fde14610a5f578063b9c4d9fb14610a7f578063bb3bafd614610aac57600080fd5b806395d89b41146109e15780639ae95083146109f6578063a0712d6814610a16578063a22cb46514610a2957600080fd5b80638170b2e6116101b65780638170b2e6146108d95780638a80effd146109835780638d2d4198146109a35780638da5cb5b146109c357600080fd5b8063715018a61461089957806375369546146108ae5780637a0b45aa146108c457600080fd5b806341f43434116102c15780636352211e1161025f5780636914db601161022e5780636914db60146107955780636c0360eb146108445780636c2f5acd1461085957806370a082311461087957600080fd5b80636352211e1461070257806363b8a7cb1461072257806365216a411461075a5780636817c76c1461077a57600080fd5b806354c0d20e1161029b57806354c0d20e146106a157806355f804b3146106b75780635c9fc98b146106d7578063629266fe146106ec57600080fd5b806341f43434146105be57806342842e0e146105e0578063500e68e91461060057600080fd5b806323b872dd1161032e578063344c1f7811610308578063344c1f78146105535780633ccfd60b146105735780633f92e76014610588578063405f25651461059e57600080fd5b806323b872dd146104df5780632a55205a146104ff57806332c6e23a1461053e57600080fd5b8063081812fc1161036a578063081812fc14610435578063095ea7b31461046d5780630ebd4c7f1461048f57806318160ddd146104bc57600080fd5b806301ffc9a71461039c578063047aa331146103d157806306fdde031461041357600080fd5b3661039757005b600080fd5b3480156103a857600080fd5b506103bc6103b7366004614b6f565b610c7d565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506104016103ec366004614b8c565b60146020526000908152604090205460ff1681565b60405160ff90911681526020016103c8565b34801561041f57600080fd5b50610428610cdf565b6040516103c89190614bf5565b34801561044157600080fd5b50610455610450366004614b8c565b610d71565b6040516001600160a01b0390911681526020016103c8565b34801561047957600080fd5b5061048d610488366004614c1d565b610db5565b005b34801561049b57600080fd5b506104af6104aa366004614b8c565b610dce565b6040516103c89190614c84565b3480156104c857600080fd5b50600154600054035b6040519081526020016103c8565b3480156104eb57600080fd5b5061048d6104fa366004614c97565b610e2a565b34801561050b57600080fd5b5061051f61051a366004614cd8565b610e55565b604080516001600160a01b0390931683526020830191909152016103c8565b34801561054a57600080fd5b50610428610e8f565b34801561055f57600080fd5b5061048d61056e366004614d97565b610f1d565b34801561057f57600080fd5b5061048d610f60565b34801561059457600080fd5b506104d160115481565b3480156105aa57600080fd5b5061048d6105b9366004614b8c565b611045565b3480156105ca57600080fd5b506104556daaeb6d7670e522a718067333cd4e81565b3480156105ec57600080fd5b5061048d6105fb366004614c97565b61150c565b34801561060c57600080fd5b5061066561061b366004614ddf565b60166020526000908152604090205463ffffffff80821691600160201b81048216916001600160401b03600160401b8304811692600160801b810490921691600160a01b90041685565b6040805163ffffffff968716815294861660208601526001600160401b039384169085015293166060830152909116608082015260a0016103c8565b3480156106ad57600080fd5b506104d160185481565b3480156106c357600080fd5b5061048d6106d2366004614d97565b611531565b3480156106e357600080fd5b50610428611567565b3480156106f857600080fd5b506104d160175481565b34801561070e57600080fd5b5061045561071d366004614b8c565b611574565b34801561072e57600080fd5b5061074261073d366004614b8c565b611586565b6040516001600160401b0390911681526020016103c8565b34801561076657600080fd5b5061048d610775366004614e8a565b6115bc565b34801561078657600080fd5b506104d1668e1bc9bf04000081565b3480156107a157600080fd5b506108016107b0366004614b8c565b60126020526000908152604090205460ff8082169161010081049091169061ffff620100008204811691600160201b810490911690600160301b810460030b9063ffffffff600160501b9091041686565b6040805160ff978816815296909516602087015261ffff938416948601949094529116606084015260030b608083015263ffffffff1660a082015260c0016103c8565b34801561085057600080fd5b50610428611c11565b34801561086557600080fd5b5061048d610874366004614c1d565b611c1e565b34801561088557600080fd5b506104d1610894366004614ddf565b611c6e565b3480156108a557600080fd5b5061048d611cbc565b3480156108ba57600080fd5b506104d160155481565b3480156108d057600080fd5b50610428611cf2565b3480156108e557600080fd5b506109426108f4366004614b8c565b60136020526000908152604090205461ffff808216916201000081049091169063ffffffff600160201b8204811691600160401b8104821691600160601b8204811691600160801b90041686565b6040805161ffff978816815296909516602087015263ffffffff938416948601949094529082166060850152811660808401521660a082015260c0016103c8565b34801561098f57600080fd5b5061048d61099e366004614b8c565b611cff565b3480156109af57600080fd5b5061048d6109be366004614d97565b611d72565b3480156109cf57600080fd5b506008546001600160a01b0316610455565b3480156109ed57600080fd5b50610428611da8565b348015610a0257600080fd5b5061048d610a11366004614d97565b611db7565b61048d610a24366004614b8c565b611ded565b348015610a3557600080fd5b5061048d610a44366004614f59565b6124cb565b348015610a5557600080fd5b506104d160105481565b348015610a6b57600080fd5b5061048d610a7a366004614f92565b6124df565b348015610a8b57600080fd5b50610a9f610a9a366004614b8c565b61250c565b6040516103c8919061504a565b348015610ab857600080fd5b50610acc610ac7366004614b8c565b612585565b6040516103c892919061505d565b348015610ae657600080fd5b506104d1600f5481565b348015610afc57600080fd5b50610742630f73140081565b348015610b1457600080fd5b50610428610b23366004614b8c565b612639565b348015610b3457600080fd5b5061048d612afe565b348015610b4957600080fd5b50610428612b2f565b348015610b5e57600080fd5b506104d16103e781565b348015610b7457600080fd5b50600954610455906001600160a01b031681565b348015610b9457600080fd5b5061048d610ba3366004615082565b612b3c565b348015610bb457600080fd5b506103bc610bc33660046150ae565b612f7e565b348015610bd457600080fd5b5061048d610be3366004614d97565b612fac565b348015610bf457600080fd5b5061048d610c03366004614ddf565b612fe2565b348015610c1457600080fd5b5061048d610c23366004614ddf565b61307a565b348015610c3457600080fd5b5061048d6131f2565b348015610c4957600080fd5b50610742610c58366004614ddf565b613228565b348015610c6957600080fd5b5061048d610c78366004614ddf565b613398565b6000610c88826133e4565b80610ca357506001600160e01b03198216635d9dd7eb60e11b145b80610cbe57506001600160e01b0319821663152a902d60e11b145b80610cd957506001600160e01b03198216632dde656160e21b145b92915050565b606060028054610cee906150dc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1a906150dc565b8015610d675780601f10610d3c57610100808354040283529160200191610d67565b820191906000526020600020905b815481529060010190602001808311610d4a57829003601f168201915b5050505050905090565b6000610d7c82613434565b610d99576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81610dbf8161345f565b610dc98383613518565b505050565b605b546060906001600160a01b031615610e25576040805160018082528183019092529060208083019080368337019050509050605a5481600081518110610e1857610e18615110565b6020026020010181815250505b919050565b826001600160a01b0381163314610e4457610e443361345f565b610e4f8484846135a0565b50505050565b605b54605a5460009182916001600160a01b039091169061271090610e7a908661513c565b610e849190615169565b915091509250929050565b600c8054610e9c906150dc565b80601f0160208091040260200160405190810160405280929190818152602001828054610ec8906150dc565b8015610f155780601f10610eea57610100808354040283529160200191610f15565b820191906000526020600020905b815481529060010190602001808311610ef857829003601f168201915b505050505081565b6008546001600160a01b03163314610f505760405162461bcd60e51b8152600401610f479061517d565b60405180910390fd5b600b610f5c8282615200565b5050565b6008546001600160a01b03163314610f8a5760405162461bcd60e51b8152600401610f479061517d565b605b546001600160a01b0316610fe25760405162461bcd60e51b815260206004820152601a60248201527f4d7573742073657420726f79616c747920726563697069656e740000000000006044820152606401610f47565b605b546040516000916001600160a01b03169047908381818185875af1925050503d806000811461102f576040519150601f19603f3d011682016040523d82523d6000602084013e611034565b606091505b505090508061104257600080fd5b50565b61104e81611574565b6001600160a01b0316336001600160a01b0316146110a05760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420796f757220746f6b656e2160881b6044820152606401610f47565b6000601754116110fe5760405162461bcd60e51b8152602060048201526024808201527f416c6c20756c74696d61746520706c616e6574732068617665206265656e20666044820152631bdd5b9960e21b6064820152608401610f47565b600061110933613228565b9050630f7314006001600160401b038216116111675760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f75676820616363756d756c617465642073636f7265000000006044820152606401610f47565b60008281526014602052604090205460ff16156111c65760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206275726e20484f4d4520746f6b656e730000000000000000006044820152606401610f47565b60008281526012602052604090205460ff610100909104166001146112445760405162461bcd60e51b815260206004820152602e60248201527f4e65656420746f20737570706c79206c6f636b656420746f6b656e20746f206d60448201526d34b73a102427a6a2903a37b5b2b760911b6064820152608401610f47565b60004442601954600f5461125891906152bf565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c905060006017548261ffff166112a191906152d2565b905060006112b78263ffffffff166017546135ab565b6040805160c08101825261ffff83811682526019541660208083019190915263ffffffff428181168486015288831c82166060850181905289861c8316608086018190523360009081526016909552958420549697509592939260a0840192611322929116906152e6565b63ffffffff90811690915260008a815260136020908152604080832085518154878501518885015160608a015160808b015160a08c015161ffff96871663ffffffff1990961695909517620100009690941695909502929092176bffffffffffffffff000000001916600160201b918a16919091026bffffffff0000000000000000191617600160401b918916919091021767ffffffffffffffff60601b1916600160601b9288169290920263ffffffff60801b191691909117600160801b9190961602949094179093556014905220805460ff1916600117905590506114093389613643565b600088815260126020526040812080546dffffffffffffffffffffffffffff19169055601780546001929061143f9084906152e6565b9250508190555060016019600082825461145991906152bf565b90915550506017546000036114d557600960009054906101000a90046001600160a01b03166001600160a01b0316631cf1034f6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156114b857600080fd5b505af11580156114cc573d6000803e3d6000fd5b50504260185550505b604051339089907fe59ea23cb4e37386604d84472528a25ed3563d61dcad97e034f0bd140484d9f890600090a35050505050505050565b826001600160a01b0381163314611526576115263361345f565b610e4f848484613947565b6008546001600160a01b0316331461155b5760405162461bcd60e51b8152600401610f479061517d565b600a610f5c8282615200565b600d8054610e9c906150dc565b600061157f82613962565b5192915050565b60006115936014836152e6565b91506115a666038d7ea4c680008361513c565b9150610cd96115b76115b784613a7c565b613a7c565b6008546001600160a01b031633146115e65760405162461bcd60e51b8152600401610f479061517d565b80518251146116375760405162461bcd60e51b815260206004820152601a60248201527f6172726179206c656e677468732073686f756c64206d617463680000000000006044820152606401610f47565b600f54600090815b8451811015611b8f576000805b85838151811061165e5761165e615110565b602002602001015181101561195f57600061167b856103e76152e6565b6040805144602080830191909152428284015260608083018a9052835180840390910181526080909201909252805191012090915060006116c08361ffff84166152d2565b905060006116d48263ffffffff1685613acf565b905060006116e182613b64565b601b549091506000906116ff9060ff1661ffff601088901c166152d2565b9050601a8260ff166017811061171757611717615110565b60208104919091015461173691601f166101000a900460ff16826152f9565b9050600061a8c06117546201518063ffffffff60208a901c166152d2565b61175e919061531b565b601c8460ff166017811061177457611774615110565b60088104919091015461179692916007166004026101000a900460030b61533b565b905060006014601f8560ff16601781106117b2576117b2615110565b601091828204019190066002029054906101000a900461ffff1661ffff1663ffffffff16901b63ffffffff16604088901c620fffff1617905060006040518060c001604052808660ff168152602001600060ff1681526020018561ffff1681526020018761ffff1681526020018460030b81526020018363ffffffff16815250905080601260008f815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548161ffff021916908361ffff16021790555060608201518160000160046101000a81548161ffff021916908361ffff16021790555060808201518160000160066101000a81548163ffffffff021916908360030b63ffffffff16021790555060a082015181600001600a6101000a81548163ffffffff021916908363ffffffff1602179055509050508361ffff168b6119349190615362565b9a508c61194081615382565b9d5050505050505050505050808061195790615382565b91505061164c565b5084828151811061197257611972615110565b60200260200101518461198591906152bf565b93506119c386838151811061199c5761199c615110565b60200260200101518684815181106119b6576119b6615110565b6020026020010151613b96565b6000601660008885815181106119db576119db615110565b6020908102919091018101516001600160a01b03168252818101929092526040908101600020815160a081018352905463ffffffff808216808452600160201b83048216958401959095526001600160401b03600160401b8304811694840194909452600160801b8204166060830152600160a01b90049091166080820152915015611a88576000611a6c82613bb0565b63ffffffff421660608401526001600160401b03166080830152505b8181604001818151611a9a9190615362565b6001600160401b0316905250865181906016906000908a9087908110611ac257611ac2615110565b6020908102919091018101516001600160a01b03168252818101929092526040908101600020835181549385015192850151606086015160809096015163ffffffff92831667ffffffffffffffff1990961695909517600160201b9483169490940293909317600160401b600160a01b031916600160401b6001600160401b039485160263ffffffff60801b191617600160801b91909516029390931767ffffffffffffffff60a01b1916600160a01b919092160217905550819050611b8781615382565b91505061163f565b50601054821115611bdb5760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610f47565b8160106000828254611bed91906152e6565b9250508190555081600f6000828254611c0691906152bf565b909155505050505050565b600a8054610e9c906150dc565b6008546001600160a01b03163314611c485760405162461bcd60e51b8152600401610f479061517d565b605b80546001600160a01b0319166001600160a01b039390931692909217909155605a55565b60006001600160a01b038216611c97576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b03163314611ce65760405162461bcd60e51b8152600401610f479061517d565b611cf06000613c54565b565b600b8054610e9c906150dc565b6008546001600160a01b03163314611d295760405162461bcd60e51b8152600401610f479061517d565b60115415611d6d5760405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e481858dd1a5d985d1959607a1b6044820152606401610f47565b601155565b6008546001600160a01b03163314611d9c5760405162461bcd60e51b8152600401610f479061517d565b600c610f5c8282615200565b606060038054610cee906150dc565b6008546001600160a01b03163314611de15760405162461bcd60e51b8152600401610f479061517d565b600e610f5c8282615200565b333b15611e4b5760405162461bcd60e51b815260206004820152602660248201527f53686f756c64206e6f742062652063616c6c65642066726f6d206120636f6e7460448201526572616374212160d01b6064820152608401610f47565b601154600003611e9d5760405162461bcd60e51b815260206004820152601b60248201527f7075626c6963206d696e742064617465206973206e6f742073657400000000006044820152606401610f47565b601154421015611eef5760405162461bcd60e51b815260206004820152601960248201527f7761697420666f72207075626c6963206d696e742074696d65000000000000006044820152606401610f47565b60008111611f3f5760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401610f47565b600b8110611f8f5760405162461bcd60e51b815260206004820152601a60248201527f6d6178206d696e7420706572207478206973203130204e4654730000000000006044820152606401610f47565b6103e781601054600f54611fa391906152bf565b611fad91906152bf565b1115611ff45760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610f47565b612005668e1bc9bf0400008261513c565b3410156120495760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610f47565b60008082600f5461205a91906152bf565b600f549091505b8181101561234e576000612077826103e76152e6565b604080514460208083019190915242828401526060808301879052835180840390910181526080909201909252805191012090915060006120bc8361ffff84166152d2565b905060006120d08263ffffffff1685613acf565b905060006120dd82613b64565b601b549091506000906120fb9060ff1661ffff601088901c166152d2565b9050601a8260ff166017811061211357612113615110565b60208104919091015461213291601f166101000a900460ff16826152f9565b9050600061a8c06121506201518063ffffffff60208a901c166152d2565b61215a919061531b565b601c8460ff166017811061217057612170615110565b60088104919091015461219292916007166004026101000a900460030b61533b565b905060006014601f8560ff16601781106121ae576121ae615110565b601091828204019190066002029054906101000a900461ffff1661ffff1663ffffffff16901b63ffffffff16604088901c620fffff1617905060006040518060c001604052808660ff168152602001600060ff1681526020018561ffff1681526020018761ffff1681526020018460030b81526020018363ffffffff16815250905080601260008c815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548161ffff021916908361ffff16021790555060608201518160000160046101000a81548161ffff021916908361ffff16021790555060808201518160000160066101000a81548163ffffffff021916908360030b63ffffffff16021790555060a082015181600001600a6101000a81548163ffffffff021916908363ffffffff1602179055509050508361ffff168c6123309190615362565b9b50505050505050505050808061234690615382565b915050612061565b5082600f600082825461236191906152bf565b909155505033600090815260166020908152604091829020825160a081018452905463ffffffff808216808452600160201b83048216948401949094526001600160401b03600160401b8304811695840195909552600160801b8204166060830152600160a01b90049092166080830152156123fe5760006123e282613bb0565b63ffffffff421660608401526001600160401b03166080830152505b82816040018181516124109190615362565b6001600160401b0390811690915233600081815260166020908152604091829020865181549288015193880151606089015160808a01518816600160a01b0267ffffffffffffffff60a01b1963ffffffff928316600160801b0263ffffffff60801b1994909a16600160401b0293909316600160401b600160a01b0319978316600160201b0267ffffffffffffffff199097169290941691909117949094179490941617949094179190911617909155610e4f915085613b96565b816124d58161345f565b610dc98383613ca6565b836001600160a01b03811633146124f9576124f93361345f565b61250585858585613d3b565b5050505050565b605b546060906001600160a01b031615610e255760408051600180825281830190925290602080830190803683375050605b5482519293506001600160a01b03169183915060009061256057612560615110565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b605b5460609081906001600160a01b0316156126345760408051600180825281830190925290602080830190803683375050605b5482519294506001600160a01b0316918491506000906125db576125db615110565b6001600160a01b0392909216602092830291909101820152604080516001808252818301909252918281019080368337019050509050605a548160008151811061262757612627615110565b6020026020010181815250505b915091565b606061264482613434565b61266157604051630a14c4b560e41b815260040160405180910390fd5b60008281526014602052604081205460ff16900361293b576000828152601260209081526040822054909190600160301b900460030b8113156126ce57600084815260126020526040902054602d92506126c790600160301b900460030b60001961539b565b90506126e9565b50600083815260126020526040902054600160301b900460030b5b60008481526012602052604090205460ff610100909104166001148015612711575060175415155b1561284a57600084815260126020526040902054606090600a9061273f90600160201b900461ffff16613d86565b600c61274c886004613e18565b60008981526012602052604090205460419060ff166017811061277157612771615110565b0160405160200161278695949392919061542e565b60408051808303601f1901815291815260008781526012602052205490915081906127bf90600160501b900463ffffffff166004613eec565b6000878152601260205260409020546127e39062010000900461ffff166001614087565b856127f38663ffffffff16613d86565b604051602001612807959493929190615678565b6040516020818303038152906040529050612821816141d4565b6040516020016128319190615749565b6040516020818303038152906040529350505050919050565b600084815260126020526040902054606090600a9061287390600160201b900461ffff16613d86565b600c612880886004613e18565b60008981526012602052604090205460419060ff16601781106128a5576128a5615110565b016040516020016128ba95949392919061542e565b60408051808303601f1901815291815260008781526012602052205490915081906128f390600160501b900463ffffffff166004613eec565b6000878152601260205260409020546129179062010000900461ffff166001614087565b856129278663ffffffff16613d86565b60405160200161280795949392919061578e565b60008281526013602052604081205460609190600b9061295e9061ffff16613d86565b60405160200161296f9291906157d2565b604051602081830303815290604052905080600d82600e60405160200161299994939291906157f7565b60408051808303601f190181529181526000868152601360205220549092508291506129d09062010000900461ffff166002613e18565b6000858152601360205260409020546129f790600160401b900463ffffffff166004613eec565b604051602001612a099392919061593a565b60408051808303601f190181529181526000858152601360205220549091508190612a4290600160601b900463ffffffff166004613eec565b600085815260136020526040902054612a8590603c90612a70908290600160801b900463ffffffff16615a24565b612a7a9190615a24565b63ffffffff16613d86565b600086815260136020526040902054612aaa90600160201b900463ffffffff16613d86565b604051602001612abd9493929190615a47565b6040516020818303038152906040529050612ad7816141d4565b604051602001612ae79190615749565b604051602081830303815290604052915050919050565b6008546001600160a01b03163314612b285760405162461bcd60e51b8152600401610f479061517d565b6000601155565b600e8054610e9c906150dc565b601554600003612b9c5760405162461bcd60e51b815260206004820152602560248201527f53636f726520616363756d756c6174696f6e206861736e27742073746172746560448201526419081e595d60da1b6064820152608401610f47565b818303612bbb5760405162461bcd60e51b8152600401610f4790615b2f565b808203612bda5760405162461bcd60e51b8152600401610f4790615b2f565b808303612bf95760405162461bcd60e51b8152600401610f4790615b2f565b33612c0384611574565b6001600160a01b031614612c295760405162461bcd60e51b8152600401610f4790615b66565b33612c3383611574565b6001600160a01b031614612c595760405162461bcd60e51b8152600401610f4790615b66565b33612c6382611574565b6001600160a01b031614612c895760405162461bcd60e51b8152600401610f4790615b66565b60008381526014602052604090205460ff1615612cb85760405162461bcd60e51b8152600401610f4790615b9d565b60008281526014602052604090205460ff1615612ce75760405162461bcd60e51b8152600401610f4790615b9d565b60008181526014602052604090205460ff1615612d165760405162461bcd60e51b8152600401610f4790615b9d565b33600090815260166020908152604091829020825160a081018452905463ffffffff808216808452600160201b83048216948401949094526001600160401b03600160401b8304811695840195909552600160801b8204166060830152600160a01b9004909216608083015215612dc15760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481cdd185c9d1959608a1b6044820152606401610f47565b60095460405163643183bf60e01b81526004810186905260248101859052604481018490523360648201526000916001600160a01b03169063643183bf906084016020604051808303816000875af1158015612e21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e459190615be8565b4263ffffffff90811684528181166020808601918252336000818152601683526040808220895181549651838c01516060808e015160808f0151948c1667ffffffffffffffff19909b169a909a17600160201b938c169390930292909217600160401b600160a01b031916600160401b6001600160401b039283160263ffffffff60801b191617600160801b99909a16989098029890981767ffffffffffffffff60a01b1916600160a01b9790911696909602959095179094558a815260128352838120805461010061ff001991821681179092558b835285832080548216831790558a835291859020805490921617905582518a8152918201899052918101879052929350917f42c734f659ba87ff53f9b85b58ef45d843011edc136db3d7540bba091955411e910160405180910390a25050505050565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b03163314612fd65760405162461bcd60e51b8152600401610f479061517d565b600d610f5c8282615200565b6008546001600160a01b0316331461300c5760405162461bcd60e51b8152600401610f479061517d565b6001600160a01b0381166130715760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f47565b61104281613c54565b6008546001600160a01b031633146130a45760405162461bcd60e51b8152600401610f479061517d565b605b546001600160a01b03166130fc5760405162461bcd60e51b815260206004820152601a60248201527f4d7573742073657420726f79616c747920726563697069656e740000000000006044820152606401610f47565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015613145573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131699190615c03565b605b5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529192506000919084169063a9059cbb906044016020604051808303816000875af11580156131c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e69190615c1c565b905080610e4f57600080fd5b6008546001600160a01b0316331461321c5760405162461bcd60e51b8152600401610f479061517d565b63ffffffff4216601555565b600060155460000361323c57506000919050565b6001600160a01b03821660009081526016602052604081205463ffffffff16900361326957506000919050565b601754429060000361327a57506018545b6001600160a01b038316600090815260166020526040902054600160801b900463ffffffff161561332d576001600160a01b0383166000908152601660205260409020546001600160401b03600160a01b82048116916132e291600160401b90910416611586565b6001600160a01b03851660009081526016602052604090205461331290600160801b900463ffffffff16846152e6565b61331c9190615c39565b6133269190615362565b9392505050565b6001600160a01b03831660009081526016602052604090205461335f90600160401b90046001600160401b0316611586565b6001600160a01b0384166000908152601660205260409020546133889063ffffffff16836152e6565b6133269190615c39565b50919050565b6008546001600160a01b031633146133c25760405162461bcd60e51b8152600401610f479061517d565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061341557506001600160e01b03198216635b5e139f60e01b145b80610cd957506301ffc9a760e01b6001600160e01b0319831614610cd9565b6000805482108015610cd9575050600090815260046020526040902054600160e01b900460ff161590565b6daaeb6d7670e522a718067333cd4e3b1561104257604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156134cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f09190615c1c565b61104257604051633b79c77360e21b81526001600160a01b0382166004820152602401610f47565b600061352382611574565b9050806001600160a01b0316836001600160a01b0316036135575760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061357757506135758133612f7e565b155b15613595576040516367d9dca160e11b815260040160405180910390fd5b610dc9838383614326565b610dc9838383614382565b600082815260596020526040812054818181036135c95750836135cc565b50805b60006135d96001866152e6565b6000818152605960205260409020549091508682146136225780600003613610576000878152605960205260409020829055613622565b60008781526059602052604090208190555b8015613638576000828152605960205260408120555b509095945050505050565b6001600160a01b0382166000908152601660209081526040808320815160a08082018452915463ffffffff8082168352600160201b8083048216848801526001600160401b03600160401b8404811685880152600160801b84048316606080870191909152600160a01b909404166080808601919091528989526012885297869020865160c081018852905460ff808216835261010082041698820189905261ffff62010000820481169883019890985291820490961692860192909252600160301b820460030b96850196909652600160501b90049094169082015290600103613834576020820151600954604051630852cd8d60e31b815263ffffffff831660048201526000916001600160a01b0316906342966c68906024016060604051808303816000875af115801561377e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137a29190615c64565b805163ffffffff9081166000908152601260209081526040808320805461ff001990811690915582860151851684528184208054821690558186015190941683528083208054909416909355818852870181905260608701819052608087015284810151908601805192935061ffff90911691613820908390615cdd565b6001600160401b031690525061388f915050565b815163ffffffff161561386857600061384c83613bb0565b63ffffffff421660608501526001600160401b03166080840152505b806040015161ffff16826040018181516138829190615cdd565b6001600160401b03169052505b506001600160a01b0392909216600090815260166020908152604091829020845181549286015193860151606087015160809097015163ffffffff92831667ffffffffffffffff1990951694909417600160201b9583169590950294909417600160401b600160a01b031916600160401b6001600160401b039586160263ffffffff60801b191617600160801b91909616029490941767ffffffffffffffff60a01b1916600160a01b92909116919091021790915550565b610dc9838383604051806020016040528060008152506124df565b604080516060810182526000808252602082018190529181019190915281600054811015613a6357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290613a615780516001600160a01b0316156139f8579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215613a5c579392505050565b6139f8565b505b604051636f96cda160e11b815260040160405180910390fd5b6000806002613a8c8460016152bf565b613a969190615169565b90508291505b8181101561339257905080600281613ab48186615169565b613abe91906152bf565b613ac89190615169565b9050613a9c565b60008281526058602052604081205481818103613aed575083613af0565b50805b6000613afd6001866152e6565b600081815260586020526040902054909150868214613b465780600003613b34576000878152605860205260409020829055613b46565b60008781526058602052604090208190555b80156136385750600090815260586020526040812055949350505050565b60006021826103e78110613b7a57613b7a615110565b602081049091015460ff601f9092166101000a90041692915050565b610f5c828260405180602001604052806000815250614575565b6000601554600003613bc457506000919050565b815163ffffffff16600003613bdb57506000919050565b6017544290600003613bec57506018545b606083015163ffffffff1615613c2c578260800151613c1784604001516001600160401b0316611586565b60608501516133129063ffffffff16846152e6565b613c4283604001516001600160401b0316611586565b83516133889063ffffffff16836152e6565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b336001600160a01b03831603613ccf5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b613d46848484614382565b6001600160a01b0383163b15158015613d685750613d6684848484614582565b155b15610e4f576040516368d2bf6b60e11b815260040160405180910390fd5b60606000613d938361466e565b60010190506000816001600160401b03811115613db257613db2614cfa565b6040519080825280601f01601f191660200182016040528015613ddc576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084613de657509392505050565b60606000826001600160401b03811115613e3457613e34614cfa565b6040519080825280601f01601f191660200182016040528015613e5e576020820181803683370190505b5090508281016020015b60001993840193016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945083613e68578415613ee45760405162461bcd60e51b815260206004820152601c60248201527f537472696e67733a206c656e67746820696e73756666696369656e74000000006044820152606401610f47565b509392505050565b60606000613efb83600261513c565b613f069060026152bf565b6001600160401b03811115613f1d57613f1d614cfa565b6040519080825280601f01601f191660200182016040528015613f47576020820181803683370190505b509050600360fc1b81600081518110613f6257613f62615110565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613f9157613f91615110565b60200101906001600160f81b031916908160001a9053506000613fb584600261513c565b613fc09060016152bf565b90505b6001811115614038576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613ff457613ff4615110565b1a60f81b82828151811061400a5761400a615110565b60200101906001600160f81b031916908160001a90535060049490941c9361403181615cfd565b9050613fc3565b5083156133265760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610f47565b6060826000036140af57506040805180820190915260018152600360fc1b6020820152610cd9565b8260015b81156140d957806140c381615382565b91506140d29050600a83615169565b91506140b3565b6000816001600160401b038111156140f3576140f3614cfa565b6040519080825280601f01601f19166020018201604052801561411d576020820181803683370190505b5090505b85156141cb576141326001836152e6565b915084820361417757601760f91b81838151811061415257614152615110565b60200101906001600160f81b031916908160001a9053506141746001836152e6565b91505b614182600a876152d2565b61418d9060306152bf565b60f81b8183815181106141a2576141a2615110565b60200101906001600160f81b031916908160001a9053506141c4600a87615169565b9550614121565b95945050505050565b606081516000036141f357505060408051602081019091526000815290565b6000604051806060016040528060408152602001615d6f604091399050600060038451600261422291906152bf565b61422c9190615169565b61423790600461513c565b6001600160401b0381111561424e5761424e614cfa565b6040519080825280601f01601f191660200182016040528015614278576020820181803683370190505b509050600182016020820185865187015b808210156142e4576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250614289565b505060038651066001811461430057600281146143135761431b565b603d6001830353603d600283035361431b565b603d60018303535b509195945050505050565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061438d82613962565b9050836001600160a01b031681600001516001600160a01b0316146143c45760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806143e257506143e28533612f7e565b806143fd5750336143f284610d71565b6001600160a01b0316145b90508061441d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661444457604051633a954ecd60e21b815260040160405180910390fd5b61445060008487614326565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661452457600054821461452457805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46125058585856001614746565b610dc98383836001614984565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906145b7903390899088908890600401615d14565b6020604051808303816000875af19250505080156145f2575060408051601f3d908101601f191682019092526145ef91810190615d51565b60015b614650573d808015614620576040519150601f19603f3d011682016040523d82523d6000602084013e614625565b606091505b508051600003614648576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106146ad5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106146d9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106146f757662386f26fc10000830492506010015b6305f5e100831061470f576305f5e100830492506008015b612710831061472357612710830492506004015b60648310614735576064830492506002015b600a8310610cd95760010192915050565b6001600160a01b03841615610e4f5760175415610e4f5760008281526014602052604081205460ff169003610e4f5761477f8483613643565b600082815260126020908152604091829020825160c081018452905460ff80821683526101008204169282019290925261ffff620100008304811693820193909352600160201b82049092166060830152600160301b810460030b608083015263ffffffff600160501b9091041660a08201526001600160a01b03841615612505576001600160a01b038416600090815260166020908152604091829020825160a081018452905463ffffffff808216808452600160201b83048216948401949094526001600160401b03600160401b8304811695840195909552600160801b8204166060830152600160a01b90049092166080830152156148a257600061488682613bb0565b63ffffffff421660608401526001600160401b03166080830152505b816040015161ffff16816040018181516148bc9190615362565b6001600160401b039081169091526001600160a01b03871660009081526016602090815260409182902085518154928701519387015160608801516080909801518616600160a01b0267ffffffffffffffff60a01b1963ffffffff998a16600160801b0263ffffffff60801b1993909816600160401b0292909216600160401b600160a01b0319968a16600160201b0267ffffffffffffffff199096169990931698909817939093179390931692909217929092179190911692909217909155505050505050565b6000546001600160a01b0385166149ad57604051622e076360e81b815260040160405180910390fd5b836000036149ce5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015614a7a57506001600160a01b0387163b15155b15614b02575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4614acb6000888480600101955088614582565b614ae8576040516368d2bf6b60e11b815260040160405180910390fd5b808203614a80578260005414614afd57600080fd5b614b47565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203614b03575b50600090815561250590868387614746565b6001600160e01b03198116811461104257600080fd5b600060208284031215614b8157600080fd5b813561332681614b59565b600060208284031215614b9e57600080fd5b5035919050565b60005b83811015614bc0578181015183820152602001614ba8565b50506000910152565b60008151808452614be1816020860160208601614ba5565b601f01601f19169290920160200192915050565b6020815260006133266020830184614bc9565b6001600160a01b038116811461104257600080fd5b60008060408385031215614c3057600080fd5b8235614c3b81614c08565b946020939093013593505050565b600081518084526020808501945080840160005b83811015614c7957815187529582019590820190600101614c5d565b509495945050505050565b6020815260006133266020830184614c49565b600080600060608486031215614cac57600080fd5b8335614cb781614c08565b92506020840135614cc781614c08565b929592945050506040919091013590565b60008060408385031215614ceb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614d3857614d38614cfa565b604052919050565b60006001600160401b03831115614d5957614d59614cfa565b614d6c601f8401601f1916602001614d10565b9050828152838383011115614d8057600080fd5b828260208301376000602084830101529392505050565b600060208284031215614da957600080fd5b81356001600160401b03811115614dbf57600080fd5b8201601f81018413614dd057600080fd5b61466684823560208401614d40565b600060208284031215614df157600080fd5b813561332681614c08565b60006001600160401b03821115614e1557614e15614cfa565b5060051b60200190565b600082601f830112614e3057600080fd5b81356020614e45614e4083614dfc565b614d10565b82815260059290921b84018101918181019086841115614e6457600080fd5b8286015b84811015614e7f5780358352918301918301614e68565b509695505050505050565b60008060408385031215614e9d57600080fd5b82356001600160401b0380821115614eb457600080fd5b818501915085601f830112614ec857600080fd5b81356020614ed8614e4083614dfc565b82815260059290921b84018101918181019089841115614ef757600080fd5b948201945b83861015614f1e578535614f0f81614c08565b82529482019490820190614efc565b96505086013592505080821115614f3457600080fd5b50614f4185828601614e1f565b9150509250929050565b801515811461104257600080fd5b60008060408385031215614f6c57600080fd5b8235614f7781614c08565b91506020830135614f8781614f4b565b809150509250929050565b60008060008060808587031215614fa857600080fd5b8435614fb381614c08565b93506020850135614fc381614c08565b92506040850135915060608501356001600160401b03811115614fe557600080fd5b8501601f81018713614ff657600080fd5b61500587823560208401614d40565b91505092959194509250565b600081518084526020808501945080840160005b83811015614c795781516001600160a01b031687529582019590820190600101615025565b6020815260006133266020830184615011565b6040815260006150706040830185615011565b82810360208401526141cb8185614c49565b60008060006060848603121561509757600080fd5b505081359360208301359350604090920135919050565b600080604083850312156150c157600080fd5b82356150cc81614c08565b91506020830135614f8781614c08565b600181811c908216806150f057607f821691505b60208210810361339257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610cd957610cd9615126565b634e487b7160e01b600052601260045260246000fd5b60008261517857615178615153565b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b601f821115610dc957600081815260208120601f850160051c810160208610156151d95750805b601f850160051c820191505b818110156151f8578281556001016151e5565b505050505050565b81516001600160401b0381111561521957615219614cfa565b61522d8161522784546150dc565b846151b2565b602080601f831160018114615262576000841561524a5750858301515b600019600386901b1c1916600185901b1785556151f8565b600085815260208120601f198616915b8281101561529157888601518255948401946001909101908401615272565b50858210156152af5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115610cd957610cd9615126565b6000826152e1576152e1615153565b500690565b81810381811115610cd957610cd9615126565b61ffff81811683821601908082111561531457615314615126565b5092915050565b818103600083128015838313168383128216171561531457615314615126565b600381810b9083900b01637fffffff8113637fffffff1982121715610cd957610cd9615126565b6001600160401b0381811683821601908082111561531457615314615126565b60006001820161539457615394615126565b5060010190565b60008260030b8260030b028060030b915080821461531457615314615126565b600081546153c8816150dc565b600182811680156153e057600181146153f557615424565b60ff1984168752821515830287019450615424565b8560005260208060002060005b8581101561541b5781548a820152908401908201615402565b50505082870194505b5050505092915050565b7f7b226465736372697074696f6e223a22576974682074686520757365206f662081527f334420616e64204149206d656469756d732c20484f584944206861732063617260208201527f6566756c6c7920637572617465642039393920756e697175652070696563657360408201527f2066726f6d20746865206c6174656e742073706163652c206372656174696e6760608201527f20612062656175746966756c20636f6c6c656374696f6e206f6620737065636960808201526f36b2b7399711161134b6b0b3b2911d1160811b60a0820152600061551160b08301886153bb565b8651615521818360208b01614ba5565b61552d818301886153bb565b91505073222c226e616d65223a2253706563696d656e202360601b8152845161555d816014840160208901614ba5565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a225460149290910191820152723cb832902730b6b29116113b30b63ab2911d1160691b60348201526155e76155b460478301866153bb565b7f227d2c7b2274726169745f74797065223a2253656564222c2276616c7565223a8152601160f91b602082015260210190565b98975050505050505050565b7f227d2c7b2274726169745f74797065223a22506f74656e746961222c2276616c8152633ab2911d60e11b602082015260240190565b7f7d2c7b22646973706c61795f74797065223a2264617465222c2274726169745f81527f74797065223a224372656174696f6e2044617465222c2276616c7565223a00006020820152603e0190565b6000865161568a818460208b01614ba5565b86519083019061569e818360208b01614ba5565b7f227d2c7b2274726169745f74797065223a224c6f636b6564222c2276616c7565910190815262111d1160e91b602082015265131bd8dad95960d21b60238201526156eb602982016155f3565b905085516156fd818360208a01614ba5565b615708818301615629565b91505060ff60f81b8560f81b168152835161572a816001840160208801614ba5565b627d5d7d60e81b60019290910191820152600401979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161578181601d850160208701614ba5565b91909101601d0192915050565b600086516157a0818460208b01614ba5565b8651908301906157b4818360208b01614ba5565b6157bf8183016155f3565b91505085516156fd818360208a01614ba5565b60006157de82856153bb565b83516157ee818360208801614ba5565b01949350505050565b7f7b226465736372697074696f6e223a22486f6d6520205c6e2a54686520706c6181527f636520776865726520796f75206c697665206f72206665656c20796f7520626560208201527f6c6f6e672e2a20205c6e20205c6e5468697320312f31207370656369616c207060408201527f696563652069732070617274206f662074686520484f4d455349434b20636f6c60608201527f6c656374696f6e2c20776974682069747320756e697175652067656e6572617460808201527f69766520736f756e642064657369676e2e222c22696d616765223a220000000060a0820152600085516158ed8160bc850160208a01614ba5565b6158fc60bc82850101876153bb565b7211161130b734b6b0ba34b7b72fbab936111d1160691b8152855190915061592b816013840160208901614ba5565b6155e7601382840101866153bb565b6000845161594c818460208901614ba5565b6f222c226e616d65223a22484f4d45202360801b9083019081528451615979816010840160208901614ba5565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a2245601092909101918201527f786f7368656c6c2053656564222c2276616c7565223a22000000000000000000603082015283516159dd816047840160208801614ba5565b7f227d2c7b2274726169745f74797065223a22536f6e69632053656564222c2276604792909101918201526630b63ab2911d1160c91b6067820152606e0195945050505050565b600063ffffffff80841680615a3b57615a3b615153565b92169190910492915050565b60008551615a59818460208a01614ba5565b855190830190615a6d818360208a01614ba5565b8082019150507f227d2c7b2274726169745f74797065223a2254797065204e616d65222c22766181527f6c7565223a22484f4d45227d2c7b2274726169745f74797065223a2253656c6660208201527f204372656174696f6e2054696d652028486f75727329222c2276616c7565223a60408201528451615af5816060840160208901614ba5565b615b03606082840101615629565b9150508351615b16818360208801614ba5565b627d5d7d60e81b91019081526003019695505050505050565b60208082526019908201527f416c6c20746f6b656e73206d75737420626520756e6971756500000000000000604082015260600190565b6020808252601e908201527f4e6f7420746865206f776e6572206f66206c6f636b656420746f6b656e730000604082015260600190565b60208082526017908201527f43616e6e6f74206c6f636b20484f4d4520746f6b656e73000000000000000000604082015260600190565b805163ffffffff81168114610e2557600080fd5b600060208284031215615bfa57600080fd5b61332682615bd4565b600060208284031215615c1557600080fd5b5051919050565b600060208284031215615c2e57600080fd5b815161332681614f4b565b6001600160401b03818116838216028082169190828114615c5c57615c5c615126565b505092915050565b600060608284031215615c7657600080fd5b82601f830112615c8557600080fd5b604051606081018181106001600160401b0382111715615ca757615ca7614cfa565b604052806060840185811115615cbc57600080fd5b845b8181101561431b57615ccf81615bd4565b835260209283019201615cbe565b6001600160401b0382811682821603908082111561531457615314615126565b600081615d0c57615d0c615126565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615d4790830184614bc9565b9695505050505050565b600060208284031215615d6357600080fd5b815161332681614b5956fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212207e8719dddf4c7e650624f78a0898675bfce1bf6e984a986c2a6b9ae7e4a6f14464736f6c63430008110033

Deployed Bytecode

0x6080604052600436106103905760003560e01c8063715018a6116101dc578063c1bd8cf911610102578063e378a027116100a0578063f4f3b2001161006f578063f4f3b20014610c08578063fb59417414610c28578063fb6c565414610c3d578063fc5e7d4e14610c5d57600080fd5b8063e378a02714610b88578063e985e9c514610ba8578063ead8d95414610bc8578063f2fde38b14610be857600080fd5b8063d3bd8f92116100dc578063d3bd8f9214610b28578063d3f1a06014610b3d578063d5abeb0114610b52578063de2fe9dd14610b6857600080fd5b8063c1bd8cf914610ada578063c5dd60e114610af0578063c87b56dd14610b0857600080fd5b806395d89b411161017a578063ad08454d11610149578063ad08454d14610a49578063b88d4fde14610a5f578063b9c4d9fb14610a7f578063bb3bafd614610aac57600080fd5b806395d89b41146109e15780639ae95083146109f6578063a0712d6814610a16578063a22cb46514610a2957600080fd5b80638170b2e6116101b65780638170b2e6146108d95780638a80effd146109835780638d2d4198146109a35780638da5cb5b146109c357600080fd5b8063715018a61461089957806375369546146108ae5780637a0b45aa146108c457600080fd5b806341f43434116102c15780636352211e1161025f5780636914db601161022e5780636914db60146107955780636c0360eb146108445780636c2f5acd1461085957806370a082311461087957600080fd5b80636352211e1461070257806363b8a7cb1461072257806365216a411461075a5780636817c76c1461077a57600080fd5b806354c0d20e1161029b57806354c0d20e146106a157806355f804b3146106b75780635c9fc98b146106d7578063629266fe146106ec57600080fd5b806341f43434146105be57806342842e0e146105e0578063500e68e91461060057600080fd5b806323b872dd1161032e578063344c1f7811610308578063344c1f78146105535780633ccfd60b146105735780633f92e76014610588578063405f25651461059e57600080fd5b806323b872dd146104df5780632a55205a146104ff57806332c6e23a1461053e57600080fd5b8063081812fc1161036a578063081812fc14610435578063095ea7b31461046d5780630ebd4c7f1461048f57806318160ddd146104bc57600080fd5b806301ffc9a71461039c578063047aa331146103d157806306fdde031461041357600080fd5b3661039757005b600080fd5b3480156103a857600080fd5b506103bc6103b7366004614b6f565b610c7d565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506104016103ec366004614b8c565b60146020526000908152604090205460ff1681565b60405160ff90911681526020016103c8565b34801561041f57600080fd5b50610428610cdf565b6040516103c89190614bf5565b34801561044157600080fd5b50610455610450366004614b8c565b610d71565b6040516001600160a01b0390911681526020016103c8565b34801561047957600080fd5b5061048d610488366004614c1d565b610db5565b005b34801561049b57600080fd5b506104af6104aa366004614b8c565b610dce565b6040516103c89190614c84565b3480156104c857600080fd5b50600154600054035b6040519081526020016103c8565b3480156104eb57600080fd5b5061048d6104fa366004614c97565b610e2a565b34801561050b57600080fd5b5061051f61051a366004614cd8565b610e55565b604080516001600160a01b0390931683526020830191909152016103c8565b34801561054a57600080fd5b50610428610e8f565b34801561055f57600080fd5b5061048d61056e366004614d97565b610f1d565b34801561057f57600080fd5b5061048d610f60565b34801561059457600080fd5b506104d160115481565b3480156105aa57600080fd5b5061048d6105b9366004614b8c565b611045565b3480156105ca57600080fd5b506104556daaeb6d7670e522a718067333cd4e81565b3480156105ec57600080fd5b5061048d6105fb366004614c97565b61150c565b34801561060c57600080fd5b5061066561061b366004614ddf565b60166020526000908152604090205463ffffffff80821691600160201b81048216916001600160401b03600160401b8304811692600160801b810490921691600160a01b90041685565b6040805163ffffffff968716815294861660208601526001600160401b039384169085015293166060830152909116608082015260a0016103c8565b3480156106ad57600080fd5b506104d160185481565b3480156106c357600080fd5b5061048d6106d2366004614d97565b611531565b3480156106e357600080fd5b50610428611567565b3480156106f857600080fd5b506104d160175481565b34801561070e57600080fd5b5061045561071d366004614b8c565b611574565b34801561072e57600080fd5b5061074261073d366004614b8c565b611586565b6040516001600160401b0390911681526020016103c8565b34801561076657600080fd5b5061048d610775366004614e8a565b6115bc565b34801561078657600080fd5b506104d1668e1bc9bf04000081565b3480156107a157600080fd5b506108016107b0366004614b8c565b60126020526000908152604090205460ff8082169161010081049091169061ffff620100008204811691600160201b810490911690600160301b810460030b9063ffffffff600160501b9091041686565b6040805160ff978816815296909516602087015261ffff938416948601949094529116606084015260030b608083015263ffffffff1660a082015260c0016103c8565b34801561085057600080fd5b50610428611c11565b34801561086557600080fd5b5061048d610874366004614c1d565b611c1e565b34801561088557600080fd5b506104d1610894366004614ddf565b611c6e565b3480156108a557600080fd5b5061048d611cbc565b3480156108ba57600080fd5b506104d160155481565b3480156108d057600080fd5b50610428611cf2565b3480156108e557600080fd5b506109426108f4366004614b8c565b60136020526000908152604090205461ffff808216916201000081049091169063ffffffff600160201b8204811691600160401b8104821691600160601b8204811691600160801b90041686565b6040805161ffff978816815296909516602087015263ffffffff938416948601949094529082166060850152811660808401521660a082015260c0016103c8565b34801561098f57600080fd5b5061048d61099e366004614b8c565b611cff565b3480156109af57600080fd5b5061048d6109be366004614d97565b611d72565b3480156109cf57600080fd5b506008546001600160a01b0316610455565b3480156109ed57600080fd5b50610428611da8565b348015610a0257600080fd5b5061048d610a11366004614d97565b611db7565b61048d610a24366004614b8c565b611ded565b348015610a3557600080fd5b5061048d610a44366004614f59565b6124cb565b348015610a5557600080fd5b506104d160105481565b348015610a6b57600080fd5b5061048d610a7a366004614f92565b6124df565b348015610a8b57600080fd5b50610a9f610a9a366004614b8c565b61250c565b6040516103c8919061504a565b348015610ab857600080fd5b50610acc610ac7366004614b8c565b612585565b6040516103c892919061505d565b348015610ae657600080fd5b506104d1600f5481565b348015610afc57600080fd5b50610742630f73140081565b348015610b1457600080fd5b50610428610b23366004614b8c565b612639565b348015610b3457600080fd5b5061048d612afe565b348015610b4957600080fd5b50610428612b2f565b348015610b5e57600080fd5b506104d16103e781565b348015610b7457600080fd5b50600954610455906001600160a01b031681565b348015610b9457600080fd5b5061048d610ba3366004615082565b612b3c565b348015610bb457600080fd5b506103bc610bc33660046150ae565b612f7e565b348015610bd457600080fd5b5061048d610be3366004614d97565b612fac565b348015610bf457600080fd5b5061048d610c03366004614ddf565b612fe2565b348015610c1457600080fd5b5061048d610c23366004614ddf565b61307a565b348015610c3457600080fd5b5061048d6131f2565b348015610c4957600080fd5b50610742610c58366004614ddf565b613228565b348015610c6957600080fd5b5061048d610c78366004614ddf565b613398565b6000610c88826133e4565b80610ca357506001600160e01b03198216635d9dd7eb60e11b145b80610cbe57506001600160e01b0319821663152a902d60e11b145b80610cd957506001600160e01b03198216632dde656160e21b145b92915050565b606060028054610cee906150dc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1a906150dc565b8015610d675780601f10610d3c57610100808354040283529160200191610d67565b820191906000526020600020905b815481529060010190602001808311610d4a57829003601f168201915b5050505050905090565b6000610d7c82613434565b610d99576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81610dbf8161345f565b610dc98383613518565b505050565b605b546060906001600160a01b031615610e25576040805160018082528183019092529060208083019080368337019050509050605a5481600081518110610e1857610e18615110565b6020026020010181815250505b919050565b826001600160a01b0381163314610e4457610e443361345f565b610e4f8484846135a0565b50505050565b605b54605a5460009182916001600160a01b039091169061271090610e7a908661513c565b610e849190615169565b915091509250929050565b600c8054610e9c906150dc565b80601f0160208091040260200160405190810160405280929190818152602001828054610ec8906150dc565b8015610f155780601f10610eea57610100808354040283529160200191610f15565b820191906000526020600020905b815481529060010190602001808311610ef857829003601f168201915b505050505081565b6008546001600160a01b03163314610f505760405162461bcd60e51b8152600401610f479061517d565b60405180910390fd5b600b610f5c8282615200565b5050565b6008546001600160a01b03163314610f8a5760405162461bcd60e51b8152600401610f479061517d565b605b546001600160a01b0316610fe25760405162461bcd60e51b815260206004820152601a60248201527f4d7573742073657420726f79616c747920726563697069656e740000000000006044820152606401610f47565b605b546040516000916001600160a01b03169047908381818185875af1925050503d806000811461102f576040519150601f19603f3d011682016040523d82523d6000602084013e611034565b606091505b505090508061104257600080fd5b50565b61104e81611574565b6001600160a01b0316336001600160a01b0316146110a05760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420796f757220746f6b656e2160881b6044820152606401610f47565b6000601754116110fe5760405162461bcd60e51b8152602060048201526024808201527f416c6c20756c74696d61746520706c616e6574732068617665206265656e20666044820152631bdd5b9960e21b6064820152608401610f47565b600061110933613228565b9050630f7314006001600160401b038216116111675760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f75676820616363756d756c617465642073636f7265000000006044820152606401610f47565b60008281526014602052604090205460ff16156111c65760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206275726e20484f4d4520746f6b656e730000000000000000006044820152606401610f47565b60008281526012602052604090205460ff610100909104166001146112445760405162461bcd60e51b815260206004820152602e60248201527f4e65656420746f20737570706c79206c6f636b656420746f6b656e20746f206d60448201526d34b73a102427a6a2903a37b5b2b760911b6064820152608401610f47565b60004442601954600f5461125891906152bf565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c905060006017548261ffff166112a191906152d2565b905060006112b78263ffffffff166017546135ab565b6040805160c08101825261ffff83811682526019541660208083019190915263ffffffff428181168486015288831c82166060850181905289861c8316608086018190523360009081526016909552958420549697509592939260a0840192611322929116906152e6565b63ffffffff90811690915260008a815260136020908152604080832085518154878501518885015160608a015160808b015160a08c015161ffff96871663ffffffff1990961695909517620100009690941695909502929092176bffffffffffffffff000000001916600160201b918a16919091026bffffffff0000000000000000191617600160401b918916919091021767ffffffffffffffff60601b1916600160601b9288169290920263ffffffff60801b191691909117600160801b9190961602949094179093556014905220805460ff1916600117905590506114093389613643565b600088815260126020526040812080546dffffffffffffffffffffffffffff19169055601780546001929061143f9084906152e6565b9250508190555060016019600082825461145991906152bf565b90915550506017546000036114d557600960009054906101000a90046001600160a01b03166001600160a01b0316631cf1034f6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156114b857600080fd5b505af11580156114cc573d6000803e3d6000fd5b50504260185550505b604051339089907fe59ea23cb4e37386604d84472528a25ed3563d61dcad97e034f0bd140484d9f890600090a35050505050505050565b826001600160a01b0381163314611526576115263361345f565b610e4f848484613947565b6008546001600160a01b0316331461155b5760405162461bcd60e51b8152600401610f479061517d565b600a610f5c8282615200565b600d8054610e9c906150dc565b600061157f82613962565b5192915050565b60006115936014836152e6565b91506115a666038d7ea4c680008361513c565b9150610cd96115b76115b784613a7c565b613a7c565b6008546001600160a01b031633146115e65760405162461bcd60e51b8152600401610f479061517d565b80518251146116375760405162461bcd60e51b815260206004820152601a60248201527f6172726179206c656e677468732073686f756c64206d617463680000000000006044820152606401610f47565b600f54600090815b8451811015611b8f576000805b85838151811061165e5761165e615110565b602002602001015181101561195f57600061167b856103e76152e6565b6040805144602080830191909152428284015260608083018a9052835180840390910181526080909201909252805191012090915060006116c08361ffff84166152d2565b905060006116d48263ffffffff1685613acf565b905060006116e182613b64565b601b549091506000906116ff9060ff1661ffff601088901c166152d2565b9050601a8260ff166017811061171757611717615110565b60208104919091015461173691601f166101000a900460ff16826152f9565b9050600061a8c06117546201518063ffffffff60208a901c166152d2565b61175e919061531b565b601c8460ff166017811061177457611774615110565b60088104919091015461179692916007166004026101000a900460030b61533b565b905060006014601f8560ff16601781106117b2576117b2615110565b601091828204019190066002029054906101000a900461ffff1661ffff1663ffffffff16901b63ffffffff16604088901c620fffff1617905060006040518060c001604052808660ff168152602001600060ff1681526020018561ffff1681526020018761ffff1681526020018460030b81526020018363ffffffff16815250905080601260008f815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548161ffff021916908361ffff16021790555060608201518160000160046101000a81548161ffff021916908361ffff16021790555060808201518160000160066101000a81548163ffffffff021916908360030b63ffffffff16021790555060a082015181600001600a6101000a81548163ffffffff021916908363ffffffff1602179055509050508361ffff168b6119349190615362565b9a508c61194081615382565b9d5050505050505050505050808061195790615382565b91505061164c565b5084828151811061197257611972615110565b60200260200101518461198591906152bf565b93506119c386838151811061199c5761199c615110565b60200260200101518684815181106119b6576119b6615110565b6020026020010151613b96565b6000601660008885815181106119db576119db615110565b6020908102919091018101516001600160a01b03168252818101929092526040908101600020815160a081018352905463ffffffff808216808452600160201b83048216958401959095526001600160401b03600160401b8304811694840194909452600160801b8204166060830152600160a01b90049091166080820152915015611a88576000611a6c82613bb0565b63ffffffff421660608401526001600160401b03166080830152505b8181604001818151611a9a9190615362565b6001600160401b0316905250865181906016906000908a9087908110611ac257611ac2615110565b6020908102919091018101516001600160a01b03168252818101929092526040908101600020835181549385015192850151606086015160809096015163ffffffff92831667ffffffffffffffff1990961695909517600160201b9483169490940293909317600160401b600160a01b031916600160401b6001600160401b039485160263ffffffff60801b191617600160801b91909516029390931767ffffffffffffffff60a01b1916600160a01b919092160217905550819050611b8781615382565b91505061163f565b50601054821115611bdb5760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610f47565b8160106000828254611bed91906152e6565b9250508190555081600f6000828254611c0691906152bf565b909155505050505050565b600a8054610e9c906150dc565b6008546001600160a01b03163314611c485760405162461bcd60e51b8152600401610f479061517d565b605b80546001600160a01b0319166001600160a01b039390931692909217909155605a55565b60006001600160a01b038216611c97576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b03163314611ce65760405162461bcd60e51b8152600401610f479061517d565b611cf06000613c54565b565b600b8054610e9c906150dc565b6008546001600160a01b03163314611d295760405162461bcd60e51b8152600401610f479061517d565b60115415611d6d5760405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e481858dd1a5d985d1959607a1b6044820152606401610f47565b601155565b6008546001600160a01b03163314611d9c5760405162461bcd60e51b8152600401610f479061517d565b600c610f5c8282615200565b606060038054610cee906150dc565b6008546001600160a01b03163314611de15760405162461bcd60e51b8152600401610f479061517d565b600e610f5c8282615200565b333b15611e4b5760405162461bcd60e51b815260206004820152602660248201527f53686f756c64206e6f742062652063616c6c65642066726f6d206120636f6e7460448201526572616374212160d01b6064820152608401610f47565b601154600003611e9d5760405162461bcd60e51b815260206004820152601b60248201527f7075626c6963206d696e742064617465206973206e6f742073657400000000006044820152606401610f47565b601154421015611eef5760405162461bcd60e51b815260206004820152601960248201527f7761697420666f72207075626c6963206d696e742074696d65000000000000006044820152606401610f47565b60008111611f3f5760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401610f47565b600b8110611f8f5760405162461bcd60e51b815260206004820152601a60248201527f6d6178206d696e7420706572207478206973203130204e4654730000000000006044820152606401610f47565b6103e781601054600f54611fa391906152bf565b611fad91906152bf565b1115611ff45760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610f47565b612005668e1bc9bf0400008261513c565b3410156120495760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610f47565b60008082600f5461205a91906152bf565b600f549091505b8181101561234e576000612077826103e76152e6565b604080514460208083019190915242828401526060808301879052835180840390910181526080909201909252805191012090915060006120bc8361ffff84166152d2565b905060006120d08263ffffffff1685613acf565b905060006120dd82613b64565b601b549091506000906120fb9060ff1661ffff601088901c166152d2565b9050601a8260ff166017811061211357612113615110565b60208104919091015461213291601f166101000a900460ff16826152f9565b9050600061a8c06121506201518063ffffffff60208a901c166152d2565b61215a919061531b565b601c8460ff166017811061217057612170615110565b60088104919091015461219292916007166004026101000a900460030b61533b565b905060006014601f8560ff16601781106121ae576121ae615110565b601091828204019190066002029054906101000a900461ffff1661ffff1663ffffffff16901b63ffffffff16604088901c620fffff1617905060006040518060c001604052808660ff168152602001600060ff1681526020018561ffff1681526020018761ffff1681526020018460030b81526020018363ffffffff16815250905080601260008c815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548161ffff021916908361ffff16021790555060608201518160000160046101000a81548161ffff021916908361ffff16021790555060808201518160000160066101000a81548163ffffffff021916908360030b63ffffffff16021790555060a082015181600001600a6101000a81548163ffffffff021916908363ffffffff1602179055509050508361ffff168c6123309190615362565b9b50505050505050505050808061234690615382565b915050612061565b5082600f600082825461236191906152bf565b909155505033600090815260166020908152604091829020825160a081018452905463ffffffff808216808452600160201b83048216948401949094526001600160401b03600160401b8304811695840195909552600160801b8204166060830152600160a01b90049092166080830152156123fe5760006123e282613bb0565b63ffffffff421660608401526001600160401b03166080830152505b82816040018181516124109190615362565b6001600160401b0390811690915233600081815260166020908152604091829020865181549288015193880151606089015160808a01518816600160a01b0267ffffffffffffffff60a01b1963ffffffff928316600160801b0263ffffffff60801b1994909a16600160401b0293909316600160401b600160a01b0319978316600160201b0267ffffffffffffffff199097169290941691909117949094179490941617949094179190911617909155610e4f915085613b96565b816124d58161345f565b610dc98383613ca6565b836001600160a01b03811633146124f9576124f93361345f565b61250585858585613d3b565b5050505050565b605b546060906001600160a01b031615610e255760408051600180825281830190925290602080830190803683375050605b5482519293506001600160a01b03169183915060009061256057612560615110565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b605b5460609081906001600160a01b0316156126345760408051600180825281830190925290602080830190803683375050605b5482519294506001600160a01b0316918491506000906125db576125db615110565b6001600160a01b0392909216602092830291909101820152604080516001808252818301909252918281019080368337019050509050605a548160008151811061262757612627615110565b6020026020010181815250505b915091565b606061264482613434565b61266157604051630a14c4b560e41b815260040160405180910390fd5b60008281526014602052604081205460ff16900361293b576000828152601260209081526040822054909190600160301b900460030b8113156126ce57600084815260126020526040902054602d92506126c790600160301b900460030b60001961539b565b90506126e9565b50600083815260126020526040902054600160301b900460030b5b60008481526012602052604090205460ff610100909104166001148015612711575060175415155b1561284a57600084815260126020526040902054606090600a9061273f90600160201b900461ffff16613d86565b600c61274c886004613e18565b60008981526012602052604090205460419060ff166017811061277157612771615110565b0160405160200161278695949392919061542e565b60408051808303601f1901815291815260008781526012602052205490915081906127bf90600160501b900463ffffffff166004613eec565b6000878152601260205260409020546127e39062010000900461ffff166001614087565b856127f38663ffffffff16613d86565b604051602001612807959493929190615678565b6040516020818303038152906040529050612821816141d4565b6040516020016128319190615749565b6040516020818303038152906040529350505050919050565b600084815260126020526040902054606090600a9061287390600160201b900461ffff16613d86565b600c612880886004613e18565b60008981526012602052604090205460419060ff16601781106128a5576128a5615110565b016040516020016128ba95949392919061542e565b60408051808303601f1901815291815260008781526012602052205490915081906128f390600160501b900463ffffffff166004613eec565b6000878152601260205260409020546129179062010000900461ffff166001614087565b856129278663ffffffff16613d86565b60405160200161280795949392919061578e565b60008281526013602052604081205460609190600b9061295e9061ffff16613d86565b60405160200161296f9291906157d2565b604051602081830303815290604052905080600d82600e60405160200161299994939291906157f7565b60408051808303601f190181529181526000868152601360205220549092508291506129d09062010000900461ffff166002613e18565b6000858152601360205260409020546129f790600160401b900463ffffffff166004613eec565b604051602001612a099392919061593a565b60408051808303601f190181529181526000858152601360205220549091508190612a4290600160601b900463ffffffff166004613eec565b600085815260136020526040902054612a8590603c90612a70908290600160801b900463ffffffff16615a24565b612a7a9190615a24565b63ffffffff16613d86565b600086815260136020526040902054612aaa90600160201b900463ffffffff16613d86565b604051602001612abd9493929190615a47565b6040516020818303038152906040529050612ad7816141d4565b604051602001612ae79190615749565b604051602081830303815290604052915050919050565b6008546001600160a01b03163314612b285760405162461bcd60e51b8152600401610f479061517d565b6000601155565b600e8054610e9c906150dc565b601554600003612b9c5760405162461bcd60e51b815260206004820152602560248201527f53636f726520616363756d756c6174696f6e206861736e27742073746172746560448201526419081e595d60da1b6064820152608401610f47565b818303612bbb5760405162461bcd60e51b8152600401610f4790615b2f565b808203612bda5760405162461bcd60e51b8152600401610f4790615b2f565b808303612bf95760405162461bcd60e51b8152600401610f4790615b2f565b33612c0384611574565b6001600160a01b031614612c295760405162461bcd60e51b8152600401610f4790615b66565b33612c3383611574565b6001600160a01b031614612c595760405162461bcd60e51b8152600401610f4790615b66565b33612c6382611574565b6001600160a01b031614612c895760405162461bcd60e51b8152600401610f4790615b66565b60008381526014602052604090205460ff1615612cb85760405162461bcd60e51b8152600401610f4790615b9d565b60008281526014602052604090205460ff1615612ce75760405162461bcd60e51b8152600401610f4790615b9d565b60008181526014602052604090205460ff1615612d165760405162461bcd60e51b8152600401610f4790615b9d565b33600090815260166020908152604091829020825160a081018452905463ffffffff808216808452600160201b83048216948401949094526001600160401b03600160401b8304811695840195909552600160801b8204166060830152600160a01b9004909216608083015215612dc15760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481cdd185c9d1959608a1b6044820152606401610f47565b60095460405163643183bf60e01b81526004810186905260248101859052604481018490523360648201526000916001600160a01b03169063643183bf906084016020604051808303816000875af1158015612e21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e459190615be8565b4263ffffffff90811684528181166020808601918252336000818152601683526040808220895181549651838c01516060808e015160808f0151948c1667ffffffffffffffff19909b169a909a17600160201b938c169390930292909217600160401b600160a01b031916600160401b6001600160401b039283160263ffffffff60801b191617600160801b99909a16989098029890981767ffffffffffffffff60a01b1916600160a01b9790911696909602959095179094558a815260128352838120805461010061ff001991821681179092558b835285832080548216831790558a835291859020805490921617905582518a8152918201899052918101879052929350917f42c734f659ba87ff53f9b85b58ef45d843011edc136db3d7540bba091955411e910160405180910390a25050505050565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6008546001600160a01b03163314612fd65760405162461bcd60e51b8152600401610f479061517d565b600d610f5c8282615200565b6008546001600160a01b0316331461300c5760405162461bcd60e51b8152600401610f479061517d565b6001600160a01b0381166130715760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f47565b61104281613c54565b6008546001600160a01b031633146130a45760405162461bcd60e51b8152600401610f479061517d565b605b546001600160a01b03166130fc5760405162461bcd60e51b815260206004820152601a60248201527f4d7573742073657420726f79616c747920726563697069656e740000000000006044820152606401610f47565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015613145573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131699190615c03565b605b5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529192506000919084169063a9059cbb906044016020604051808303816000875af11580156131c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e69190615c1c565b905080610e4f57600080fd5b6008546001600160a01b0316331461321c5760405162461bcd60e51b8152600401610f479061517d565b63ffffffff4216601555565b600060155460000361323c57506000919050565b6001600160a01b03821660009081526016602052604081205463ffffffff16900361326957506000919050565b601754429060000361327a57506018545b6001600160a01b038316600090815260166020526040902054600160801b900463ffffffff161561332d576001600160a01b0383166000908152601660205260409020546001600160401b03600160a01b82048116916132e291600160401b90910416611586565b6001600160a01b03851660009081526016602052604090205461331290600160801b900463ffffffff16846152e6565b61331c9190615c39565b6133269190615362565b9392505050565b6001600160a01b03831660009081526016602052604090205461335f90600160401b90046001600160401b0316611586565b6001600160a01b0384166000908152601660205260409020546133889063ffffffff16836152e6565b6133269190615c39565b50919050565b6008546001600160a01b031633146133c25760405162461bcd60e51b8152600401610f479061517d565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061341557506001600160e01b03198216635b5e139f60e01b145b80610cd957506301ffc9a760e01b6001600160e01b0319831614610cd9565b6000805482108015610cd9575050600090815260046020526040902054600160e01b900460ff161590565b6daaeb6d7670e522a718067333cd4e3b1561104257604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156134cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f09190615c1c565b61104257604051633b79c77360e21b81526001600160a01b0382166004820152602401610f47565b600061352382611574565b9050806001600160a01b0316836001600160a01b0316036135575760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061357757506135758133612f7e565b155b15613595576040516367d9dca160e11b815260040160405180910390fd5b610dc9838383614326565b610dc9838383614382565b600082815260596020526040812054818181036135c95750836135cc565b50805b60006135d96001866152e6565b6000818152605960205260409020549091508682146136225780600003613610576000878152605960205260409020829055613622565b60008781526059602052604090208190555b8015613638576000828152605960205260408120555b509095945050505050565b6001600160a01b0382166000908152601660209081526040808320815160a08082018452915463ffffffff8082168352600160201b8083048216848801526001600160401b03600160401b8404811685880152600160801b84048316606080870191909152600160a01b909404166080808601919091528989526012885297869020865160c081018852905460ff808216835261010082041698820189905261ffff62010000820481169883019890985291820490961692860192909252600160301b820460030b96850196909652600160501b90049094169082015290600103613834576020820151600954604051630852cd8d60e31b815263ffffffff831660048201526000916001600160a01b0316906342966c68906024016060604051808303816000875af115801561377e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137a29190615c64565b805163ffffffff9081166000908152601260209081526040808320805461ff001990811690915582860151851684528184208054821690558186015190941683528083208054909416909355818852870181905260608701819052608087015284810151908601805192935061ffff90911691613820908390615cdd565b6001600160401b031690525061388f915050565b815163ffffffff161561386857600061384c83613bb0565b63ffffffff421660608501526001600160401b03166080840152505b806040015161ffff16826040018181516138829190615cdd565b6001600160401b03169052505b506001600160a01b0392909216600090815260166020908152604091829020845181549286015193860151606087015160809097015163ffffffff92831667ffffffffffffffff1990951694909417600160201b9583169590950294909417600160401b600160a01b031916600160401b6001600160401b039586160263ffffffff60801b191617600160801b91909616029490941767ffffffffffffffff60a01b1916600160a01b92909116919091021790915550565b610dc9838383604051806020016040528060008152506124df565b604080516060810182526000808252602082018190529181019190915281600054811015613a6357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290613a615780516001600160a01b0316156139f8579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215613a5c579392505050565b6139f8565b505b604051636f96cda160e11b815260040160405180910390fd5b6000806002613a8c8460016152bf565b613a969190615169565b90508291505b8181101561339257905080600281613ab48186615169565b613abe91906152bf565b613ac89190615169565b9050613a9c565b60008281526058602052604081205481818103613aed575083613af0565b50805b6000613afd6001866152e6565b600081815260586020526040902054909150868214613b465780600003613b34576000878152605860205260409020829055613b46565b60008781526058602052604090208190555b80156136385750600090815260586020526040812055949350505050565b60006021826103e78110613b7a57613b7a615110565b602081049091015460ff601f9092166101000a90041692915050565b610f5c828260405180602001604052806000815250614575565b6000601554600003613bc457506000919050565b815163ffffffff16600003613bdb57506000919050565b6017544290600003613bec57506018545b606083015163ffffffff1615613c2c578260800151613c1784604001516001600160401b0316611586565b60608501516133129063ffffffff16846152e6565b613c4283604001516001600160401b0316611586565b83516133889063ffffffff16836152e6565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b336001600160a01b03831603613ccf5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b613d46848484614382565b6001600160a01b0383163b15158015613d685750613d6684848484614582565b155b15610e4f576040516368d2bf6b60e11b815260040160405180910390fd5b60606000613d938361466e565b60010190506000816001600160401b03811115613db257613db2614cfa565b6040519080825280601f01601f191660200182016040528015613ddc576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084613de657509392505050565b60606000826001600160401b03811115613e3457613e34614cfa565b6040519080825280601f01601f191660200182016040528015613e5e576020820181803683370190505b5090508281016020015b60001993840193016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945083613e68578415613ee45760405162461bcd60e51b815260206004820152601c60248201527f537472696e67733a206c656e67746820696e73756666696369656e74000000006044820152606401610f47565b509392505050565b60606000613efb83600261513c565b613f069060026152bf565b6001600160401b03811115613f1d57613f1d614cfa565b6040519080825280601f01601f191660200182016040528015613f47576020820181803683370190505b509050600360fc1b81600081518110613f6257613f62615110565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613f9157613f91615110565b60200101906001600160f81b031916908160001a9053506000613fb584600261513c565b613fc09060016152bf565b90505b6001811115614038576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613ff457613ff4615110565b1a60f81b82828151811061400a5761400a615110565b60200101906001600160f81b031916908160001a90535060049490941c9361403181615cfd565b9050613fc3565b5083156133265760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610f47565b6060826000036140af57506040805180820190915260018152600360fc1b6020820152610cd9565b8260015b81156140d957806140c381615382565b91506140d29050600a83615169565b91506140b3565b6000816001600160401b038111156140f3576140f3614cfa565b6040519080825280601f01601f19166020018201604052801561411d576020820181803683370190505b5090505b85156141cb576141326001836152e6565b915084820361417757601760f91b81838151811061415257614152615110565b60200101906001600160f81b031916908160001a9053506141746001836152e6565b91505b614182600a876152d2565b61418d9060306152bf565b60f81b8183815181106141a2576141a2615110565b60200101906001600160f81b031916908160001a9053506141c4600a87615169565b9550614121565b95945050505050565b606081516000036141f357505060408051602081019091526000815290565b6000604051806060016040528060408152602001615d6f604091399050600060038451600261422291906152bf565b61422c9190615169565b61423790600461513c565b6001600160401b0381111561424e5761424e614cfa565b6040519080825280601f01601f191660200182016040528015614278576020820181803683370190505b509050600182016020820185865187015b808210156142e4576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250614289565b505060038651066001811461430057600281146143135761431b565b603d6001830353603d600283035361431b565b603d60018303535b509195945050505050565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061438d82613962565b9050836001600160a01b031681600001516001600160a01b0316146143c45760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806143e257506143e28533612f7e565b806143fd5750336143f284610d71565b6001600160a01b0316145b90508061441d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661444457604051633a954ecd60e21b815260040160405180910390fd5b61445060008487614326565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661452457600054821461452457805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46125058585856001614746565b610dc98383836001614984565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906145b7903390899088908890600401615d14565b6020604051808303816000875af19250505080156145f2575060408051601f3d908101601f191682019092526145ef91810190615d51565b60015b614650573d808015614620576040519150601f19603f3d011682016040523d82523d6000602084013e614625565b606091505b508051600003614648576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106146ad5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106146d9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106146f757662386f26fc10000830492506010015b6305f5e100831061470f576305f5e100830492506008015b612710831061472357612710830492506004015b60648310614735576064830492506002015b600a8310610cd95760010192915050565b6001600160a01b03841615610e4f5760175415610e4f5760008281526014602052604081205460ff169003610e4f5761477f8483613643565b600082815260126020908152604091829020825160c081018452905460ff80821683526101008204169282019290925261ffff620100008304811693820193909352600160201b82049092166060830152600160301b810460030b608083015263ffffffff600160501b9091041660a08201526001600160a01b03841615612505576001600160a01b038416600090815260166020908152604091829020825160a081018452905463ffffffff808216808452600160201b83048216948401949094526001600160401b03600160401b8304811695840195909552600160801b8204166060830152600160a01b90049092166080830152156148a257600061488682613bb0565b63ffffffff421660608401526001600160401b03166080830152505b816040015161ffff16816040018181516148bc9190615362565b6001600160401b039081169091526001600160a01b03871660009081526016602090815260409182902085518154928701519387015160608801516080909801518616600160a01b0267ffffffffffffffff60a01b1963ffffffff998a16600160801b0263ffffffff60801b1993909816600160401b0292909216600160401b600160a01b0319968a16600160201b0267ffffffffffffffff199096169990931698909817939093179390931692909217929092179190911692909217909155505050505050565b6000546001600160a01b0385166149ad57604051622e076360e81b815260040160405180910390fd5b836000036149ce5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015614a7a57506001600160a01b0387163b15155b15614b02575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4614acb6000888480600101955088614582565b614ae8576040516368d2bf6b60e11b815260040160405180910390fd5b808203614a80578260005414614afd57600080fd5b614b47565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203614b03575b50600090815561250590868387614746565b6001600160e01b03198116811461104257600080fd5b600060208284031215614b8157600080fd5b813561332681614b59565b600060208284031215614b9e57600080fd5b5035919050565b60005b83811015614bc0578181015183820152602001614ba8565b50506000910152565b60008151808452614be1816020860160208601614ba5565b601f01601f19169290920160200192915050565b6020815260006133266020830184614bc9565b6001600160a01b038116811461104257600080fd5b60008060408385031215614c3057600080fd5b8235614c3b81614c08565b946020939093013593505050565b600081518084526020808501945080840160005b83811015614c7957815187529582019590820190600101614c5d565b509495945050505050565b6020815260006133266020830184614c49565b600080600060608486031215614cac57600080fd5b8335614cb781614c08565b92506020840135614cc781614c08565b929592945050506040919091013590565b60008060408385031215614ceb57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614d3857614d38614cfa565b604052919050565b60006001600160401b03831115614d5957614d59614cfa565b614d6c601f8401601f1916602001614d10565b9050828152838383011115614d8057600080fd5b828260208301376000602084830101529392505050565b600060208284031215614da957600080fd5b81356001600160401b03811115614dbf57600080fd5b8201601f81018413614dd057600080fd5b61466684823560208401614d40565b600060208284031215614df157600080fd5b813561332681614c08565b60006001600160401b03821115614e1557614e15614cfa565b5060051b60200190565b600082601f830112614e3057600080fd5b81356020614e45614e4083614dfc565b614d10565b82815260059290921b84018101918181019086841115614e6457600080fd5b8286015b84811015614e7f5780358352918301918301614e68565b509695505050505050565b60008060408385031215614e9d57600080fd5b82356001600160401b0380821115614eb457600080fd5b818501915085601f830112614ec857600080fd5b81356020614ed8614e4083614dfc565b82815260059290921b84018101918181019089841115614ef757600080fd5b948201945b83861015614f1e578535614f0f81614c08565b82529482019490820190614efc565b96505086013592505080821115614f3457600080fd5b50614f4185828601614e1f565b9150509250929050565b801515811461104257600080fd5b60008060408385031215614f6c57600080fd5b8235614f7781614c08565b91506020830135614f8781614f4b565b809150509250929050565b60008060008060808587031215614fa857600080fd5b8435614fb381614c08565b93506020850135614fc381614c08565b92506040850135915060608501356001600160401b03811115614fe557600080fd5b8501601f81018713614ff657600080fd5b61500587823560208401614d40565b91505092959194509250565b600081518084526020808501945080840160005b83811015614c795781516001600160a01b031687529582019590820190600101615025565b6020815260006133266020830184615011565b6040815260006150706040830185615011565b82810360208401526141cb8185614c49565b60008060006060848603121561509757600080fd5b505081359360208301359350604090920135919050565b600080604083850312156150c157600080fd5b82356150cc81614c08565b91506020830135614f8781614c08565b600181811c908216806150f057607f821691505b60208210810361339257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610cd957610cd9615126565b634e487b7160e01b600052601260045260246000fd5b60008261517857615178615153565b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b601f821115610dc957600081815260208120601f850160051c810160208610156151d95750805b601f850160051c820191505b818110156151f8578281556001016151e5565b505050505050565b81516001600160401b0381111561521957615219614cfa565b61522d8161522784546150dc565b846151b2565b602080601f831160018114615262576000841561524a5750858301515b600019600386901b1c1916600185901b1785556151f8565b600085815260208120601f198616915b8281101561529157888601518255948401946001909101908401615272565b50858210156152af5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115610cd957610cd9615126565b6000826152e1576152e1615153565b500690565b81810381811115610cd957610cd9615126565b61ffff81811683821601908082111561531457615314615126565b5092915050565b818103600083128015838313168383128216171561531457615314615126565b600381810b9083900b01637fffffff8113637fffffff1982121715610cd957610cd9615126565b6001600160401b0381811683821601908082111561531457615314615126565b60006001820161539457615394615126565b5060010190565b60008260030b8260030b028060030b915080821461531457615314615126565b600081546153c8816150dc565b600182811680156153e057600181146153f557615424565b60ff1984168752821515830287019450615424565b8560005260208060002060005b8581101561541b5781548a820152908401908201615402565b50505082870194505b5050505092915050565b7f7b226465736372697074696f6e223a22576974682074686520757365206f662081527f334420616e64204149206d656469756d732c20484f584944206861732063617260208201527f6566756c6c7920637572617465642039393920756e697175652070696563657360408201527f2066726f6d20746865206c6174656e742073706163652c206372656174696e6760608201527f20612062656175746966756c20636f6c6c656374696f6e206f6620737065636960808201526f36b2b7399711161134b6b0b3b2911d1160811b60a0820152600061551160b08301886153bb565b8651615521818360208b01614ba5565b61552d818301886153bb565b91505073222c226e616d65223a2253706563696d656e202360601b8152845161555d816014840160208901614ba5565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a225460149290910191820152723cb832902730b6b29116113b30b63ab2911d1160691b60348201526155e76155b460478301866153bb565b7f227d2c7b2274726169745f74797065223a2253656564222c2276616c7565223a8152601160f91b602082015260210190565b98975050505050505050565b7f227d2c7b2274726169745f74797065223a22506f74656e746961222c2276616c8152633ab2911d60e11b602082015260240190565b7f7d2c7b22646973706c61795f74797065223a2264617465222c2274726169745f81527f74797065223a224372656174696f6e2044617465222c2276616c7565223a00006020820152603e0190565b6000865161568a818460208b01614ba5565b86519083019061569e818360208b01614ba5565b7f227d2c7b2274726169745f74797065223a224c6f636b6564222c2276616c7565910190815262111d1160e91b602082015265131bd8dad95960d21b60238201526156eb602982016155f3565b905085516156fd818360208a01614ba5565b615708818301615629565b91505060ff60f81b8560f81b168152835161572a816001840160208801614ba5565b627d5d7d60e81b60019290910191820152600401979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161578181601d850160208701614ba5565b91909101601d0192915050565b600086516157a0818460208b01614ba5565b8651908301906157b4818360208b01614ba5565b6157bf8183016155f3565b91505085516156fd818360208a01614ba5565b60006157de82856153bb565b83516157ee818360208801614ba5565b01949350505050565b7f7b226465736372697074696f6e223a22486f6d6520205c6e2a54686520706c6181527f636520776865726520796f75206c697665206f72206665656c20796f7520626560208201527f6c6f6e672e2a20205c6e20205c6e5468697320312f31207370656369616c207060408201527f696563652069732070617274206f662074686520484f4d455349434b20636f6c60608201527f6c656374696f6e2c20776974682069747320756e697175652067656e6572617460808201527f69766520736f756e642064657369676e2e222c22696d616765223a220000000060a0820152600085516158ed8160bc850160208a01614ba5565b6158fc60bc82850101876153bb565b7211161130b734b6b0ba34b7b72fbab936111d1160691b8152855190915061592b816013840160208901614ba5565b6155e7601382840101866153bb565b6000845161594c818460208901614ba5565b6f222c226e616d65223a22484f4d45202360801b9083019081528451615979816010840160208901614ba5565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a2245601092909101918201527f786f7368656c6c2053656564222c2276616c7565223a22000000000000000000603082015283516159dd816047840160208801614ba5565b7f227d2c7b2274726169745f74797065223a22536f6e69632053656564222c2276604792909101918201526630b63ab2911d1160c91b6067820152606e0195945050505050565b600063ffffffff80841680615a3b57615a3b615153565b92169190910492915050565b60008551615a59818460208a01614ba5565b855190830190615a6d818360208a01614ba5565b8082019150507f227d2c7b2274726169745f74797065223a2254797065204e616d65222c22766181527f6c7565223a22484f4d45227d2c7b2274726169745f74797065223a2253656c6660208201527f204372656174696f6e2054696d652028486f75727329222c2276616c7565223a60408201528451615af5816060840160208901614ba5565b615b03606082840101615629565b9150508351615b16818360208801614ba5565b627d5d7d60e81b91019081526003019695505050505050565b60208082526019908201527f416c6c20746f6b656e73206d75737420626520756e6971756500000000000000604082015260600190565b6020808252601e908201527f4e6f7420746865206f776e6572206f66206c6f636b656420746f6b656e730000604082015260600190565b60208082526017908201527f43616e6e6f74206c6f636b20484f4d4520746f6b656e73000000000000000000604082015260600190565b805163ffffffff81168114610e2557600080fd5b600060208284031215615bfa57600080fd5b61332682615bd4565b600060208284031215615c1557600080fd5b5051919050565b600060208284031215615c2e57600080fd5b815161332681614f4b565b6001600160401b03818116838216028082169190828114615c5c57615c5c615126565b505092915050565b600060608284031215615c7657600080fd5b82601f830112615c8557600080fd5b604051606081018181106001600160401b0382111715615ca757615ca7614cfa565b604052806060840185811115615cbc57600080fd5b845b8181101561431b57615ccf81615bd4565b835260209283019201615cbe565b6001600160401b0382811682821603908082111561531457615314615126565b600081615d0c57615d0c615126565b506000190190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615d4790830184614bc9565b9695505050505050565b600060208284031215615d6357600080fd5b815161332681614b5956fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212207e8719dddf4c7e650624f78a0898675bfce1bf6e984a986c2a6b9ae7e4a6f14464736f6c63430008110033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

the outcome of hoxid's explorationsas a collection formed from 999 unique specimens.hoxid uses 3d&ai mediums to explore and curate specimens fromimperfect places in the cosmos, uncovering their collective beauty.explore the vast latent space and discover the homesick universe.

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

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.