ETH Price: $2,926.80 (-0.89%)

Contract

0x16594aF3945fcb290C6cD9De998698a3216f6E1a
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Transaction Hash
Block
From
To
Set Approval For...284060172025-12-13 10:30:4943 days ago1765621849IN
0x16594aF3...3216f6E1a
0 ETH0.000000140.0012
Set Approval For...261869162025-10-23 1:40:4794 days ago1761183647IN
0x16594aF3...3216f6E1a
0 ETH00.00000038
Set Approval For...256658842025-10-11 0:13:03106 days ago1760141583IN
0x16594aF3...3216f6E1a
0 ETH0.000000060.00000437
Set Approval For...255676942025-10-08 17:40:03108 days ago1759945203IN
0x16594aF3...3216f6E1a
0 ETH00.0000031
Set Approval For...252163272025-09-30 14:27:49117 days ago1759242469IN
0x16594aF3...3216f6E1a
0 ETH00.00000228
Set Approval For...252161152025-09-30 14:20:45117 days ago1759242045IN
0x16594aF3...3216f6E1a
0 ETH00.00000212
Set Approval For...245551582025-09-15 7:08:51132 days ago1757920131IN
0x16594aF3...3216f6E1a
0 ETH0.000000020.00110237
Set Approval For...231048102025-08-12 17:23:55165 days ago1755019435IN
0x16594aF3...3216f6E1a
0 ETH0.000000010.00015659
Set Approval For...230123562025-08-10 14:02:07168 days ago1754834527IN
0x16594aF3...3216f6E1a
0 ETH0.000000020.00110394
Set Approval For...230123532025-08-10 14:02:01168 days ago1754834521IN
0x16594aF3...3216f6E1a
0 ETH0.000000020.00110395
Set Approval For...224023562025-07-27 11:08:47182 days ago1753614527IN
0x16594aF3...3216f6E1a
0 ETH0.000000020.00111364
Set Approval For...218195972025-07-13 23:23:29195 days ago1752449009IN
0x16594aF3...3216f6E1a
0 ETH0.000000050.0011629
Set Approval For...210279692025-06-25 15:35:53213 days ago1750865753IN
0x16594aF3...3216f6E1a
0 ETH0.000000040.00068167
Set Approval For...194658082025-05-20 11:43:51250 days ago1747741431IN
0x16594aF3...3216f6E1a
0 ETH00.00002328
Set Approval For...189177942025-05-07 19:16:43262 days ago1746645403IN
0x16594aF3...3216f6E1a
0 ETH0.000000020.00110685
Set Approval For...189177892025-05-07 19:16:33262 days ago1746645393IN
0x16594aF3...3216f6E1a
0 ETH0.000000020.00110686
Set Approval For...189177842025-05-07 19:16:23262 days ago1746645383IN
0x16594aF3...3216f6E1a
0 ETH0.000000020.00110691
Set Approval For...169655682025-03-23 14:42:31308 days ago1742740951IN
0x16594aF3...3216f6E1a
0 ETH00.000327
Set Approval For...161901182025-03-05 15:54:11325 days ago1741190051IN
0x16594aF3...3216f6E1a
0 ETH0.000000490.00008241
Set Approval For...153270752025-02-13 16:26:05345 days ago1739463965IN
0x16594aF3...3216f6E1a
0 ETH0.000001050.00021933
Check In150338962025-02-06 21:33:27352 days ago1738877607IN
0x16594aF3...3216f6E1a
0 ETH0.000000080.00222785
Check In150338922025-02-06 21:33:19352 days ago1738877599IN
0x16594aF3...3216f6E1a
0 ETH0.000000080.00222412
Check In150338892025-02-06 21:33:13352 days ago1738877593IN
0x16594aF3...3216f6E1a
0 ETH0.000000080.00222647
Check In150338842025-02-06 21:33:03352 days ago1738877583IN
0x16594aF3...3216f6E1a
0 ETH0.000000080.00222427
Check In150338812025-02-06 21:32:57352 days ago1738877577IN
0x16594aF3...3216f6E1a
0 ETH0.000000080.0022269
View all transactions

Latest 5 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
77722672024-08-22 19:19:09520 days ago1724354349
0x16594aF3...3216f6E1a
0.02088964 ETH
52418212024-06-25 5:30:57579 days ago1719293457
0x16594aF3...3216f6E1a
0.01222788 ETH
34010202024-05-13 14:50:55622 days ago1715611855
0x16594aF3...3216f6E1a
0.04362811 ETH
27915872024-04-29 12:16:29636 days ago1714392989
0x16594aF3...3216f6E1a
0.07203388 ETH
24959402024-04-22 16:01:35642 days ago1713801695
0x16594aF3...3216f6E1a
1.2821524 ETH

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BlastMiners

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 2000 runs

Other Settings:
paris EvmVersion
File 1 of 14 : BlastMiners.sol
// SPDX-License-Identifier: MIT
//

pragma solidity ^0.8.20;

import "./interfaces/IBlast.sol";
import "./interfaces/IBlastPoints.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

error NoRarity();
error PhaseClosed();
error NotAllowlisted();
error CollectionFull();
error InsufficientFunds();
error MintLimitReached();
error NotStakedOwner();
error AlreadyStaked();
error StakingClosed();
error MaxBoostReached();
error InvalidTimestamp();
error NeedMoreThanCurrentSupply();
error TooSoonForNextCheckIn();

contract BlastMiners is ERC721A, Ownable, IERC721Receiver, ReentrancyGuard {
    using Strings for uint256;

    struct PhaseProps {
        bool saleActive;
        bool whitelistActive;
        uint256 maxPerWallet;
        bytes32 root;
        uint256 price;
    }

    enum Phase {
        OG,
        ALLOWLIST,
        ALLOWLIST_FCFS,
        PUBLIC
    }

    enum Rarity {
        MiningAssistant, //60%
        SkilledWorker, //20%
        ShiftSupervisor, //10%
        Foreman, //5%
        MiningDirector, //3%
        King //2%
    }

    struct StakedTokens {
        address owner; // The current owner of the staked token.
        uint256 boosted; // A flag or value to indicate if the token has any boosts applied.
        uint256 checkIns; // The number of check-ins the token has.
        uint256 checkInTimestamp; // The timestamp of the last check-in.
    }

    // Variables for point calculation

    uint256 public constant POINTS_PER_INTERVAL = 100;
    uint256 public constant POINTS_INTERVAL = 5 minutes;
    uint256 public constant BOOST_PERCENT = 5;
    uint8 public constant MAX_BOOST_POSSIBLE = 5;
    uint public constant BOOST_TOKEN = 2;
    uint256 public constant BASE_WEEK_BOOST = 100;
    uint256 public constant BOOST_PER_WEEK = 2;
    uint256 public constant MAX_WEEK_BOOST = 120;
    uint public constant PUNISHMENT = 20;
    address public BLAST_GAS;
    address public BLAST_POINTS;
    uint256 public MAX_SUPPLY = 2222;
    uint256 public BOOST_PRICE = 0.001 ether;
    uint public FINAL_TIMESTAMP = 0;
    uint256 public LAST_SNAPSHOT = 0;

    event Minted(address indexed owner, uint256 quantity, Phase phase);
    event Airdropped(address indexed owner, uint256 quantity);
    event Staked(address indexed owner, uint256 indexed tokenId);
    event Unstaked(address indexed owner, uint256 indexed tokenId);
    event EtherReceived(address indexed sender, uint indexed amount);

    // variables for contract state
    Phase public activePhase = Phase.OG;
    string public description =
        "Blast Miners is an innovative NFT collection built on the BLAST L2 Chain. We are introducing a unique stake and farm system to collect Blast Developer Points (Blast Gold). With a limited edition of 2222 unique NFTs, We offer an opportunity to dive into the digital mining world.";
    uint256 public leaderboardIndex = 0;
    bool public stakingOpen = false;
    string public tokenImagePath;
    string public unrevealedImage;
    bool public traitsActivated = false;
    string public traitsMetadataPath;

    mapping(Phase => PhaseProps) public mintPhases;
    mapping(uint256 => mapping(address => uint256)) public leaderboards;
    mapping(uint256 tokenId => StakedTokens stakedTokens)
        public stakedTokenProps;
    mapping(address user => uint256[] stakedTokens) public stakedTokenIds;
    mapping(address user => mapping(Phase phase => uint256 mintedTokens))
        public mintedPerAddress;

    /**
     * @dev Constructor for the BlastMiner contract.
     * Initializes the NFT collection with specific properties for each mint phase,
     * configures automatic yield and claimable gas settings using the BLAST protocol,
     * and sets up the contract's ownership and metadata.
     *
     * @param ogData Properties for the OG mint phase, including price, mint limits, and whitelisting requirements.
     * @param alData Properties for the allowlist mint phase, including price, mint limits, and whitelisting requirements.
     * @param fcfsData Properties for the allowlist-fcfs mint phase, including price, mint limits, and whitelisting requirements.
     * @param publicData Properties for the public mint phase, including price and mint limits.
     */
    constructor(
        address blastGas,
        address blastPoints,
        PhaseProps memory ogData,
        PhaseProps memory alData,
        PhaseProps memory fcfsData,
        PhaseProps memory publicData
    ) ERC721A("BlastMiners", "BMS") Ownable(msg.sender) {
        BLAST_GAS = blastGas;
        BLAST_POINTS = blastPoints;
        IBlast(BLAST_GAS).configureAutomaticYield();
        IBlast(BLAST_GAS).configureClaimableGas();
        mintPhases[Phase.OG] = ogData;
        mintPhases[Phase.ALLOWLIST] = alData;
        mintPhases[Phase.ALLOWLIST_FCFS] = fcfsData;
        mintPhases[Phase.PUBLIC] = publicData;
    }

    // -------------------------------------------------------
    // Functons relevant for minting the tokens
    // -------------------------------------------------------

    /**
     * @dev Checks if an address is whitelisted for the current active minting phase using a merkle proof.
     *
     * @param _address The address to check for whitelist status.
     * @param _merkleProof The merkle proof that proves the address is part of the whitelist.
     * @return bool Returns true if the address is whitelisted for the current active phase; otherwise, false.
     */
    function isWhitelisted(
        address _address,
        bytes32[] calldata _merkleProof,
        Phase phaseToCheck
    ) public view returns (bool) {
        bytes32 leaf = keccak256(abi.encodePacked(_address));

        return
            MerkleProof.verify(
                _merkleProof,
                mintPhases[phaseToCheck].root,
                leaf
            );
    }

    /**
     * @dev Allows an user to mint new tokens if certain conditions are met.
     * Checks for mint limits, sale activity, whitelist status, and sufficient payment.
     * @param quantity The number of tokens to mint.
     * @param merkleProof The Merkle proof for whitelist verification, if necessary.
     */
    function mint(
        uint256 quantity,
        bytes32[] calldata merkleProof
    ) external payable {
        if (_totalMinted() + quantity > MAX_SUPPLY) revert CollectionFull();

        if (!mintPhases[activePhase].saleActive) revert PhaseClosed();
        if (
            mintPhases[activePhase].maxPerWallet <
            mintedPerAddress[msg.sender][activePhase] + quantity
        ) revert MintLimitReached();
        if (mintPhases[activePhase].whitelistActive) {
            if (!isWhitelisted(msg.sender, merkleProof, activePhase))
                revert NotAllowlisted();
        }

        uint256 price = mintPhases[activePhase].price * quantity;
        if (msg.value < price) revert InsufficientFunds();

        mintedPerAddress[msg.sender][activePhase] += quantity;
        if (_totalMinted() + quantity == MAX_SUPPLY) {
            FINAL_TIMESTAMP = block.timestamp;
        }

        _mint(msg.sender, quantity);
        emit Minted(msg.sender, quantity, activePhase);
    }

    /**
     * @dev Allows the contract owner to mint new tokens for a list of addresses.
     * Checks for mint limits and the total supply cap and if the final timestamp already set.
     * The last token has to be minted to gurantee the final timestamp can not be set by the team.
     * @param targets The addresses to mint tokens for.
     * @param quantity The number of tokens to mint for each address.
     */
    function airdrop(
        address[] calldata targets,
        uint256[] calldata quantity
    ) external payable onlyOwner {
        if (targets.length != quantity.length) revert("Invalid input");
        if (FINAL_TIMESTAMP != 0) revert CollectionFull();
        uint256 totalQuantity = 0;
        for (uint i = 0; i < quantity.length; i++) {
            totalQuantity += quantity[i];
        }
        if (_totalMinted() + totalQuantity > MAX_SUPPLY - 1)
            revert CollectionFull();

        for (uint i = 0; i < targets.length; i++) {
            _mint(targets[i], quantity[i]);
            emit Airdropped(targets[i], quantity[i]);
        }
    }

    /**
     * @dev Generates a tokenURI for a given tokenId. If the FINAL_TIMESTAMP is not set,
     * indicating that the rarity is not yet determined, it returns an unrevealed token URI.
     * Otherwise, it constructs a data URI with the token's metadata, including its rarity and points.
     *
     * @param tokenId The unique identifier of the token.
     * @return string A data URI representing the token's metadata.
     */
    function tokenURI(
        uint256 tokenId
    ) public view virtual override returns (string memory) {
        string memory image = FINAL_TIMESTAMP == 0
            ? unrevealedImage
            : string.concat(tokenImagePath, "/", tokenId.toString(), ".png");

        if (traitsActivated) {
            return
                string.concat(
                    traitsMetadataPath,
                    "/",
                    tokenId.toString(),
                    ".json"
                );
        }

        string memory rarity = getRarity(tokenId);
        string memory boosts = getBoosts(tokenId);

        bytes memory dataURI = abi.encodePacked(
            '{"name":"Blast Miner #',
            tokenId.toString(),
            '","description":"',
            description,
            '","image":"',
            image,
            '","attributes":[{"trait_type":"Type","value":"',
            rarity,
            '"},{"trait_type":"Boosts","value":"',
            boosts,
            '"}]}'
        );

        return
            string(
                abi.encodePacked(
                    "data:application/json;base64,",
                    Base64.encode(dataURI)
                )
            );
    }

    // -------------------------------------------------------
    // Functons relevant for calculating points
    // -------------------------------------------------------

    /**
     * @dev Calculates the rarity of a token based on its tokenId. The rarity is determined
     * only after all tokens have been minted, indicated by the FINAL_TIMESTAMP being set.
     * A pseudo-random number generated from the tokenId and FINAL_TIMESTAMP decides the rarity.
     *
     * @param tokenId The unique identifier of the token for which to calculate rarity.
     * @return Rarity The calculated rarity of the token as an enum value.
     */
    function calculateRarity(uint256 tokenId) public view returns (Rarity) {
        if (FINAL_TIMESTAMP == 0) revert NoRarity();

        uint256 rand = uint256(
            keccak256(abi.encodePacked(FINAL_TIMESTAMP, tokenId))
        ) % 100;
        Rarity rarity;

        if (rand < 60) {
            rarity = Rarity.MiningAssistant;
        } else if (rand < 80) {
            rarity = Rarity.SkilledWorker;
        } else if (rand < 90) {
            rarity = Rarity.ShiftSupervisor;
        } else if (rand < 95) {
            rarity = Rarity.Foreman;
        } else if (rand < 98) {
            rarity = Rarity.MiningDirector;
        } else {
            rarity = Rarity.King;
        }
        return rarity;
    }

    /**
     * @dev Converts the Rarity enum value to a human-readable string. This function is useful
     * for displaying the rarity type in a format that can be easily understood.
     *
     * @param rarity The rarity enum value to convert to a string.
     * @return string The string representation of the given rarity.
     */
    function rarityToString(
        Rarity rarity
    ) internal pure returns (string memory) {
        // Konvertiere die Enum-Werte in String-Namen
        if (rarity == Rarity.SkilledWorker) {
            return "Skilled Worker";
        } else if (rarity == Rarity.ShiftSupervisor) {
            return "Shift Supervisor";
        } else if (rarity == Rarity.Foreman) {
            return "Foreman";
        } else if (rarity == Rarity.MiningDirector) {
            return "Mining Director";
        } else if (rarity == Rarity.King) {
            return "King";
        } else {
            return "Mining Assistant";
        }
    }

    function getBoostFactor(uint256 weeksStaked) public pure returns (uint256) {
        if (weeksStaked == 0) return BASE_WEEK_BOOST;

        uint boost = weeksStaked * BOOST_PER_WEEK + BASE_WEEK_BOOST;
        return boost > MAX_WEEK_BOOST ? MAX_WEEK_BOOST : boost;
    }

    function getRarity(uint256 tokenId) public view returns (string memory) {
        return
            FINAL_TIMESTAMP == 0
                ? "unknown"
                : rarityToString(calculateRarity(tokenId));
    }

    function getBoosts(uint256 tokenId) public view returns (string memory) {
        return stakedTokenProps[tokenId].boosted.toString();
    }

    /**
     * @dev Increasing the boost of a token by 1
     * @param tokenId The ID of the token to be boosted.
     */
    function boostToken(uint tokenId) external payable {
        if (msg.value < BOOST_PRICE) revert InsufficientFunds();

        if (stakedTokenProps[tokenId].boosted >= MAX_BOOST_POSSIBLE)
            revert MaxBoostReached();
        stakedTokenProps[tokenId].boosted += 1;
    }

    /**
     * @dev Increasing the check in counter of a token by 1
     * @param tokenId The ID of the token to check in.
     */
    function checkIn(uint tokenId) external {
        address tokenOwner = stakedTokenProps[tokenId].owner;
        uint256 checkInDelta = block.timestamp -
            stakedTokenProps[tokenId].checkInTimestamp;

        if (tokenOwner != msg.sender) revert NotStakedOwner();
        if (checkInDelta < 1 days) revert TooSoonForNextCheckIn();

        // Reset counter if more than 2 days have passed or increment if it's a daily check-in
        if (checkInDelta > 2 days) {
            stakedTokenProps[tokenId].checkIns = 1;
        } else {
            stakedTokenProps[tokenId].checkIns += 1;
        }

        stakedTokenProps[tokenId].checkInTimestamp = block.timestamp;

        leaderboards[leaderboardIndex][tokenOwner] +=
            stakedTokenProps[tokenId].checkIns +
            POINTS_PER_INTERVAL;
    }

    /**
     * @dev Calculates the points accumulated by a staked token up to the current time or a specific timestamp.
     * Allows for flexibility in calculations, either real-time or based on historical data.
     *
     * @param tokenId The ID of the staked token.
     * @param targetTimestamp Optional. The specific timestamp for which to calculate the points. If 0, uses current block.timestamp.
     * @return The total points accumulated by the token.
     */
    function getTokenPoints(
        uint256 tokenId,
        uint256 targetTimestamp
    ) public view returns (uint256) {
        TokenOwnership memory ownership = _ownershipOf(tokenId);

        // Ensure the token is currently staked by this contract.
        if (ownership.addr != address(this)) return 0;

        StakedTokens memory stakedToken = stakedTokenProps[tokenId];

        // Use the current block timestamp if no target timestamp is provided.
        uint256 timestampToUse = targetTimestamp == 0
            ? block.timestamp
            : targetTimestamp;

        //Ensure the target timestamp is within the staking period.
        if (timestampToUse < ownership.startTimestamp)
            revert InvalidTimestamp();

        // Calculate the time staked and the number of weeks staked.
        uint256 timeStakedForWeekCalculation = timestampToUse -
            ownership.startTimestamp;

        uint256 weeksStaked = timeStakedForWeekCalculation / (1 weeks);

        uint relevantTimeStakedSinceSnapshot = LAST_SNAPSHOT <
            ownership.startTimestamp
            ? ownership.startTimestamp
            : LAST_SNAPSHOT;

        // Calculate the base points: 100 points per interval (5 minutes).
        uint256 basePoints = (timestampToUse -
            relevantTimeStakedSinceSnapshot) / POINTS_INTERVAL;

        // Calculate the boost effect: each boost increases points per interval by X%.
        uint256 boostMultiplier = 100 + (BOOST_TOKEN * stakedToken.boosted);

        // Calculate the duration effect based on the number of staked weeks.
        uint256 durationMultiplier = getBoostFactor(weeksStaked);

        // Adjusting the rarity multiplier
        uint256 rarityMultiplier = 100 +
            ((uint256(calculateRarity(tokenId))) * BOOST_PERCENT); // 5% per rarity level

        // Calculate the total points by applying the multipliers to the basePoints.
        uint256 totalMultiplier = (boostMultiplier *
            durationMultiplier *
            rarityMultiplier);
        uint256 totalPoints = (basePoints * totalMultiplier) / 1e6;

        return totalPoints;
    }

    /**
     * @notice Returns the total points accrued by a user. Includes points from currently staking tokens.
     */
    function getUserPoints(
        address addr,
        uint256 targetTimestamp
    ) external view returns (uint256) {
        uint256[] memory userTokens = stakedTokenIds[addr];
        uint256 totalPoints = leaderboards[leaderboardIndex][addr];

        for (uint256 i = 0; i < userTokens.length; i++) {
            uint256 tokenId = userTokens[i];
            uint256 points = getTokenPoints(tokenId, targetTimestamp);
            totalPoints += points;
        }

        return totalPoints;
    }

    // -------------------------------------------------------
    // Functons for staking and unstaking tokens
    // -------------------------------------------------------

    /**
     * @dev Returns a list of token IDs that are staked by a particular address.
     * @param addr The address to query staked tokens for.
     * @return An array of token IDs that the address has staked.
     */
    function getTokensStaked(
        address addr
    ) external view returns (uint256[] memory) {
        return stakedTokenIds[addr];
    }

    /**
     * @dev Allows a user to stake one or more tokens by transferring them to the contract.
     * Staking is only allowed when staking is open.
     * @param tokenIds An array of token IDs to be staked.
     */
    function stake(uint256[] calldata tokenIds) external nonReentrant {
        if (!stakingOpen) revert StakingClosed();

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

    /**
     * @dev Allows a user to unstake one or more tokens, transferring them back from the contract.
     * @param tokenIds An array of token IDs to be unstaked.
     */
    function unstake(uint256[] calldata tokenIds) external nonReentrant {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            _unstake(tokenIds[i]);
        }
    }

    /**
     * @dev Internal function to handle the logic of staking a single token.
     * Checks if the token is already staked and transfers the token to the contract.
     * @param tokenId The ID of the token to be staked.
     */
    function _stake(uint256 tokenId) internal {
        if (stakedTokenProps[tokenId].owner != address(0))
            revert AlreadyStaked();
        stakedTokenProps[tokenId].owner = msg.sender;
        stakedTokenIds[msg.sender].push(tokenId);
        safeTransferFrom(msg.sender, address(this), tokenId);

        emit Staked(msg.sender, tokenId);
    }

    /**
     * @dev Internal function to handle the logic of unstaking a single token.
     * Checks if the caller is the owner of the staked token and transfers the token back to them.
     * Applies a PUNISHMENT by reducing the saved points.
     * @param tokenId The ID of the token to be unstaked.
     */
    function _unstake(uint256 tokenId) internal {
        address owner = stakedTokenProps[tokenId].owner;
        if (owner != msg.sender) revert NotStakedOwner();

        uint256 points = getTokenPoints(tokenId, block.timestamp);

        //unstaking lets you loose 20% of your points since the last staking!
        uint256 remainingPoints = points - (points * PUNISHMENT) / 100;
        leaderboards[leaderboardIndex][owner] += remainingPoints;

        stakedTokenProps[tokenId].owner = address(0);
        stakedTokenProps[tokenId].checkIns = 0;

        IERC721A nftToken = IERC721A(address(this));
        nftToken.safeTransferFrom(address(this), owner, tokenId);

        remove(tokenId);

        emit Unstaked(owner, tokenId);
    }

    // -------------------------------------------------------
    // Admin function
    // ------------------------------------------------------

    /**
     * @dev Updates the properties of a specific mint phase. This allows dynamic adjustments to minting conditions.
     *
     * @param phase The mint phase to update, identified by the Phase enum.
     * @param phaseProps The new properties for the phase, including whether it's active, the whitelist status,
     * max tokens per wallet, merkle root for verification, and mint price.
     */

    function changePhaseProps(
        Phase phase,
        PhaseProps calldata phaseProps
    ) public onlyOwner {
        mintPhases[phase] = phaseProps;
    }

    /**
     * @param price The new price for boosts.
     */
    function setBoostPrice(uint256 price) external onlyOwner {
        BOOST_PRICE = price;
    }

    /**
     * @dev  sets the time for the next snapshot and increments the leaderboard index.
     */
    function takeSnapshot(uint64 timestamp) external onlyOwner {
        LAST_SNAPSHOT = timestamp;
        leaderboardIndex++;
    }

    function setMaxSupply(uint256 maxSupply) external onlyOwner {
        if (FINAL_TIMESTAMP != 0) revert CollectionFull();
        if (maxSupply < totalSupply() + 1) revert NeedMoreThanCurrentSupply();
        MAX_SUPPLY = maxSupply;
    }

    /**
     * @dev Toggles the active status of a mint phase, effectively starting or stopping the minting process for that phase.
     *
     * @param phase The mint phase to toggle, identified by the Phase enum. This allows for quick enabling or disabling
     * of minting without changing the other phase properties.
     */
    function toggleSaleActive(Phase phase) public onlyOwner {
        mintPhases[phase].saleActive = !mintPhases[phase].saleActive;
    }

    /**
     * @dev Sets the current active phase for minting. This determines which phase's settings are currently in use for minting operations.
     *
     * @param _phase The phase to set as active, identified by the Phase enum. This phase's properties will govern minting until changed.
     */
    function setActivePhase(Phase _phase) public onlyOwner {
        activePhase = _phase;
    }

    function setDescription(string calldata _description) external onlyOwner {
        description = _description;
    }

    function setTraitsActive(bool active) external onlyOwner {
        traitsActivated = active;
    }

    function setTraitMetadataPath(string calldata path) external onlyOwner {
        traitsMetadataPath = path;
    }

    /**
     * @param open The new status for staking.
     */
    function setStakingMode(bool open) external onlyOwner {
        if (FINAL_TIMESTAMP == 0) revert InvalidTimestamp();
        if (open) {
            LAST_SNAPSHOT = block.timestamp;
        }
        stakingOpen = open;
    }

    /**
     * @dev Sets the base path for token images. This path is used in the tokenURI
     * to point to the location where token images are stored. Only the contract owner
     * can update this path, ensuring that the image source remains secure and controlled.
     *
     * @param tokenImagePath_ The new base path for token images.
     */
    function setTokenImagePath(
        string calldata tokenImagePath_
    ) external onlyOwner {
        tokenImagePath = tokenImagePath_;
    }

    /**
     * @dev Sets the path for unrevealed token images. This is used when the token
     * rarity is not yet determined, providing a placeholder image. Like setTokenImagePath,
     * only the contract owner can change this, maintaining control over the content.
     *
     * @param unrevealedImage_ The path to the image for unrevealed tokens.
     */
    function setUnrevealImagePath(
        string calldata unrevealedImage_
    ) external onlyOwner {
        unrevealedImage = unrevealedImage_;
    }

    function withdraw() external onlyOwner {
        (bool success, ) = owner().call{value: address(this).balance}("");
        require(success, "Transfer failed.");
    }

    /* Blast Functions */

    function setBlastGasAddress(address addr) external onlyOwner {
        BLAST_GAS = addr;
    }

    function setBlastPointsAddress(address addr) external onlyOwner {
        BLAST_POINTS = addr;
    }

    function configureBlastPointsOperator(address operator) external onlyOwner {
        IBlastPoints(BLAST_POINTS).configurePointsOperator(operator);
    }

    function configureBlastGas() external onlyOwner {
        IBlast(BLAST_GAS).configureAutomaticYield();
        IBlast(BLAST_GAS).configureClaimableGas();
    }

    function claimMaxGas() external onlyOwner {
        IBlast(BLAST_GAS).claimMaxGas(address(this), msg.sender);
    }

    // -------------------------------------------------------
    // Utility functions
    // ------------------------------------------------------
    function remove(uint256 tokenId) internal {
        uint256[] storage tokenIds = stakedTokenIds[msg.sender];

        for (uint256 i = 0; i < tokenIds.length; i++) {
            if (tokenIds[i] != tokenId) continue;

            tokenIds[i] = tokenIds[tokenIds.length - 1];
            tokenIds.pop();
        }
    }

    /* ERC721AQueryable extension function */

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(
        address owner
    ) external view returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (
                uint256 i = _startTokenId();
                tokenIdsIdx != tokenIdsLength;
                ++i
            ) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }

    receive() external payable {
        emit EtherReceived(msg.sender, msg.value);
    }

    function onERC721Received(
        address /* operator */,
        address /* from */,
        uint256 /* tokenId */,
        bytes calldata /* data */
    ) external pure override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

File 3 of 14 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @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 v5.0.2) (utils/Base64.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 */
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, 0x20)
            let dataPtr := data
            let endPtr := add(data, mload(data))

            // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and
            // set it to zero to make sure no dirty bytes are read in that section.
            let afterPtr := add(endPtr, 0x20)
            let afterCache := mload(afterPtr)
            mstore(afterPtr, 0x00)

            // Run over the input, 3 bytes at a time
            for {

            } lt(dataPtr, endPtr) {

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

                // To write each character, shift the 3 byte (24 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F to bitmask the least significant 6 bits.
                // Use this as an index into the lookup table, mload an entire word
                // so the desired character is in the least significant byte, and
                // mstore8 this least significant byte into the result and continue.

                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
            }

            // Reset the value that was cached
            mstore(afterPtr, afterCache)

            // 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 v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.20;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Sorts the pair (a, b) and hashes the result.
     */
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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 towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (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 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

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

            uint256 twos = denominator & (0 - denominator);
            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 (unsignedRoundsUp(rounding) && 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
     * towards zero.
     *
     * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * 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 256, 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

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

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @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), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

    /**
     * @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) {
        uint256 localValue = value;
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        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);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

enum YieldMode {
    AUTOMATIC,
    VOID,
    CLAIMABLE
}

enum GasMode {
    VOID,
    CLAIMABLE
}

interface IBlast {
    // configure
    function configureContract(
        address contractAddress,
        YieldMode _yield,
        GasMode gasMode,
        address governor
    ) external;

    function configure(
        YieldMode _yield,
        GasMode gasMode,
        address governor
    ) external;

    // base configuration options
    function configureClaimableYield() external;

    function configureClaimableYieldOnBehalf(address contractAddress) external;

    function configureAutomaticYield() external;

    function configureAutomaticYieldOnBehalf(address contractAddress) external;

    function configureVoidYield() external;

    function configureVoidYieldOnBehalf(address contractAddress) external;

    function configureClaimableGas() external;

    function configureClaimableGasOnBehalf(address contractAddress) external;

    function configureVoidGas() external;

    function configureVoidGasOnBehalf(address contractAddress) external;

    function configureGovernor(address _governor) external;

    function configureGovernorOnBehalf(
        address _newGovernor,
        address contractAddress
    ) external;

    // claim yield
    function claimYield(
        address contractAddress,
        address recipientOfYield,
        uint256 amount
    ) external returns (uint256);

    function claimAllYield(
        address contractAddress,
        address recipientOfYield
    ) external returns (uint256);

    // claim gas
    function claimAllGas(
        address contractAddress,
        address recipientOfGas
    ) external returns (uint256);

    function claimGasAtMinClaimRate(
        address contractAddress,
        address recipientOfGas,
        uint256 minClaimRateBips
    ) external returns (uint256);

    function claimMaxGas(
        address contractAddress,
        address recipientOfGas
    ) external returns (uint256);

    function claimGas(
        address contractAddress,
        address recipientOfGas,
        uint256 gasToClaim,
        uint256 gasSecondsToConsume
    ) external returns (uint256);

    // read functions
    function readClaimableYield(
        address contractAddress
    ) external view returns (uint256);

    function readYieldConfiguration(
        address contractAddress
    ) external view returns (uint8);

    function readGasParams(
        address contractAddress
    )
        external
        view
        returns (
            uint256 etherSeconds,
            uint256 etherBalance,
            uint256 lastUpdated,
            GasMode
        );
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

interface IBlastPoints {
    function configurePointsOperator(address operator) external;
}

File 13 of 14 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * The `_sequentialUpTo()` function can be overriden to enable spot mints
 * (i.e. non-consecutive mints) for `tokenId`s greater than `_sequentialUpTo()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _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 {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

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

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

    // The amount of tokens minted above `_sequentialUpTo()`.
    // We call these spot mints (i.e. non-sequential mints).
    uint256 private _spotMinted;

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

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

        if (_sequentialUpTo() < _startTokenId()) _revert(SequentialUpToTooSmall.selector);
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID for sequential mints.
     *
     * Override this function to change the starting token ID for sequential mints.
     *
     * Note: The value returned must never change after any tokens have been minted.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the maximum token ID (inclusive) for sequential mints.
     *
     * Override this function to return a value less than 2**256 - 1,
     * but greater than `_startTokenId()`, to enable spot (non-sequential) mints.
     *
     * Note: The value returned must never change after any tokens have been minted.
     */
    function _sequentialUpTo() internal view virtual returns (uint256) {
        return type(uint256).max;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256 result) {
        // Counter underflow is impossible as `_burnCounter` cannot be incremented
        // more than `_currentIndex + _spotMinted - _startTokenId()` times.
        unchecked {
            // With spot minting, the intermediate `result` can be temporarily negative,
            // and the computation must be unchecked.
            result = _currentIndex - _burnCounter - _startTokenId();
            if (_sequentialUpTo() != type(uint256).max) result += _spotMinted;
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256 result) {
        // Counter underflow is impossible as `_currentIndex` does not decrement,
        // and it is initialized to `_startTokenId()`.
        unchecked {
            result = _currentIndex - _startTokenId();
            if (_sequentialUpTo() != type(uint256).max) result += _spotMinted;
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev Returns the total number of tokens that are spot-minted.
     */
    function _totalSpotMinted() internal view virtual returns (uint256) {
        return _spotMinted;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) _revert(BalanceQueryForZeroAddress.selector);
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

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

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

    /**
     * Sets the auxiliary 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 virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @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, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Returns whether the ownership slot at `index` is initialized.
     * An uninitialized slot does not necessarily mean that the slot has no owner.
     */
    function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) {
        return _packedOwnerships[index] != 0;
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * @dev Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
        if (_startTokenId() <= tokenId) {
            packed = _packedOwnerships[tokenId];

            if (tokenId > _sequentialUpTo()) {
                if (_packedOwnershipExists(packed)) return packed;
                _revert(OwnerQueryForNonexistentToken.selector);
            }

            // If the data at the starting slot does not exist, start the scan.
            if (packed == 0) {
                if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector);
                // Invariant:
                // There will always be an initialized ownership slot
                // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                // before an unintialized ownership slot
                // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                // Hence, `tokenId` will not underflow.
                //
                // We can directly compare the packed value.
                // If the address is zero, packed will be zero.
                for (;;) {
                    unchecked {
                        packed = _packedOwnerships[--tokenId];
                    }
                    if (packed == 0) continue;
                    if (packed & _BITMASK_BURNED == 0) return packed;
                    // Otherwise, the token is burned, and we must revert.
                    // This handles the case of batch burned tokens, where only the burned bit
                    // of the starting slot is set, and remaining slots are left uninitialized.
                    _revert(OwnerQueryForNonexistentToken.selector);
                }
            }
            // Otherwise, the data exists and we can skip the scan.
            // This is possible because we have already achieved the target condition.
            // This saves 2143 gas on transfers of initialized tokens.
            // If the token is not burned, return `packed`. Otherwise, revert.
            if (packed & _BITMASK_BURNED == 0) return packed;
        }
        _revert(OwnerQueryForNonexistentToken.selector);
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     */
    function approve(address to, uint256 tokenId) public payable virtual override {
        _approve(to, tokenId, true);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) _revert(ApprovalQueryForNonexistentToken.selector);

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @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) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

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

    /**
     * @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. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool result) {
        if (_startTokenId() <= tokenId) {
            if (tokenId > _sequentialUpTo()) return _packedOwnershipExists(_packedOwnerships[tokenId]);

            if (tokenId < _currentIndex) {
                uint256 packed;
                while ((packed = _packedOwnerships[tokenId]) == 0) --tokenId;
                result = packed & _BITMASK_BURNED == 0;
            }
        }
    }

    /**
     * @dev Returns whether `packed` represents a token that exists.
     */
    function _packedOwnershipExists(uint256 packed) private pure returns (bool result) {
        assembly {
            // The following is equivalent to `owner != address(0) && burned == false`.
            // Symbolically tested.
            result := gt(and(packed, _BITMASK_ADDRESS), and(packed, _BITMASK_BURNED))
        }
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean.
        from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS));

        if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector);

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector);

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // 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 {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
        uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS;
        assembly {
            // Emit the `Transfer` event.
            log4(
                0, // Start of data (0, since no data).
                0, // End of data (0, since no data).
                _TRANSFER_EVENT_SIGNATURE, // Signature.
                from, // `from`.
                toMasked, // `to`.
                tokenId // `tokenId`.
            )
        }
        if (toMasked == 0) _revert(TransferToZeroAddress.selector);

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @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 memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                _revert(TransferToNonERC721ReceiverImplementer.selector);
            }
    }

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

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                _revert(TransferToNonERC721ReceiverImplementer.selector);
            }
            assembly {
                revert(add(32, reason), mload(reason))
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @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 for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (quantity == 0) _revert(MintZeroQuantity.selector);

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
            uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS;

            if (toMasked == 0) _revert(MintToZeroAddress.selector);

            uint256 end = startTokenId + quantity;
            uint256 tokenId = startTokenId;

            if (end - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector);

            do {
                assembly {
                    // Emit the `Transfer` event.
                    log4(
                        0, // Start of data (0, since no data).
                        0, // End of data (0, since no data).
                        _TRANSFER_EVENT_SIGNATURE, // Signature.
                        0, // `address(0)`.
                        toMasked, // `to`.
                        tokenId // `tokenId`.
                    )
                }
                // The `!=` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
            } while (++tokenId != end);

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) _revert(MintToZeroAddress.selector);
        if (quantity == 0) _revert(MintZeroQuantity.selector);
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector);

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

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            if (startTokenId + quantity - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector);

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, 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.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        _revert(TransferToNonERC721ReceiverImplementer.selector);
                    }
                } while (index < end);
                // This prevents reentrancy to `_safeMint`.
                // It does not prevent reentrancy to `_safeMintSpot`.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Mints a single token at `tokenId`.
     *
     * Note: A spot-minted `tokenId` that has been burned can be re-minted again.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` must be greater than `_sequentialUpTo()`.
     * - `tokenId` must not exist.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mintSpot(address to, uint256 tokenId) internal virtual {
        if (tokenId <= _sequentialUpTo()) _revert(SpotMintTokenIdTooSmall.selector);
        uint256 prevOwnershipPacked = _packedOwnerships[tokenId];
        if (_packedOwnershipExists(prevOwnershipPacked)) _revert(TokenAlreadyExists.selector);

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

        // Overflows are incredibly unrealistic.
        // The `numberMinted` for `to` is incremented by 1, and has a max limit of 2**64 - 1.
        // `_spotMinted` is incremented by 1, and has a max limit of 2**256 - 1.
        unchecked {
            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `true` (as `quantity == 1`).
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(1) | _nextExtraData(address(0), to, prevOwnershipPacked)
            );

            // Updates:
            // - `balance += 1`.
            // - `numberMinted += 1`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += (1 << _BITPOS_NUMBER_MINTED) | 1;

            // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
            uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS;

            if (toMasked == 0) _revert(MintToZeroAddress.selector);

            assembly {
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    tokenId // `tokenId`.
                )
            }

            ++_spotMinted;
        }

        _afterTokenTransfers(address(0), to, tokenId, 1);
    }

    /**
     * @dev Safely mints a single token at `tokenId`.
     *
     * Note: A spot-minted `tokenId` that has been burned can be re-minted again.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}.
     * - `tokenId` must be greater than `_sequentialUpTo()`.
     * - `tokenId` must not exist.
     *
     * See {_mintSpot}.
     *
     * Emits a {Transfer} event.
     */
    function _safeMintSpot(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mintSpot(to, tokenId);

        unchecked {
            if (to.code.length != 0) {
                uint256 currentSpotMinted = _spotMinted;
                if (!_checkContractOnERC721Received(address(0), to, tokenId, _data)) {
                    _revert(TransferToNonERC721ReceiverImplementer.selector);
                }
                // This prevents reentrancy to `_safeMintSpot`.
                // It does not prevent reentrancy to `_safeMint`.
                if (_spotMinted != currentSpotMinted) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMintSpot(to, tokenId, '')`.
     */
    function _safeMintSpot(address to, uint256 tokenId) internal virtual {
        _safeMintSpot(to, tokenId, '');
    }

    // =============================================================
    //                       APPROVAL OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_approve(to, tokenId, false)`.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _approve(to, tokenId, false);
    }

    /**
     * @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:
     *
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        bool approvalCheck
    ) internal virtual {
        address owner = ownerOf(tokenId);

        if (approvalCheck && _msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                _revert(ApprovalCallerNotOwnerNorApproved.selector);
            }

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev 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 {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector);
        }

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

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // 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 {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

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

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector);
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * 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 _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }

    /**
     * @dev For more efficient reverts.
     */
    function _revert(bytes4 errorSelector) internal pure {
        assembly {
            mstore(0x00, errorSelector)
            revert(0x00, 0x04)
        }
    }
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    /**
     * `_sequentialUpTo()` must be greater than `_startTokenId()`.
     */
    error SequentialUpToTooSmall();

    /**
     * The `tokenId` of a sequential mint exceeds `_sequentialUpTo()`.
     */
    error SequentialMintExceedsLimit();

    /**
     * Spot minting requires a `tokenId` greater than `_sequentialUpTo()`.
     */
    error SpotMintTokenIdTooSmall();

    /**
     * Cannot mint over a token that already exists.
     */
    error TokenAlreadyExists();

    /**
     * The feature is not compatible with spot mints.
     */
    error NotCompatibleWithSpotMints();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

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

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 2000
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"blastGas","type":"address"},{"internalType":"address","name":"blastPoints","type":"address"},{"components":[{"internalType":"bool","name":"saleActive","type":"bool"},{"internalType":"bool","name":"whitelistActive","type":"bool"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct BlastMiners.PhaseProps","name":"ogData","type":"tuple"},{"components":[{"internalType":"bool","name":"saleActive","type":"bool"},{"internalType":"bool","name":"whitelistActive","type":"bool"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct BlastMiners.PhaseProps","name":"alData","type":"tuple"},{"components":[{"internalType":"bool","name":"saleActive","type":"bool"},{"internalType":"bool","name":"whitelistActive","type":"bool"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct BlastMiners.PhaseProps","name":"fcfsData","type":"tuple"},{"components":[{"internalType":"bool","name":"saleActive","type":"bool"},{"internalType":"bool","name":"whitelistActive","type":"bool"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct BlastMiners.PhaseProps","name":"publicData","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyStaked","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CollectionFull","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidTimestamp","type":"error"},{"inputs":[],"name":"MaxBoostReached","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintLimitReached","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NeedMoreThanCurrentSupply","type":"error"},{"inputs":[],"name":"NoRarity","type":"error"},{"inputs":[],"name":"NotAllowlisted","type":"error"},{"inputs":[],"name":"NotCompatibleWithSpotMints","type":"error"},{"inputs":[],"name":"NotStakedOwner","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"PhaseClosed","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"SequentialMintExceedsLimit","type":"error"},{"inputs":[],"name":"SequentialUpToTooSmall","type":"error"},{"inputs":[],"name":"SpotMintTokenIdTooSmall","type":"error"},{"inputs":[],"name":"StakingClosed","type":"error"},{"inputs":[],"name":"TokenAlreadyExists","type":"error"},{"inputs":[],"name":"TooSoonForNextCheckIn","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":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Airdropped","type":"event"},{"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":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EtherReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"enum BlastMiners.Phase","name":"phase","type":"uint8"}],"name":"Minted","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":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Staked","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"BASE_WEEK_BOOST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLAST_GAS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLAST_POINTS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOOST_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOOST_PER_WEEK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOOST_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOOST_TOKEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FINAL_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LAST_SNAPSHOT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BOOST_POSSIBLE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WEEK_BOOST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POINTS_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POINTS_PER_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUNISHMENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activePhase","outputs":[{"internalType":"enum BlastMiners.Phase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"quantity","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"boostToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"calculateRarity","outputs":[{"internalType":"enum BlastMiners.Rarity","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum BlastMiners.Phase","name":"phase","type":"uint8"},{"components":[{"internalType":"bool","name":"saleActive","type":"bool"},{"internalType":"bool","name":"whitelistActive","type":"bool"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct BlastMiners.PhaseProps","name":"phaseProps","type":"tuple"}],"name":"changePhaseProps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"checkIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimMaxGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"configureBlastGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"configureBlastPointsOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"weeksStaked","type":"uint256"}],"name":"getBoostFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBoosts","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRarity","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"targetTimestamp","type":"uint256"}],"name":"getTokenPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getTokensStaked","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"targetTimestamp","type":"uint256"}],"name":"getUserPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"enum BlastMiners.Phase","name":"phaseToCheck","type":"uint8"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"leaderboardIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"leaderboards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"enum BlastMiners.Phase","name":"","type":"uint8"}],"name":"mintPhases","outputs":[{"internalType":"bool","name":"saleActive","type":"bool"},{"internalType":"bool","name":"whitelistActive","type":"bool"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"enum BlastMiners.Phase","name":"phase","type":"uint8"}],"name":"mintedPerAddress","outputs":[{"internalType":"uint256","name":"mintedTokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"enum BlastMiners.Phase","name":"_phase","type":"uint8"}],"name":"setActivePhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setBlastGasAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setBlastPointsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setBoostPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"open","type":"bool"}],"name":"setStakingMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenImagePath_","type":"string"}],"name":"setTokenImagePath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"path","type":"string"}],"name":"setTraitMetadataPath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"active","type":"bool"}],"name":"setTraitsActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"unrevealedImage_","type":"string"}],"name":"setUnrevealImagePath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedTokenIds","outputs":[{"internalType":"uint256","name":"stakedTokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakedTokenProps","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"boosted","type":"uint256"},{"internalType":"uint256","name":"checkIns","type":"uint256"},{"internalType":"uint256","name":"checkInTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"takeSnapshot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum BlastMiners.Phase","name":"phase","type":"uint8"}],"name":"toggleSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenImagePath","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traitsActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traitsMetadataPath","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unrevealedImage","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6108ae600d5566038d7ea4c68000600e556000600f8190556010556011805460ff191690556101c06040526101166080818152906200509f60a0396012906200004990826200060a565b5060006013556014805460ff199081169091556017805490911690553480156200007257600080fd5b50604051620051b5380380620051b5833981016040819052620000959162000787565b336040518060400160405280600b81526020016a426c6173744d696e65727360a81b81525060405180604001604052806003815260200162424d5360e81b8152508160029081620000e791906200060a565b506003620000f682826200060a565b505060008055506001600160a01b0381166200012c57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b620001378162000511565b506001600a55600b80546001600160a01b038089166001600160a01b03199283168117909355600c8054918916919092161790556040805163388a0bbd60e11b81529051637114177a9160048082019260009290919082900301818387803b158015620001a357600080fd5b505af1158015620001b8573d6000803e3d6000fd5b50505050600b60009054906101000a90046001600160a01b03166001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200020d57600080fd5b505af115801562000222573d6000803e3d6000fd5b505060008080526019602090815287517fd2ac945fcc0096878c763e37d6929b78378c1a2defabde8ba7ee5ed1d6e7a5b28054838b0151151561010090810261ff0019941515851661ffff1993841617179092556040808c01517fd2ac945fcc0096878c763e37d6929b78378c1a2defabde8ba7ee5ed1d6e7a5b3556060808d01517fd2ac945fcc0096878c763e37d6929b78378c1a2defabde8ba7ee5ed1d6e7a5b45560809c8d01517fd2ac945fcc0096878c763e37d6929b78378c1a2defabde8ba7ee5ed1d6e7a5b555600187528b517ffc941c3961fb6541da34150022cddf959da0fb2353866a6bfbd249c2da09291480548e890151151587029215158816908616179190911790558b8201517ffc941c3961fb6541da34150022cddf959da0fb2353866a6bfbd249c2da092915558b8101517ffc941c3961fb6541da34150022cddf959da0fb2353866a6bfbd249c2da092916559a8c01517ffc941c3961fb6541da34150022cddf959da0fb2353866a6bfbd249c2da092917556002865289517f6f678ad17c55bce407239525f4bf7f1fe99197d3eb69bfdd9a0db84a9a11b58180548c88015115158602921515871690851617919091179055898101517f6f678ad17c55bce407239525f4bf7f1fe99197d3eb69bfdd9a0db84a9a11b58255898b01517f6f678ad17c55bce407239525f4bf7f1fe99197d3eb69bfdd9a0db84a9a11b58355988b01517f6f678ad17c55bce407239525f4bf7f1fe99197d3eb69bfdd9a0db84a9a11b58455600390945286517f3e323a6e0522b016fa22111dfed945f89456f9f44f69eac00209d92607a5b940805494890151151590920290151590921692909316919091171790555050908101517f3e323a6e0522b016fa22111dfed945f89456f9f44f69eac00209d92607a5b94155908101517f3e323a6e0522b016fa22111dfed945f89456f9f44f69eac00209d92607a5b9425501517f3e323a6e0522b016fa22111dfed945f89456f9f44f69eac00209d92607a5b94355506200080f9050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200058e57607f821691505b602082108103620005af57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000605576000816000526020600020601f850160051c81016020861015620005e05750805b601f850160051c820191505b818110156200060157828155600101620005ec565b5050505b505050565b81516001600160401b0381111562000626576200062662000563565b6200063e8162000637845462000579565b84620005b5565b602080601f8311600181146200067657600084156200065d5750858301515b600019600386901b1c1916600185901b17855562000601565b600085815260208120601f198616915b82811015620006a75788860151825594840194600190910190840162000686565b5085821015620006c65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80516001600160a01b0381168114620006ee57600080fd5b919050565b80518015158114620006ee57600080fd5b600060a082840312156200071757600080fd5b60405160a081016001600160401b03811182821017156200073c576200073c62000563565b6040529050806200074d83620006f3565b81526200075d60208401620006f3565b60208201526040830151604082015260608301516060820152608083015160808201525092915050565b6000806000806000806102c08789031215620007a257600080fd5b620007ad87620006d6565b9550620007bd60208801620006d6565b9450620007ce886040890162000704565b9350620007df8860e0890162000704565b9250620007f188610180890162000704565b91506200080388610220890162000704565b90509295509295509295565b614880806200081f6000396000f3fe60806040526004361061055c5760003560e01c806370a08231116102ca578063b88d4fde11610179578063e449f341116100d6578063f2fde38b1161008a578063f8b5efdb1161006f578063f8b5efdb14610f58578063f9dbd17714610f6d578063fe512e8e14610f8057600080fd5b8063f2fde38b14610f18578063f3249ccb14610f3857600080fd5b8063e95a644f116100bb578063e95a644f14610e8f578063e985e9c514610eaf578063ecb8eb2c14610ef857600080fd5b8063e449f34114610e4f578063e8241e2a14610e6f57600080fd5b8063c87b56dd1161012d578063d8ad1e6011610112578063d8ad1e6014610df9578063d9b6a00214610e19578063dafb827a14610e3957600080fd5b8063c87b56dd14610dd9578063d438dadd14610d8f57600080fd5b8063bee9afee1161015e578063bee9afee14610d8f578063c1a7f7a814610da4578063c2a979bb14610db957600080fd5b8063b88d4fde14610d69578063ba41b0c614610d7c57600080fd5b806395d89b4111610227578063ae32b7b0116101db578063b2169fcd116101c0578063b2169fcd14610cbd578063b2b8c93f14610d34578063b3afe49614610d4957600080fd5b8063ae32b7b014610c7d578063ae841cde14610c9d57600080fd5b8063a22cb4651161020c578063a22cb46514610c1d578063a2de55f814610c3d578063ad10282a14610c5d57600080fd5b806395d89b4114610bee578063a1f77c5914610c0357600080fd5b80638593d6d91161027e5780638b38af23116102635780638b38af2314610b9b5780638da5cb5b14610bb057806390c3f38f14610bce57600080fd5b80638593d6d914610b655780638925180214610b8557600080fd5b80637284e416116102af5780637284e41614610b1057806378949f6114610b255780638462151c14610b4557600080fd5b806370a0823114610adb578063715018a614610afb57600080fd5b8063387602981161042657806351e6de1711610383578063672434821161033757806367db01a31161031c57806367db01a314610a7b5780636b9d841514610a9b5780636f8b44b014610abb57600080fd5b80636724348214610a4857806367b0a6ac14610a5b57600080fd5b806355ca068e1161036857806355ca068e146109925780635d89e84214610a085780636352211e14610a2857600080fd5b806351e6de171461094557806352eb77961461096557600080fd5b80634696788f116103da57806348758697116103bf57806348758697146108e55780634b51dd77146109055780634b8f90251461092557600080fd5b80634696788f146108ba57806346a2a37d146108cf57600080fd5b80633ccfd60b1161040b5780633ccfd60b1461087c57806342842e0e14610891578063428a1b1c146108a457600080fd5b8063387602981461084c5780633a93395e1461086657600080fd5b80630fbf0a93116104d457806323b872dd116104885780632e1b4cdc1161046d5780632e1b4cdc146107d757806332cb6b0c146107fe5780633677a7021461081457600080fd5b806323b872dd146107c45780632dc164b6146107af57600080fd5b806318160ddd116104b957806318160ddd146107855780631fdcfe351461079a578063205efaeb146107af57600080fd5b80630fbf0a9314610708578063150b7a021461072857600080fd5b8063081812fc1161052b5780630c248d8d116105105780630c248d8d1461069f5780630e1b26c6146106b45780630e25272d146106db57600080fd5b8063081812fc14610654578063095ea7b31461068c57600080fd5b806301ffc9a71461059557806305f61aa5146105ca578063063a123d146105ec57806306fdde031461063257600080fd5b3661059057604051349033907f1e57e3bb474320be3d2c77138f75b7c3941292d647f5f9634e33a8e94e0e069b90600090a3005b600080fd5b3480156105a157600080fd5b506105b56105b0366004613a97565b610f95565b60405190151581526020015b60405180910390f35b3480156105d657600080fd5b506105ea6105e5366004613acb565b61107a565b005b3480156105f857600080fd5b50610624610607366004613af5565b601d60209081526000928352604080842090915290825290205481565b6040519081526020016105c1565b34801561063e57600080fd5b506106476110b1565b6040516105c19190613b78565b34801561066057600080fd5b5061067461066f366004613b8b565b611143565b6040516001600160a01b0390911681526020016105c1565b6105ea61069a366004613ba4565b611197565b3480156106ab57600080fd5b506106476111a7565b3480156106c057600080fd5b506011546106ce9060ff1681565b6040516105c19190613bf8565b3480156106e757600080fd5b506106fb6106f6366004613b8b565b611235565b6040516105c19190613c06565b34801561071457600080fd5b506105ea610723366004613c6c565b61131c565b34801561073457600080fd5b50610754610743366004613cf0565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016105c1565b34801561079157600080fd5b5061062461139f565b3480156107a657600080fd5b50610624601481565b3480156107bb57600080fd5b50610624606481565b6105ea6107d2366004613d5f565b6113b8565b3480156107e357600080fd5b506107ec600581565b60405160ff90911681526020016105c1565b34801561080a57600080fd5b50610624600d5481565b34801561082057600080fd5b5061062461082f366004613d9b565b601a60209081526000928352604080842090915290825290205481565b34801561085857600080fd5b506014546105b59060ff1681565b34801561087257600080fd5b5061062460105481565b34801561088857600080fd5b506105ea61159b565b6105ea61089f366004613d5f565b611679565b3480156108b057600080fd5b5061062461012c81565b3480156108c657600080fd5b506105ea611699565b3480156108db57600080fd5b5061062460135481565b3480156108f157600080fd5b50610647610900366004613b8b565b611773565b34801561091157600080fd5b506105ea610920366004613b8b565b6117ce565b34801561093157600080fd5b50600c54610674906001600160a01b031681565b34801561095157600080fd5b506105ea610960366004613dbe565b6117db565b34801561097157600080fd5b50610985610980366004613acb565b611825565b6040516105c19190613dfd565b34801561099e57600080fd5b506109de6109ad366004613b8b565b601b6020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b03909516855260208501939093529183015260608201526080016105c1565b348015610a1457600080fd5b506105ea610a23366004613e35565b611891565b348015610a3457600080fd5b50610674610a43366004613b8b565b6118c0565b6105ea610a56366004613e50565b6118cb565b348015610a6757600080fd5b506105ea610a76366004613eca565b611abd565b348015610a8757600080fd5b506105b5610a96366004613ee7565b611ad8565b348015610aa757600080fd5b50610647610ab6366004613b8b565b611ba8565b348015610ac757600080fd5b506105ea610ad6366004613b8b565b611bc6565b348015610ae757600080fd5b50610624610af6366004613acb565b611c40565b348015610b0757600080fd5b506105ea611c9f565b348015610b1c57600080fd5b50610647611cb3565b348015610b3157600080fd5b50610624610b40366004613f4c565b611cc0565b348015610b5157600080fd5b50610985610b60366004613acb565b611eaf565b348015610b7157600080fd5b506105ea610b80366004613acb565b611fb0565b348015610b9157600080fd5b50610624600f5481565b348015610ba757600080fd5b50610624600581565b348015610bbc57600080fd5b506009546001600160a01b0316610674565b348015610bda57600080fd5b506105ea610be9366004613f6e565b612033565b348015610bfa57600080fd5b50610647612048565b348015610c0f57600080fd5b506017546105b59060ff1681565b348015610c2957600080fd5b506105ea610c38366004613fa4565b612057565b348015610c4957600080fd5b50600b54610674906001600160a01b031681565b348015610c6957600080fd5b50610624610c78366004613ba4565b6120c3565b348015610c8957600080fd5b506105ea610c98366004613acb565b6120f4565b348015610ca957600080fd5b506105ea610cb8366004613f6e565b61212b565b348015610cc957600080fd5b50610d0a610cd8366004613e35565b601960205260009081526040902080546001820154600283015460039093015460ff8084169461010090940416929085565b6040805195151586529315156020860152928401919091526060830152608082015260a0016105c1565b348015610d4057600080fd5b506105ea612140565b348015610d5557600080fd5b50610624610d64366004613ba4565b6121d5565b6105ea610d77366004613ff1565b6122b6565b6105ea610d8a3660046140cd565b61230a565b348015610d9b57600080fd5b50610624600281565b348015610db057600080fd5b50610647612672565b348015610dc557600080fd5b506105ea610dd4366004614119565b61267f565b348015610de557600080fd5b50610647610df4366004613b8b565b6126ad565b348015610e0557600080fd5b506105ea610e14366004613eca565b61283a565b348015610e2557600080fd5b50610624610e34366004613b8b565b61289c565b348015610e4557600080fd5b50610624600e5481565b348015610e5b57600080fd5b506105ea610e6a366004613c6c565b6128e0565b348015610e7b57600080fd5b506105ea610e8a366004613f6e565b61291c565b348015610e9b57600080fd5b506105ea610eaa366004613b8b565b612931565b348015610ebb57600080fd5b506105b5610eca366004614143565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610f0457600080fd5b506105ea610f13366004613f6e565b612a90565b348015610f2457600080fd5b506105ea610f33366004613acb565b612aa5565b348015610f4457600080fd5b506105ea610f53366004613e35565b612af9565b348015610f6457600080fd5b50610624607881565b6105ea610f7b366004613b8b565b612b88565b348015610f8c57600080fd5b50610647612c3e565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061102857507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061107457507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b611082612c4b565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6060600280546110c09061416d565b80601f01602080910402602001604051908101604052809291908181526020018280546110ec9061416d565b80156111395780601f1061110e57610100808354040283529160200191611139565b820191906000526020600020905b81548152906001019060200180831161111c57829003601f168201915b5050505050905090565b600061114e82612c91565b61117b5761117b7fcf4700e400000000000000000000000000000000000000000000000000000000612cd6565b506000908152600660205260409020546001600160a01b031690565b6111a382826001612ce0565b5050565b601880546111b49061416d565b80601f01602080910402602001604051908101604052809291908181526020018280546111e09061416d565b801561122d5780601f106112025761010080835404028352916020019161122d565b820191906000526020600020905b81548152906001019060200180831161121057829003601f168201915b505050505081565b6000600f54600003611273576040517f6289bdad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006064600f5484604051602001611295929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6112b891906141bd565b90506000603c8210156112cd57506000611315565b60508210156112de57506001611315565b605a8210156112ef57506002611315565b605f82101561130057506003611315565b606282101561131157506004611315565b5060055b9392505050565b611324612da9565b60145460ff16611360576040517f5e0ff49500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156113945761138c838383818110611380576113806141d1565b90506020020135612dec565b600101611363565b506111a36001600a55565b60015460005403600019805b146113b557600854015b90565b60006113c382612ec4565b6001600160a01b039485169490915081168414611403576114037fa114810000000000000000000000000000000000000000000000000000000000612cd6565b60008281526006602052604090208054338082146001600160a01b03881690911417611460576114338633610eca565b611460576114607f59c896be00000000000000000000000000000000000000000000000000000000612cd6565b801561146b57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c02000000000000000000000000000000000000000000000000000000008416900361152f5760018401600081815260046020526040812054900361152d57600054811461152d5760008181526004602052604090208490555b505b6001600160a01b0385168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003611592576115927fea553b3400000000000000000000000000000000000000000000000000000000612cd6565b50505050505050565b6115a3612c4b565b60006115b76009546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114611601576040519150601f19603f3d011682016040523d82523d6000602084013e611606565b606091505b5050905080611676576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5472616e73666572206661696c65642e0000000000000000000000000000000060448201526064015b60405180910390fd5b50565b611694838383604051806020016040528060008152506122b6565b505050565b6116a1612c4b565b600b60009054906101000a90046001600160a01b03166001600160a01b0316637114177a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156116f157600080fd5b505af1158015611705573d6000803e3d6000fd5b50505050600b60009054906101000a90046001600160a01b03166001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561175957600080fd5b505af115801561176d573d6000803e3d6000fd5b50505050565b6060600f546000146117955761179061178b83611235565b612f5a565b611074565b505060408051808201909152600781527f756e6b6e6f776e00000000000000000000000000000000000000000000000000602082015290565b6117d6612c4b565b600e55565b6117e3612c4b565b80601960008460038111156117fa576117fa613bce565b600381111561180b5761180b613bce565b8152602001908152602001600020818161176d91906141e7565b6001600160a01b0381166000908152601c602090815260409182902080548351818402810184019094528084526060939283018282801561188557602002820191906000526020600020905b815481526020019060010190808311611871575b50505050509050919050565b611899612c4b565b6011805482919060ff191660018360038111156118b8576118b8613bce565b021790555050565b600061107482612ec4565b6118d3612c4b565b82811461193c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c696420696e70757400000000000000000000000000000000000000604482015260640161166d565b600f541561195d5760405163011616d960e61b815260040160405180910390fd5b6000805b828110156119975783838281811061197b5761197b6141d1565b905060200201358261198d919061427f565b9150600101611961565b506001600d546119a79190614292565b816119b061312f565b6119ba919061427f565b11156119d95760405163011616d960e61b815260040160405180910390fd5b60005b84811015611ab557611a2c8686838181106119f9576119f96141d1565b9050602002016020810190611a0e9190613acb565b858584818110611a2057611a206141d1565b9050602002013561313b565b858582818110611a3e57611a3e6141d1565b9050602002016020810190611a539190613acb565b6001600160a01b03167f7bd6d4be1decdc27a9ed9c7ccdf5bb7cc38e31b3647b958c6b37162a2296c0fa858584818110611a8f57611a8f6141d1565b90506020020135604051611aa591815260200190565b60405180910390a26001016119dc565b505050505050565b611ac5612c4b565b6017805460ff1916911515919091179055565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660208201526000908190603401604051602081830303815290604052805190602001209050611b9c85858080602002602001604051908101604052809392919081815260200183836020028082843760009201829052506019935091508790506003811115611b7357611b73613bce565b6003811115611b8457611b84613bce565b8152602001908152602001600020600201548361322d565b9150505b949350505050565b6000818152601b602052604090206001015460609061107490613243565b611bce612c4b565b600f5415611bef5760405163011616d960e61b815260040160405180910390fd5b611bf761139f565b611c0290600161427f565b811015611c3b576040517fa63b383900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d55565b60006001600160a01b038216611c7957611c797f8f4eb60400000000000000000000000000000000000000000000000000000000612cd6565b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611ca7612c4b565b611cb160006132e3565b565b601280546111b49061416d565b600080611ccc84613342565b80519091506001600160a01b03163014611cea576000915050611074565b6000848152601b60209081526040808320815160808101835281546001600160a01b03168152600182015493810193909352600281015491830191909152600301546060820152908415611d3e5784611d40565b425b9050826020015167ffffffffffffffff16811015611d8a576040517fb7d0949700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000836020015167ffffffffffffffff1682611da69190614292565b90506000611db762093a80836142a5565b90506000856020015167ffffffffffffffff1660105410611dda57601054611dea565b856020015167ffffffffffffffff165b9050600061012c611dfb8387614292565b611e0591906142a5565b9050600086602001516002611e1a91906142b9565b611e2590606461427f565b90506000611e328561289c565b905060006005611e418e611235565b6005811115611e5257611e52613bce565b611e5c91906142b9565b611e6790606461427f565b9050600081611e7684866142b9565b611e8091906142b9565b90506000620f4240611e9283886142b9565b611e9c91906142a5565b9f9e505050505050505050505050505050565b60606000806000611ebf85611c40565b905060008167ffffffffffffffff811115611edc57611edc613fdb565b604051908082528060200260200182016040528015611f05578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081018290529192505b838614611fa457611f3d816133ba565b91508160400151611f9c5781516001600160a01b031615611f5d57815194505b876001600160a01b0316856001600160a01b031603611f9c5780838780600101985081518110611f8f57611f8f6141d1565b6020026020010181815250505b600101611f2d565b50909695505050505050565b611fb8612c4b565b600c546040517f36b91f2b0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152909116906336b91f2b90602401600060405180830381600087803b15801561201857600080fd5b505af115801561202c573d6000803e3d6000fd5b5050505050565b61203b612c4b565b6012611694828483614318565b6060600380546110c09061416d565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b601c60205281600052604060002081815481106120df57600080fd5b90600052602060002001600091509150505481565b6120fc612c4b565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b612133612c4b565b6018611694828483614318565b612148612c4b565b600b546040517f662aa11d0000000000000000000000000000000000000000000000000000000081523060048201523360248201526001600160a01b039091169063662aa11d906044016020604051808303816000875af11580156121b1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167691906143d8565b6001600160a01b0382166000908152601c602090815260408083208054825181850281018501909352808352849383018282801561223257602002820191906000526020600020905b81548152602001906001019080831161221e575b50506013546000908152601a602090815260408083206001600160a01b038c168452909152812054949550925050505b82518110156122ad57600083828151811061227f5761227f6141d1565b6020026020010151905060006122958288611cc0565b90506122a1818561427f565b93505050600101612262565b50949350505050565b6122c18484846113b8565b6001600160a01b0383163b1561176d576122dd84848484613439565b61176d5761176d7fd1a57ed600000000000000000000000000000000000000000000000000000000612cd6565b600d548361231661312f565b612320919061427f565b111561233f5760405163011616d960e61b815260040160405180910390fd5b60115460199060009060ff16600381111561235c5761235c613bce565b600381111561236d5761236d613bce565b815260208101919091526040016000205460ff166123b7576040517fc75933e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152601d6020526040812060115485929060ff1660038111156123e0576123e0613bce565b60038111156123f1576123f1613bce565b81526020019081526020016000205461240a919061427f565b60115460199060009060ff16600381111561242757612427613bce565b600381111561243857612438613bce565b8152602001908152602001600020600101541015612482576040517f303b682f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60115460199060009060ff16600381111561249f5761249f613bce565b60038111156124b0576124b0613bce565b8152602081019190915260400160002054610100900460ff1615612519576011546124e39033908490849060ff16611ad8565b612519576040517f06fb10a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6011546000908490601990839060ff16600381111561253a5761253a613bce565b600381111561254b5761254b613bce565b81526020019081526020016000206003015461256791906142b9565b9050803410156125a3576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152601d6020526040812060115486929060ff1660038111156125cc576125cc613bce565b60038111156125dd576125dd613bce565b815260200190815260200160002060008282546125fa919061427f565b9091555050600d548461260b61312f565b612615919061427f565b0361261f5742600f555b612629338561313b565b60115460405133917fdcb23284f3935b5557998e99dcc286e29744c5000723d99eecd5d6f5694f6e119161266491889160ff909116906143f1565b60405180910390a250505050565b601680546111b49061416d565b612687612c4b565b67ffffffffffffffff8116601055601380549060006126a583614405565b919050555050565b60606000600f546000146126eb5760156126c684613243565b6040516020016126d79291906144ae565b604051602081830303815290604052612777565b601680546126f89061416d565b80601f01602080910402602001604051908101604052809291908181526020018280546127249061416d565b80156127715780601f1061274657610100808354040283529160200191612771565b820191906000526020600020905b81548152906001019060200180831161275457829003601f168201915b50505050505b60175490915060ff16156127b857601861279084613243565b6040516020016127a1929190614526565b604051602081830303815290604052915050919050565b60006127c384611773565b905060006127d085611ba8565b905060006127dd86613243565b60128585856040516020016127f695949392919061459e565b604051602081830303815290604052905061281081613549565b604051602001612820919061473f565b604051602081830303815290604052945050505050919050565b612842612c4b565b600f5460000361287e576040517fb7d0949700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561288957426010555b6014805460ff1916911515919091179055565b6000816000036128ae57506064919050565b600060646128bd6002856142b9565b6128c7919061427f565b9050607881116128d75780611315565b60789392505050565b6128e8612da9565b60005b8181101561139457612914838383818110612908576129086141d1565b905060200201356136a9565b6001016128eb565b612924612c4b565b6016611694828483614318565b6000818152601b6020526040812080546003909101546001600160a01b03909116919061295e9042614292565b90506001600160a01b03821633146129a2576040517f4d01b4c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808110156129df576040517f7215920700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6202a300811115612a05576000838152601b602052604090206001600290910155612a2d565b6000838152601b60205260408120600201805460019290612a2790849061427f565b90915550505b6000838152601b6020526040902042600382015560020154612a519060649061427f565b6013546000908152601a602090815260408083206001600160a01b038716845290915281208054909190612a8690849061427f565b9091555050505050565b612a98612c4b565b6015611694828483614318565b612aad612c4b565b6001600160a01b038116612af0576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161166d565b611676816132e3565b612b01612c4b565b60196000826003811115612b1757612b17613bce565b6003811115612b2857612b28613bce565b8152602081019190915260400160009081205460ff161590601990836003811115612b5557612b55613bce565b6003811115612b6657612b66613bce565b81526020810191909152604001600020805460ff191691151591909117905550565b600e54341015612bc4576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152601b6020526040902060010154600511612c0f576040517fbf17fb9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001601b60008381526020019081526020016000206001016000828254612c36919061427f565b909155505050565b601580546111b49061416d565b6009546001600160a01b03163314611cb1576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161166d565b60008054821015612cd15760005b5060008281526004602052604081205490819003612cc757612cc083614784565b9250612c9f565b600160e01b161590505b919050565b8060005260046000fd5b6000612ceb836118c0565b9050818015612d035750336001600160a01b03821614155b15612d3f57612d128133610eca565b612d3f57612d3f7fcfb3b94200000000000000000000000000000000000000000000000000000000612cd6565b600083815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b6002600a5403612de5576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600a55565b6000818152601b60205260409020546001600160a01b031615612e3b576040517f0ae3514d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152601b60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191633908117909155808452601c835290832080546001810182559084529190922001829055612e94903083611679565b604051819033907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90600090a350565b60008181526004602052604090205480600003612f37576000548210612ef457612ef4636f96cda160e11b612cd6565b5b50600019016000818152600460205260409020548015612ef557600160e01b8116600003612f2257919050565b612f32636f96cda160e11b612cd6565b612ef5565b600160e01b8116600003612f4a57919050565b612cd1636f96cda160e11b612cd6565b60606001826005811115612f7057612f70613bce565b03612fae57505060408051808201909152600e81527f536b696c6c656420576f726b6572000000000000000000000000000000000000602082015290565b6002826005811115612fc257612fc2613bce565b0361300057505060408051808201909152601081527f53686966742053757065727669736f7200000000000000000000000000000000602082015290565b600382600581111561301457613014613bce565b0361305257505060408051808201909152600781527f466f72656d616e00000000000000000000000000000000000000000000000000602082015290565b600482600581111561306657613066613bce565b036130a457505060408051808201909152600f81527f4d696e696e67204469726563746f720000000000000000000000000000000000602082015290565b60058260058111156130b8576130b8613bce565b036130f657505060408051808201909152600481527f4b696e6700000000000000000000000000000000000000000000000000000000602082015290565b505060408051808201909152601081527f4d696e696e6720417373697374616e7400000000000000000000000000000000602082015290565b600054600019806113ab565b6000805490829003613170576131707fb562e8dd00000000000000000000000000000000000000000000000000000000612cd6565b60008181526004602090815260408083206001600160a01b0387164260a01b6001881460e11b178117909155808452600590925282208054680100000000000000018602019055908190036131e8576131e87f2e07630000000000000000000000000000000000000000000000000000000000612cd6565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a48181600101915081036131ed575060005550505050565b60008261323a8584613861565b14949350505050565b60606000613250836138a4565b600101905060008167ffffffffffffffff81111561327057613270613fdb565b6040519080825280601f01601f19166020018201604052801561329a576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846132a457509392505050565b600980546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915261107461337283612ec4565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461107490604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061346e90339089908890889060040161479b565b6020604051808303816000875af19250505080156134a9575060408051601f3d908101601f191682019092526134a6918101906147d7565b60015b613517573d8080156134d7576040519150601f19603f3d011682016040523d82523d6000602084013e6134dc565b606091505b50805160000361350f5761350f7fd1a57ed600000000000000000000000000000000000000000000000000000000612cd6565b805181602001fd5b7fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b149050611ba0565b6060815160000361356857505060408051602081019091526000815290565b600060405180606001604052806040815260200161480b6040913990506000600384516002613597919061427f565b6135a191906142a5565b6135ac9060046142b9565b67ffffffffffffffff8111156135c4576135c4613fdb565b6040519080825280601f01601f1916602001820160405280156135ee576020820181803683370190505b50905060018201602082018586518701602081018051600082525b82841015613664576003840193508351603f8160121c168701518653600186019550603f81600c1c168701518653600186019550603f8160061c168701518653600186019550603f8116870151865350600185019450613609565b905250508551600390066001811461368357600281146136965761369e565b603d6001830353603d600283035361369e565b603d60018303535b509195945050505050565b6000818152601b60205260409020546001600160a01b03163381146136fa576040517f4d01b4c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006137068342611cc0565b9050600060646137176014846142b9565b61372191906142a5565b61372b9083614292565b6013546000908152601a602090815260408083206001600160a01b038816845290915281208054929350839290919061376590849061427f565b90915550506000848152601b6020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916815560020191909155517f42842e0e00000000000000000000000000000000000000000000000000000000815230600482018190526001600160a01b0385166024830152604482018690529081906342842e0e90606401600060405180830381600087803b15801561380357600080fd5b505af1158015613817573d6000803e3d6000fd5b5050505061382485613986565b60405185906001600160a01b038616907f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f7590600090a35050505050565b600081815b845181101561389c5761389282868381518110613885576138856141d1565b6020026020010151613a3d565b9150600101613866565b509392505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106138ed577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613919576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061393757662386f26fc10000830492506010015b6305f5e100831061394f576305f5e100830492506008015b612710831061396357612710830492506004015b60648310613975576064830492506002015b600a83106110745760010192915050565b336000908152601c60205260408120905b815481101561169457828282815481106139b3576139b36141d1565b906000526020600020015403613a3557815482906139d390600190614292565b815481106139e3576139e36141d1565b9060005260206000200154828281548110613a0057613a006141d1565b906000526020600020018190555081805480613a1e57613a1e6147f4565b600190038181906000526020600020016000905590555b600101613997565b6000818310613a59576000828152602084905260409020611315565b5060009182526020526040902090565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461167657600080fd5b600060208284031215613aa957600080fd5b813561131581613a69565b80356001600160a01b0381168114612cd157600080fd5b600060208284031215613add57600080fd5b61131582613ab4565b803560048110612cd157600080fd5b60008060408385031215613b0857600080fd5b613b1183613ab4565b9150613b1f60208401613ae6565b90509250929050565b60005b83811015613b43578181015183820152602001613b2b565b50506000910152565b60008151808452613b64816020860160208601613b28565b601f01601f19169290920160200192915050565b6020815260006113156020830184613b4c565b600060208284031215613b9d57600080fd5b5035919050565b60008060408385031215613bb757600080fd5b613bc083613ab4565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110613bf457613bf4613bce565b9052565b602081016110748284613be4565b6020810160068310613c1a57613c1a613bce565b91905290565b60008083601f840112613c3257600080fd5b50813567ffffffffffffffff811115613c4a57600080fd5b6020830191508360208260051b8501011115613c6557600080fd5b9250929050565b60008060208385031215613c7f57600080fd5b823567ffffffffffffffff811115613c9657600080fd5b613ca285828601613c20565b90969095509350505050565b60008083601f840112613cc057600080fd5b50813567ffffffffffffffff811115613cd857600080fd5b602083019150836020828501011115613c6557600080fd5b600080600080600060808688031215613d0857600080fd5b613d1186613ab4565b9450613d1f60208701613ab4565b935060408601359250606086013567ffffffffffffffff811115613d4257600080fd5b613d4e88828901613cae565b969995985093965092949392505050565b600080600060608486031215613d7457600080fd5b613d7d84613ab4565b9250613d8b60208501613ab4565b9150604084013590509250925092565b60008060408385031215613dae57600080fd5b82359150613b1f60208401613ab4565b60008082840360c0811215613dd257600080fd5b613ddb84613ae6565b925060a0601f1982011215613def57600080fd5b506020830190509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611fa457835183529284019291840191600101613e19565b600060208284031215613e4757600080fd5b61131582613ae6565b60008060008060408587031215613e6657600080fd5b843567ffffffffffffffff80821115613e7e57600080fd5b613e8a88838901613c20565b90965094506020870135915080821115613ea357600080fd5b50613eb087828801613c20565b95989497509550505050565b801515811461167657600080fd5b600060208284031215613edc57600080fd5b813561131581613ebc565b60008060008060608587031215613efd57600080fd5b613f0685613ab4565b9350602085013567ffffffffffffffff811115613f2257600080fd5b613f2e87828801613c20565b9094509250613f41905060408601613ae6565b905092959194509250565b60008060408385031215613f5f57600080fd5b50508035926020909101359150565b60008060208385031215613f8157600080fd5b823567ffffffffffffffff811115613f9857600080fd5b613ca285828601613cae565b60008060408385031215613fb757600080fd5b613fc083613ab4565b91506020830135613fd081613ebc565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561400757600080fd5b61401085613ab4565b935061401e60208601613ab4565b925060408501359150606085013567ffffffffffffffff8082111561404257600080fd5b818701915087601f83011261405657600080fd5b81358181111561406857614068613fdb565b604051601f8201601f19908116603f0116810190838211818310171561409057614090613fdb565b816040528281528a60208487010111156140a957600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806000604084860312156140e257600080fd5b83359250602084013567ffffffffffffffff81111561410057600080fd5b61410c86828701613c20565b9497909650939450505050565b60006020828403121561412b57600080fd5b813567ffffffffffffffff8116811461131557600080fd5b6000806040838503121561415657600080fd5b61415f83613ab4565b9150613b1f60208401613ab4565b600181811c9082168061418157607f821691505b6020821081036141a157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b6000826141cc576141cc6141a7565b500690565b634e487b7160e01b600052603260045260246000fd5b81356141f281613ebc565b815460ff19811691151560ff169182178355602084013561421281613ebc565b61ff0081151560081b16837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00008416171784555050506040820135600182015560608201356002820155608082013560038201555050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561107457611074614269565b8181038181111561107457611074614269565b6000826142b4576142b46141a7565b500490565b808202811582820484141761107457611074614269565b601f821115611694576000816000526020600020601f850160051c810160208610156142f95750805b601f850160051c820191505b81811015611ab557828155600101614305565b67ffffffffffffffff83111561433057614330613fdb565b6143448361433e835461416d565b836142d0565b6000601f84116001811461437857600085156143605750838201355b600019600387901b1c1916600186901b17835561202c565b600083815260209020601f19861690835b828110156143a95786850135825560209485019460019092019101614389565b50868210156143c65760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156143ea57600080fd5b5051919050565b828152604081016113156020830184613be4565b6000600019820361441857614418614269565b5060010190565b6000815461442c8161416d565b60018281168015614444576001811461445957614488565b60ff1984168752821515830287019450614488565b8560005260208060002060005b8581101561447f5781548a820152908401908201614466565b50505082870194505b5050505092915050565b600081516144a4818560208601613b28565b9290920192915050565b60006144ba828561441f565b7f2f00000000000000000000000000000000000000000000000000000000000000815283516144f0816001840160208801613b28565b7f2e706e670000000000000000000000000000000000000000000000000000000060019290910191820152600501949350505050565b6000614532828561441f565b7f2f0000000000000000000000000000000000000000000000000000000000000081528351614568816001840160208801613b28565b7f2e6a736f6e00000000000000000000000000000000000000000000000000000060019290910191820152600601949350505050565b7f7b226e616d65223a22426c617374204d696e65722023000000000000000000008152600086516145d6816016850160208b01613b28565b7f222c226465736372697074696f6e223a2200000000000000000000000000000060169184019182015261460d602782018861441f565b90507f222c22696d616765223a220000000000000000000000000000000000000000008152855161464581600b840160208a01613b28565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a2254600b92909101918201527f797065222c2276616c7565223a22000000000000000000000000000000000000602b82015284516146a9816039840160208901613b28565b7f227d2c7b2274726169745f74797065223a22426f6f737473222c2276616c7565603992909101918201527f223a220000000000000000000000000000000000000000000000000000000000605982015261473361470a605c830186614492565b7f227d5d7d00000000000000000000000000000000000000000000000000000000815260040190565b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161477781601d850160208701613b28565b91909101601d0192915050565b60008161479357614793614269565b506000190190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526147cd6080830184613b4c565b9695505050505050565b6000602082840312156147e957600080fd5b815161131581613a69565b634e487b7160e01b600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220b9ca442e690775230a72590ebfc07fd4a02bbda0f2eaee50aa1f1110ab3128fa64736f6c63430008180033426c617374204d696e65727320697320616e20696e6e6f766174697665204e465420636f6c6c656374696f6e206275696c74206f6e2074686520424c415354204c3220436861696e2e2057652061726520696e74726f647563696e67206120756e69717565207374616b6520616e64206661726d2073797374656d20746f20636f6c6c65637420426c61737420446576656c6f70657220506f696e74732028426c61737420476f6c64292e20576974682061206c696d697465642065646974696f6e206f66203232323220756e69717565204e4654732c205765206f6666657220616e206f70706f7274756e69747920746f206469766520696e746f20746865206469676974616c206d696e696e6720776f726c642e00000000000000000000000043000000000000000000000000000000000000020000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002c8d8b657a8b6ccbe1c854255a7c41d481a1532d203cba4e980bda361ae71c06f00000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027ca57357c000

Deployed Bytecode

0x60806040526004361061055c5760003560e01c806370a08231116102ca578063b88d4fde11610179578063e449f341116100d6578063f2fde38b1161008a578063f8b5efdb1161006f578063f8b5efdb14610f58578063f9dbd17714610f6d578063fe512e8e14610f8057600080fd5b8063f2fde38b14610f18578063f3249ccb14610f3857600080fd5b8063e95a644f116100bb578063e95a644f14610e8f578063e985e9c514610eaf578063ecb8eb2c14610ef857600080fd5b8063e449f34114610e4f578063e8241e2a14610e6f57600080fd5b8063c87b56dd1161012d578063d8ad1e6011610112578063d8ad1e6014610df9578063d9b6a00214610e19578063dafb827a14610e3957600080fd5b8063c87b56dd14610dd9578063d438dadd14610d8f57600080fd5b8063bee9afee1161015e578063bee9afee14610d8f578063c1a7f7a814610da4578063c2a979bb14610db957600080fd5b8063b88d4fde14610d69578063ba41b0c614610d7c57600080fd5b806395d89b4111610227578063ae32b7b0116101db578063b2169fcd116101c0578063b2169fcd14610cbd578063b2b8c93f14610d34578063b3afe49614610d4957600080fd5b8063ae32b7b014610c7d578063ae841cde14610c9d57600080fd5b8063a22cb4651161020c578063a22cb46514610c1d578063a2de55f814610c3d578063ad10282a14610c5d57600080fd5b806395d89b4114610bee578063a1f77c5914610c0357600080fd5b80638593d6d91161027e5780638b38af23116102635780638b38af2314610b9b5780638da5cb5b14610bb057806390c3f38f14610bce57600080fd5b80638593d6d914610b655780638925180214610b8557600080fd5b80637284e416116102af5780637284e41614610b1057806378949f6114610b255780638462151c14610b4557600080fd5b806370a0823114610adb578063715018a614610afb57600080fd5b8063387602981161042657806351e6de1711610383578063672434821161033757806367db01a31161031c57806367db01a314610a7b5780636b9d841514610a9b5780636f8b44b014610abb57600080fd5b80636724348214610a4857806367b0a6ac14610a5b57600080fd5b806355ca068e1161036857806355ca068e146109925780635d89e84214610a085780636352211e14610a2857600080fd5b806351e6de171461094557806352eb77961461096557600080fd5b80634696788f116103da57806348758697116103bf57806348758697146108e55780634b51dd77146109055780634b8f90251461092557600080fd5b80634696788f146108ba57806346a2a37d146108cf57600080fd5b80633ccfd60b1161040b5780633ccfd60b1461087c57806342842e0e14610891578063428a1b1c146108a457600080fd5b8063387602981461084c5780633a93395e1461086657600080fd5b80630fbf0a93116104d457806323b872dd116104885780632e1b4cdc1161046d5780632e1b4cdc146107d757806332cb6b0c146107fe5780633677a7021461081457600080fd5b806323b872dd146107c45780632dc164b6146107af57600080fd5b806318160ddd116104b957806318160ddd146107855780631fdcfe351461079a578063205efaeb146107af57600080fd5b80630fbf0a9314610708578063150b7a021461072857600080fd5b8063081812fc1161052b5780630c248d8d116105105780630c248d8d1461069f5780630e1b26c6146106b45780630e25272d146106db57600080fd5b8063081812fc14610654578063095ea7b31461068c57600080fd5b806301ffc9a71461059557806305f61aa5146105ca578063063a123d146105ec57806306fdde031461063257600080fd5b3661059057604051349033907f1e57e3bb474320be3d2c77138f75b7c3941292d647f5f9634e33a8e94e0e069b90600090a3005b600080fd5b3480156105a157600080fd5b506105b56105b0366004613a97565b610f95565b60405190151581526020015b60405180910390f35b3480156105d657600080fd5b506105ea6105e5366004613acb565b61107a565b005b3480156105f857600080fd5b50610624610607366004613af5565b601d60209081526000928352604080842090915290825290205481565b6040519081526020016105c1565b34801561063e57600080fd5b506106476110b1565b6040516105c19190613b78565b34801561066057600080fd5b5061067461066f366004613b8b565b611143565b6040516001600160a01b0390911681526020016105c1565b6105ea61069a366004613ba4565b611197565b3480156106ab57600080fd5b506106476111a7565b3480156106c057600080fd5b506011546106ce9060ff1681565b6040516105c19190613bf8565b3480156106e757600080fd5b506106fb6106f6366004613b8b565b611235565b6040516105c19190613c06565b34801561071457600080fd5b506105ea610723366004613c6c565b61131c565b34801561073457600080fd5b50610754610743366004613cf0565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016105c1565b34801561079157600080fd5b5061062461139f565b3480156107a657600080fd5b50610624601481565b3480156107bb57600080fd5b50610624606481565b6105ea6107d2366004613d5f565b6113b8565b3480156107e357600080fd5b506107ec600581565b60405160ff90911681526020016105c1565b34801561080a57600080fd5b50610624600d5481565b34801561082057600080fd5b5061062461082f366004613d9b565b601a60209081526000928352604080842090915290825290205481565b34801561085857600080fd5b506014546105b59060ff1681565b34801561087257600080fd5b5061062460105481565b34801561088857600080fd5b506105ea61159b565b6105ea61089f366004613d5f565b611679565b3480156108b057600080fd5b5061062461012c81565b3480156108c657600080fd5b506105ea611699565b3480156108db57600080fd5b5061062460135481565b3480156108f157600080fd5b50610647610900366004613b8b565b611773565b34801561091157600080fd5b506105ea610920366004613b8b565b6117ce565b34801561093157600080fd5b50600c54610674906001600160a01b031681565b34801561095157600080fd5b506105ea610960366004613dbe565b6117db565b34801561097157600080fd5b50610985610980366004613acb565b611825565b6040516105c19190613dfd565b34801561099e57600080fd5b506109de6109ad366004613b8b565b601b6020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b03909516855260208501939093529183015260608201526080016105c1565b348015610a1457600080fd5b506105ea610a23366004613e35565b611891565b348015610a3457600080fd5b50610674610a43366004613b8b565b6118c0565b6105ea610a56366004613e50565b6118cb565b348015610a6757600080fd5b506105ea610a76366004613eca565b611abd565b348015610a8757600080fd5b506105b5610a96366004613ee7565b611ad8565b348015610aa757600080fd5b50610647610ab6366004613b8b565b611ba8565b348015610ac757600080fd5b506105ea610ad6366004613b8b565b611bc6565b348015610ae757600080fd5b50610624610af6366004613acb565b611c40565b348015610b0757600080fd5b506105ea611c9f565b348015610b1c57600080fd5b50610647611cb3565b348015610b3157600080fd5b50610624610b40366004613f4c565b611cc0565b348015610b5157600080fd5b50610985610b60366004613acb565b611eaf565b348015610b7157600080fd5b506105ea610b80366004613acb565b611fb0565b348015610b9157600080fd5b50610624600f5481565b348015610ba757600080fd5b50610624600581565b348015610bbc57600080fd5b506009546001600160a01b0316610674565b348015610bda57600080fd5b506105ea610be9366004613f6e565b612033565b348015610bfa57600080fd5b50610647612048565b348015610c0f57600080fd5b506017546105b59060ff1681565b348015610c2957600080fd5b506105ea610c38366004613fa4565b612057565b348015610c4957600080fd5b50600b54610674906001600160a01b031681565b348015610c6957600080fd5b50610624610c78366004613ba4565b6120c3565b348015610c8957600080fd5b506105ea610c98366004613acb565b6120f4565b348015610ca957600080fd5b506105ea610cb8366004613f6e565b61212b565b348015610cc957600080fd5b50610d0a610cd8366004613e35565b601960205260009081526040902080546001820154600283015460039093015460ff8084169461010090940416929085565b6040805195151586529315156020860152928401919091526060830152608082015260a0016105c1565b348015610d4057600080fd5b506105ea612140565b348015610d5557600080fd5b50610624610d64366004613ba4565b6121d5565b6105ea610d77366004613ff1565b6122b6565b6105ea610d8a3660046140cd565b61230a565b348015610d9b57600080fd5b50610624600281565b348015610db057600080fd5b50610647612672565b348015610dc557600080fd5b506105ea610dd4366004614119565b61267f565b348015610de557600080fd5b50610647610df4366004613b8b565b6126ad565b348015610e0557600080fd5b506105ea610e14366004613eca565b61283a565b348015610e2557600080fd5b50610624610e34366004613b8b565b61289c565b348015610e4557600080fd5b50610624600e5481565b348015610e5b57600080fd5b506105ea610e6a366004613c6c565b6128e0565b348015610e7b57600080fd5b506105ea610e8a366004613f6e565b61291c565b348015610e9b57600080fd5b506105ea610eaa366004613b8b565b612931565b348015610ebb57600080fd5b506105b5610eca366004614143565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610f0457600080fd5b506105ea610f13366004613f6e565b612a90565b348015610f2457600080fd5b506105ea610f33366004613acb565b612aa5565b348015610f4457600080fd5b506105ea610f53366004613e35565b612af9565b348015610f6457600080fd5b50610624607881565b6105ea610f7b366004613b8b565b612b88565b348015610f8c57600080fd5b50610647612c3e565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061102857507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061107457507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b611082612c4b565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6060600280546110c09061416d565b80601f01602080910402602001604051908101604052809291908181526020018280546110ec9061416d565b80156111395780601f1061110e57610100808354040283529160200191611139565b820191906000526020600020905b81548152906001019060200180831161111c57829003601f168201915b5050505050905090565b600061114e82612c91565b61117b5761117b7fcf4700e400000000000000000000000000000000000000000000000000000000612cd6565b506000908152600660205260409020546001600160a01b031690565b6111a382826001612ce0565b5050565b601880546111b49061416d565b80601f01602080910402602001604051908101604052809291908181526020018280546111e09061416d565b801561122d5780601f106112025761010080835404028352916020019161122d565b820191906000526020600020905b81548152906001019060200180831161121057829003601f168201915b505050505081565b6000600f54600003611273576040517f6289bdad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006064600f5484604051602001611295929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6112b891906141bd565b90506000603c8210156112cd57506000611315565b60508210156112de57506001611315565b605a8210156112ef57506002611315565b605f82101561130057506003611315565b606282101561131157506004611315565b5060055b9392505050565b611324612da9565b60145460ff16611360576040517f5e0ff49500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156113945761138c838383818110611380576113806141d1565b90506020020135612dec565b600101611363565b506111a36001600a55565b60015460005403600019805b146113b557600854015b90565b60006113c382612ec4565b6001600160a01b039485169490915081168414611403576114037fa114810000000000000000000000000000000000000000000000000000000000612cd6565b60008281526006602052604090208054338082146001600160a01b03881690911417611460576114338633610eca565b611460576114607f59c896be00000000000000000000000000000000000000000000000000000000612cd6565b801561146b57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c02000000000000000000000000000000000000000000000000000000008416900361152f5760018401600081815260046020526040812054900361152d57600054811461152d5760008181526004602052604090208490555b505b6001600160a01b0385168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003611592576115927fea553b3400000000000000000000000000000000000000000000000000000000612cd6565b50505050505050565b6115a3612c4b565b60006115b76009546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114611601576040519150601f19603f3d011682016040523d82523d6000602084013e611606565b606091505b5050905080611676576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5472616e73666572206661696c65642e0000000000000000000000000000000060448201526064015b60405180910390fd5b50565b611694838383604051806020016040528060008152506122b6565b505050565b6116a1612c4b565b600b60009054906101000a90046001600160a01b03166001600160a01b0316637114177a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156116f157600080fd5b505af1158015611705573d6000803e3d6000fd5b50505050600b60009054906101000a90046001600160a01b03166001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561175957600080fd5b505af115801561176d573d6000803e3d6000fd5b50505050565b6060600f546000146117955761179061178b83611235565b612f5a565b611074565b505060408051808201909152600781527f756e6b6e6f776e00000000000000000000000000000000000000000000000000602082015290565b6117d6612c4b565b600e55565b6117e3612c4b565b80601960008460038111156117fa576117fa613bce565b600381111561180b5761180b613bce565b8152602001908152602001600020818161176d91906141e7565b6001600160a01b0381166000908152601c602090815260409182902080548351818402810184019094528084526060939283018282801561188557602002820191906000526020600020905b815481526020019060010190808311611871575b50505050509050919050565b611899612c4b565b6011805482919060ff191660018360038111156118b8576118b8613bce565b021790555050565b600061107482612ec4565b6118d3612c4b565b82811461193c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c696420696e70757400000000000000000000000000000000000000604482015260640161166d565b600f541561195d5760405163011616d960e61b815260040160405180910390fd5b6000805b828110156119975783838281811061197b5761197b6141d1565b905060200201358261198d919061427f565b9150600101611961565b506001600d546119a79190614292565b816119b061312f565b6119ba919061427f565b11156119d95760405163011616d960e61b815260040160405180910390fd5b60005b84811015611ab557611a2c8686838181106119f9576119f96141d1565b9050602002016020810190611a0e9190613acb565b858584818110611a2057611a206141d1565b9050602002013561313b565b858582818110611a3e57611a3e6141d1565b9050602002016020810190611a539190613acb565b6001600160a01b03167f7bd6d4be1decdc27a9ed9c7ccdf5bb7cc38e31b3647b958c6b37162a2296c0fa858584818110611a8f57611a8f6141d1565b90506020020135604051611aa591815260200190565b60405180910390a26001016119dc565b505050505050565b611ac5612c4b565b6017805460ff1916911515919091179055565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660208201526000908190603401604051602081830303815290604052805190602001209050611b9c85858080602002602001604051908101604052809392919081815260200183836020028082843760009201829052506019935091508790506003811115611b7357611b73613bce565b6003811115611b8457611b84613bce565b8152602001908152602001600020600201548361322d565b9150505b949350505050565b6000818152601b602052604090206001015460609061107490613243565b611bce612c4b565b600f5415611bef5760405163011616d960e61b815260040160405180910390fd5b611bf761139f565b611c0290600161427f565b811015611c3b576040517fa63b383900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d55565b60006001600160a01b038216611c7957611c797f8f4eb60400000000000000000000000000000000000000000000000000000000612cd6565b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611ca7612c4b565b611cb160006132e3565b565b601280546111b49061416d565b600080611ccc84613342565b80519091506001600160a01b03163014611cea576000915050611074565b6000848152601b60209081526040808320815160808101835281546001600160a01b03168152600182015493810193909352600281015491830191909152600301546060820152908415611d3e5784611d40565b425b9050826020015167ffffffffffffffff16811015611d8a576040517fb7d0949700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000836020015167ffffffffffffffff1682611da69190614292565b90506000611db762093a80836142a5565b90506000856020015167ffffffffffffffff1660105410611dda57601054611dea565b856020015167ffffffffffffffff165b9050600061012c611dfb8387614292565b611e0591906142a5565b9050600086602001516002611e1a91906142b9565b611e2590606461427f565b90506000611e328561289c565b905060006005611e418e611235565b6005811115611e5257611e52613bce565b611e5c91906142b9565b611e6790606461427f565b9050600081611e7684866142b9565b611e8091906142b9565b90506000620f4240611e9283886142b9565b611e9c91906142a5565b9f9e505050505050505050505050505050565b60606000806000611ebf85611c40565b905060008167ffffffffffffffff811115611edc57611edc613fdb565b604051908082528060200260200182016040528015611f05578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081018290529192505b838614611fa457611f3d816133ba565b91508160400151611f9c5781516001600160a01b031615611f5d57815194505b876001600160a01b0316856001600160a01b031603611f9c5780838780600101985081518110611f8f57611f8f6141d1565b6020026020010181815250505b600101611f2d565b50909695505050505050565b611fb8612c4b565b600c546040517f36b91f2b0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152909116906336b91f2b90602401600060405180830381600087803b15801561201857600080fd5b505af115801561202c573d6000803e3d6000fd5b5050505050565b61203b612c4b565b6012611694828483614318565b6060600380546110c09061416d565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b601c60205281600052604060002081815481106120df57600080fd5b90600052602060002001600091509150505481565b6120fc612c4b565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b612133612c4b565b6018611694828483614318565b612148612c4b565b600b546040517f662aa11d0000000000000000000000000000000000000000000000000000000081523060048201523360248201526001600160a01b039091169063662aa11d906044016020604051808303816000875af11580156121b1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167691906143d8565b6001600160a01b0382166000908152601c602090815260408083208054825181850281018501909352808352849383018282801561223257602002820191906000526020600020905b81548152602001906001019080831161221e575b50506013546000908152601a602090815260408083206001600160a01b038c168452909152812054949550925050505b82518110156122ad57600083828151811061227f5761227f6141d1565b6020026020010151905060006122958288611cc0565b90506122a1818561427f565b93505050600101612262565b50949350505050565b6122c18484846113b8565b6001600160a01b0383163b1561176d576122dd84848484613439565b61176d5761176d7fd1a57ed600000000000000000000000000000000000000000000000000000000612cd6565b600d548361231661312f565b612320919061427f565b111561233f5760405163011616d960e61b815260040160405180910390fd5b60115460199060009060ff16600381111561235c5761235c613bce565b600381111561236d5761236d613bce565b815260208101919091526040016000205460ff166123b7576040517fc75933e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152601d6020526040812060115485929060ff1660038111156123e0576123e0613bce565b60038111156123f1576123f1613bce565b81526020019081526020016000205461240a919061427f565b60115460199060009060ff16600381111561242757612427613bce565b600381111561243857612438613bce565b8152602001908152602001600020600101541015612482576040517f303b682f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60115460199060009060ff16600381111561249f5761249f613bce565b60038111156124b0576124b0613bce565b8152602081019190915260400160002054610100900460ff1615612519576011546124e39033908490849060ff16611ad8565b612519576040517f06fb10a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6011546000908490601990839060ff16600381111561253a5761253a613bce565b600381111561254b5761254b613bce565b81526020019081526020016000206003015461256791906142b9565b9050803410156125a3576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152601d6020526040812060115486929060ff1660038111156125cc576125cc613bce565b60038111156125dd576125dd613bce565b815260200190815260200160002060008282546125fa919061427f565b9091555050600d548461260b61312f565b612615919061427f565b0361261f5742600f555b612629338561313b565b60115460405133917fdcb23284f3935b5557998e99dcc286e29744c5000723d99eecd5d6f5694f6e119161266491889160ff909116906143f1565b60405180910390a250505050565b601680546111b49061416d565b612687612c4b565b67ffffffffffffffff8116601055601380549060006126a583614405565b919050555050565b60606000600f546000146126eb5760156126c684613243565b6040516020016126d79291906144ae565b604051602081830303815290604052612777565b601680546126f89061416d565b80601f01602080910402602001604051908101604052809291908181526020018280546127249061416d565b80156127715780601f1061274657610100808354040283529160200191612771565b820191906000526020600020905b81548152906001019060200180831161275457829003601f168201915b50505050505b60175490915060ff16156127b857601861279084613243565b6040516020016127a1929190614526565b604051602081830303815290604052915050919050565b60006127c384611773565b905060006127d085611ba8565b905060006127dd86613243565b60128585856040516020016127f695949392919061459e565b604051602081830303815290604052905061281081613549565b604051602001612820919061473f565b604051602081830303815290604052945050505050919050565b612842612c4b565b600f5460000361287e576040517fb7d0949700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561288957426010555b6014805460ff1916911515919091179055565b6000816000036128ae57506064919050565b600060646128bd6002856142b9565b6128c7919061427f565b9050607881116128d75780611315565b60789392505050565b6128e8612da9565b60005b8181101561139457612914838383818110612908576129086141d1565b905060200201356136a9565b6001016128eb565b612924612c4b565b6016611694828483614318565b6000818152601b6020526040812080546003909101546001600160a01b03909116919061295e9042614292565b90506001600160a01b03821633146129a2576040517f4d01b4c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808110156129df576040517f7215920700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6202a300811115612a05576000838152601b602052604090206001600290910155612a2d565b6000838152601b60205260408120600201805460019290612a2790849061427f565b90915550505b6000838152601b6020526040902042600382015560020154612a519060649061427f565b6013546000908152601a602090815260408083206001600160a01b038716845290915281208054909190612a8690849061427f565b9091555050505050565b612a98612c4b565b6015611694828483614318565b612aad612c4b565b6001600160a01b038116612af0576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161166d565b611676816132e3565b612b01612c4b565b60196000826003811115612b1757612b17613bce565b6003811115612b2857612b28613bce565b8152602081019190915260400160009081205460ff161590601990836003811115612b5557612b55613bce565b6003811115612b6657612b66613bce565b81526020810191909152604001600020805460ff191691151591909117905550565b600e54341015612bc4576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152601b6020526040902060010154600511612c0f576040517fbf17fb9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001601b60008381526020019081526020016000206001016000828254612c36919061427f565b909155505050565b601580546111b49061416d565b6009546001600160a01b03163314611cb1576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161166d565b60008054821015612cd15760005b5060008281526004602052604081205490819003612cc757612cc083614784565b9250612c9f565b600160e01b161590505b919050565b8060005260046000fd5b6000612ceb836118c0565b9050818015612d035750336001600160a01b03821614155b15612d3f57612d128133610eca565b612d3f57612d3f7fcfb3b94200000000000000000000000000000000000000000000000000000000612cd6565b600083815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b6002600a5403612de5576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600a55565b6000818152601b60205260409020546001600160a01b031615612e3b576040517f0ae3514d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152601b60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191633908117909155808452601c835290832080546001810182559084529190922001829055612e94903083611679565b604051819033907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90600090a350565b60008181526004602052604090205480600003612f37576000548210612ef457612ef4636f96cda160e11b612cd6565b5b50600019016000818152600460205260409020548015612ef557600160e01b8116600003612f2257919050565b612f32636f96cda160e11b612cd6565b612ef5565b600160e01b8116600003612f4a57919050565b612cd1636f96cda160e11b612cd6565b60606001826005811115612f7057612f70613bce565b03612fae57505060408051808201909152600e81527f536b696c6c656420576f726b6572000000000000000000000000000000000000602082015290565b6002826005811115612fc257612fc2613bce565b0361300057505060408051808201909152601081527f53686966742053757065727669736f7200000000000000000000000000000000602082015290565b600382600581111561301457613014613bce565b0361305257505060408051808201909152600781527f466f72656d616e00000000000000000000000000000000000000000000000000602082015290565b600482600581111561306657613066613bce565b036130a457505060408051808201909152600f81527f4d696e696e67204469726563746f720000000000000000000000000000000000602082015290565b60058260058111156130b8576130b8613bce565b036130f657505060408051808201909152600481527f4b696e6700000000000000000000000000000000000000000000000000000000602082015290565b505060408051808201909152601081527f4d696e696e6720417373697374616e7400000000000000000000000000000000602082015290565b600054600019806113ab565b6000805490829003613170576131707fb562e8dd00000000000000000000000000000000000000000000000000000000612cd6565b60008181526004602090815260408083206001600160a01b0387164260a01b6001881460e11b178117909155808452600590925282208054680100000000000000018602019055908190036131e8576131e87f2e07630000000000000000000000000000000000000000000000000000000000612cd6565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a48181600101915081036131ed575060005550505050565b60008261323a8584613861565b14949350505050565b60606000613250836138a4565b600101905060008167ffffffffffffffff81111561327057613270613fdb565b6040519080825280601f01601f19166020018201604052801561329a576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846132a457509392505050565b600980546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915261107461337283612ec4565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461107490604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061346e90339089908890889060040161479b565b6020604051808303816000875af19250505080156134a9575060408051601f3d908101601f191682019092526134a6918101906147d7565b60015b613517573d8080156134d7576040519150601f19603f3d011682016040523d82523d6000602084013e6134dc565b606091505b50805160000361350f5761350f7fd1a57ed600000000000000000000000000000000000000000000000000000000612cd6565b805181602001fd5b7fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b149050611ba0565b6060815160000361356857505060408051602081019091526000815290565b600060405180606001604052806040815260200161480b6040913990506000600384516002613597919061427f565b6135a191906142a5565b6135ac9060046142b9565b67ffffffffffffffff8111156135c4576135c4613fdb565b6040519080825280601f01601f1916602001820160405280156135ee576020820181803683370190505b50905060018201602082018586518701602081018051600082525b82841015613664576003840193508351603f8160121c168701518653600186019550603f81600c1c168701518653600186019550603f8160061c168701518653600186019550603f8116870151865350600185019450613609565b905250508551600390066001811461368357600281146136965761369e565b603d6001830353603d600283035361369e565b603d60018303535b509195945050505050565b6000818152601b60205260409020546001600160a01b03163381146136fa576040517f4d01b4c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006137068342611cc0565b9050600060646137176014846142b9565b61372191906142a5565b61372b9083614292565b6013546000908152601a602090815260408083206001600160a01b038816845290915281208054929350839290919061376590849061427f565b90915550506000848152601b6020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916815560020191909155517f42842e0e00000000000000000000000000000000000000000000000000000000815230600482018190526001600160a01b0385166024830152604482018690529081906342842e0e90606401600060405180830381600087803b15801561380357600080fd5b505af1158015613817573d6000803e3d6000fd5b5050505061382485613986565b60405185906001600160a01b038616907f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f7590600090a35050505050565b600081815b845181101561389c5761389282868381518110613885576138856141d1565b6020026020010151613a3d565b9150600101613866565b509392505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106138ed577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613919576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061393757662386f26fc10000830492506010015b6305f5e100831061394f576305f5e100830492506008015b612710831061396357612710830492506004015b60648310613975576064830492506002015b600a83106110745760010192915050565b336000908152601c60205260408120905b815481101561169457828282815481106139b3576139b36141d1565b906000526020600020015403613a3557815482906139d390600190614292565b815481106139e3576139e36141d1565b9060005260206000200154828281548110613a0057613a006141d1565b906000526020600020018190555081805480613a1e57613a1e6147f4565b600190038181906000526020600020016000905590555b600101613997565b6000818310613a59576000828152602084905260409020611315565b5060009182526020526040902090565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461167657600080fd5b600060208284031215613aa957600080fd5b813561131581613a69565b80356001600160a01b0381168114612cd157600080fd5b600060208284031215613add57600080fd5b61131582613ab4565b803560048110612cd157600080fd5b60008060408385031215613b0857600080fd5b613b1183613ab4565b9150613b1f60208401613ae6565b90509250929050565b60005b83811015613b43578181015183820152602001613b2b565b50506000910152565b60008151808452613b64816020860160208601613b28565b601f01601f19169290920160200192915050565b6020815260006113156020830184613b4c565b600060208284031215613b9d57600080fd5b5035919050565b60008060408385031215613bb757600080fd5b613bc083613ab4565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110613bf457613bf4613bce565b9052565b602081016110748284613be4565b6020810160068310613c1a57613c1a613bce565b91905290565b60008083601f840112613c3257600080fd5b50813567ffffffffffffffff811115613c4a57600080fd5b6020830191508360208260051b8501011115613c6557600080fd5b9250929050565b60008060208385031215613c7f57600080fd5b823567ffffffffffffffff811115613c9657600080fd5b613ca285828601613c20565b90969095509350505050565b60008083601f840112613cc057600080fd5b50813567ffffffffffffffff811115613cd857600080fd5b602083019150836020828501011115613c6557600080fd5b600080600080600060808688031215613d0857600080fd5b613d1186613ab4565b9450613d1f60208701613ab4565b935060408601359250606086013567ffffffffffffffff811115613d4257600080fd5b613d4e88828901613cae565b969995985093965092949392505050565b600080600060608486031215613d7457600080fd5b613d7d84613ab4565b9250613d8b60208501613ab4565b9150604084013590509250925092565b60008060408385031215613dae57600080fd5b82359150613b1f60208401613ab4565b60008082840360c0811215613dd257600080fd5b613ddb84613ae6565b925060a0601f1982011215613def57600080fd5b506020830190509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611fa457835183529284019291840191600101613e19565b600060208284031215613e4757600080fd5b61131582613ae6565b60008060008060408587031215613e6657600080fd5b843567ffffffffffffffff80821115613e7e57600080fd5b613e8a88838901613c20565b90965094506020870135915080821115613ea357600080fd5b50613eb087828801613c20565b95989497509550505050565b801515811461167657600080fd5b600060208284031215613edc57600080fd5b813561131581613ebc565b60008060008060608587031215613efd57600080fd5b613f0685613ab4565b9350602085013567ffffffffffffffff811115613f2257600080fd5b613f2e87828801613c20565b9094509250613f41905060408601613ae6565b905092959194509250565b60008060408385031215613f5f57600080fd5b50508035926020909101359150565b60008060208385031215613f8157600080fd5b823567ffffffffffffffff811115613f9857600080fd5b613ca285828601613cae565b60008060408385031215613fb757600080fd5b613fc083613ab4565b91506020830135613fd081613ebc565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561400757600080fd5b61401085613ab4565b935061401e60208601613ab4565b925060408501359150606085013567ffffffffffffffff8082111561404257600080fd5b818701915087601f83011261405657600080fd5b81358181111561406857614068613fdb565b604051601f8201601f19908116603f0116810190838211818310171561409057614090613fdb565b816040528281528a60208487010111156140a957600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806000604084860312156140e257600080fd5b83359250602084013567ffffffffffffffff81111561410057600080fd5b61410c86828701613c20565b9497909650939450505050565b60006020828403121561412b57600080fd5b813567ffffffffffffffff8116811461131557600080fd5b6000806040838503121561415657600080fd5b61415f83613ab4565b9150613b1f60208401613ab4565b600181811c9082168061418157607f821691505b6020821081036141a157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b6000826141cc576141cc6141a7565b500690565b634e487b7160e01b600052603260045260246000fd5b81356141f281613ebc565b815460ff19811691151560ff169182178355602084013561421281613ebc565b61ff0081151560081b16837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00008416171784555050506040820135600182015560608201356002820155608082013560038201555050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561107457611074614269565b8181038181111561107457611074614269565b6000826142b4576142b46141a7565b500490565b808202811582820484141761107457611074614269565b601f821115611694576000816000526020600020601f850160051c810160208610156142f95750805b601f850160051c820191505b81811015611ab557828155600101614305565b67ffffffffffffffff83111561433057614330613fdb565b6143448361433e835461416d565b836142d0565b6000601f84116001811461437857600085156143605750838201355b600019600387901b1c1916600186901b17835561202c565b600083815260209020601f19861690835b828110156143a95786850135825560209485019460019092019101614389565b50868210156143c65760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156143ea57600080fd5b5051919050565b828152604081016113156020830184613be4565b6000600019820361441857614418614269565b5060010190565b6000815461442c8161416d565b60018281168015614444576001811461445957614488565b60ff1984168752821515830287019450614488565b8560005260208060002060005b8581101561447f5781548a820152908401908201614466565b50505082870194505b5050505092915050565b600081516144a4818560208601613b28565b9290920192915050565b60006144ba828561441f565b7f2f00000000000000000000000000000000000000000000000000000000000000815283516144f0816001840160208801613b28565b7f2e706e670000000000000000000000000000000000000000000000000000000060019290910191820152600501949350505050565b6000614532828561441f565b7f2f0000000000000000000000000000000000000000000000000000000000000081528351614568816001840160208801613b28565b7f2e6a736f6e00000000000000000000000000000000000000000000000000000060019290910191820152600601949350505050565b7f7b226e616d65223a22426c617374204d696e65722023000000000000000000008152600086516145d6816016850160208b01613b28565b7f222c226465736372697074696f6e223a2200000000000000000000000000000060169184019182015261460d602782018861441f565b90507f222c22696d616765223a220000000000000000000000000000000000000000008152855161464581600b840160208a01613b28565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a2254600b92909101918201527f797065222c2276616c7565223a22000000000000000000000000000000000000602b82015284516146a9816039840160208901613b28565b7f227d2c7b2274726169745f74797065223a22426f6f737473222c2276616c7565603992909101918201527f223a220000000000000000000000000000000000000000000000000000000000605982015261473361470a605c830186614492565b7f227d5d7d00000000000000000000000000000000000000000000000000000000815260040190565b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161477781601d850160208701613b28565b91909101601d0192915050565b60008161479357614793614269565b506000190190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526147cd6080830184613b4c565b9695505050505050565b6000602082840312156147e957600080fd5b815161131581613a69565b634e487b7160e01b600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220b9ca442e690775230a72590ebfc07fd4a02bbda0f2eaee50aa1f1110ab3128fa64736f6c63430008180033

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

00000000000000000000000043000000000000000000000000000000000000020000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002c8d8b657a8b6ccbe1c854255a7c41d481a1532d203cba4e980bda361ae71c06f00000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027ca57357c000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027ca57357c000

-----Decoded View---------------
Arg [0] : blastGas (address): 0x4300000000000000000000000000000000000002
Arg [1] : blastPoints (address): 0x2536FE9ab3F511540F2f9e2eC2A805005C3Dd800
Arg [2] : ogData (tuple):
Arg [1] : saleActive (bool): False
Arg [2] : whitelistActive (bool): True
Arg [3] : maxPerWallet (uint256): 2
Arg [4] : root (bytes32): 0xc8d8b657a8b6ccbe1c854255a7c41d481a1532d203cba4e980bda361ae71c06f
Arg [5] : price (uint256): 700000000000000

Arg [3] : alData (tuple):
Arg [1] : saleActive (bool): True
Arg [2] : whitelistActive (bool): False
Arg [3] : maxPerWallet (uint256): 5
Arg [4] : root (bytes32): 0x0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : price (uint256): 700000000000000

Arg [4] : fcfsData (tuple):
Arg [1] : saleActive (bool): True
Arg [2] : whitelistActive (bool): False
Arg [3] : maxPerWallet (uint256): 5
Arg [4] : root (bytes32): 0x0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : price (uint256): 700000000000000

Arg [5] : publicData (tuple):
Arg [1] : saleActive (bool): True
Arg [2] : whitelistActive (bool): False
Arg [3] : maxPerWallet (uint256): 5
Arg [4] : root (bytes32): 0x0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : price (uint256): 700000000000000


-----Encoded View---------------
22 Constructor Arguments found :
Arg [0] : 0000000000000000000000004300000000000000000000000000000000000002
Arg [1] : 0000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [5] : c8d8b657a8b6ccbe1c854255a7c41d481a1532d203cba4e980bda361ae71c06f
Arg [6] : 00000000000000000000000000000000000000000000000000027ca57357c000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 00000000000000000000000000000000000000000000000000027ca57357c000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [16] : 00000000000000000000000000000000000000000000000000027ca57357c000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [21] : 00000000000000000000000000000000000000000000000000027ca57357c000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
0x16594aF3945fcb290C6cD9De998698a3216f6E1a
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.