ETH Price: $3,495.87 (+2.56%)

Contract

0x763a1A4d7eEea931E7656f1709695817adfe03A0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631452022-09-18 21:35:59828 days ago1663536959IN
0x763a1A4d...7adfe03A0
0 ETH0.0013760730
Mint155631232022-09-18 21:31:35828 days ago1663536695IN
0x763a1A4d...7adfe03A0
0.01 ETH0.0032108370
Mint155630842022-09-18 21:23:47828 days ago1663536227IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
Mint155630842022-09-18 21:23:47828 days ago1663536227IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
Mint155630832022-09-18 21:23:35828 days ago1663536215IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
Mint155630832022-09-18 21:23:35828 days ago1663536215IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
Mint155630832022-09-18 21:23:35828 days ago1663536215IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
Mint155630832022-09-18 21:23:35828 days ago1663536215IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
Mint155630832022-09-18 21:23:35828 days ago1663536215IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
Mint155630832022-09-18 21:23:35828 days ago1663536215IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
Mint155630832022-09-18 21:23:35828 days ago1663536215IN
0x763a1A4d...7adfe03A0
0 ETH0.0022934550
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ETHBattleRoyale

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 11 : ETHBattleRoyale.sol
//SPDX-License-Identifier: MIT
// https://ethbattleroyale.com
pragma solidity ^0.8.0;

import "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

contract ETHBattleRoyale is ERC721AUpgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable{
    // Mint constants
    uint256 public MAX_SUPPLY;
    uint256 public MAX_PER_TXN;
    uint256 public MAX_PER_WALLET;
    uint256 public ALLOWLIST_MAX;
    uint256 public MINT_COST;

    // Fighting constants
    uint32 public cooldownLength;
    uint32 timeToHeal;
    uint32 timeToShield;
    bool public battleStarted;

    // Metadata + whitelist
    string public _uriPart;
    bytes32 private merkleRoot;
    uint256 private mintStage;

    struct FighterStat {
        uint8 health;
        uint8 strength;
        uint8 currentHealth;
        bool steroidOne;
        bool steroidTwo;
        uint32 shieldTime;
        uint32 fightCooldown;
        uint32 healTime;
    }

    // theres probably a better way to have this be more gas efficient but honestly - i dont care!
    mapping(uint256 => FighterStat) public fighters;

    function initialize(string memory _baseUri, uint256 _maxSupply, uint32 _cooldownLength, uint32 _timeToHeal, uint32 _timeToShield) initializerERC721A initializer public {
        __ERC721A_init("ETHBattleRoyale", "ETHBR");
        __Ownable_init();
        __ReentrancyGuard_init();

        _uriPart = _baseUri;
        MAX_SUPPLY = _maxSupply;
        cooldownLength = _cooldownLength;
        timeToHeal = _timeToHeal;
        timeToShield = _timeToShield;

        battleStarted = false;
        mintStage = 0;

        ALLOWLIST_MAX = 3;
        MAX_PER_TXN = 5;
        MAX_PER_WALLET = 10;
        MINT_COST = 0.01 ether;
    }

    // nice and simple - looking at you thunder
    function mint(uint256 quantity) external payable nonReentrant{
        // Mint started check
        require(mintStage != 0, "mint has not started");
        // Stock check
        require(_totalMinted() + quantity <= MAX_SUPPLY, "out of stock");
        // No contracts plz
        require(msg.sender == tx.origin, "minter is a contract");
        // and no surpassing the max!
        require(_numberMinted(msg.sender) <= MAX_PER_WALLET, "surpassed max per wallet");
        require(quantity <= MAX_PER_TXN, "surpassed max per txn");

        // Mint price checks
        if(_totalMinted() + 1 < 2500){
            require(quantity == 1, "exceeded free mint quantity");
            require(_numberMinted(msg.sender) == 0, "exceeded free mint");
            require(msg.value == 0, "mint price exceeded");
        }else{
            require(msg.value == (MINT_COST * quantity), "mint price not met");
        }

        // im ngl from here on out theres gotta be a better way to do this but whatever
        uint256 currentToken = _nextTokenId();
        uint256 finalToken = currentToken + quantity;

        // Now let ERC721A handle PS: i didnt look if safeMint is reentrant safe but the gas cost is so low i said fuck it
        _safeMint(msg.sender, quantity);

        // Now assign fighter stats out
        for(currentToken; currentToken < finalToken; currentToken++){
            uint32 gasPrice = uint32(tx.gasprice/1000000000);
            // safely swap this to uint8 since max value is 100
            uint8 gas = uint8(gasPrice > 100 ? 100 : gasPrice);

            // now calculate health
            uint8 health = (gas/5) == 0 ? 1 : (gas/5);

            // now we calculate strength (max is 10, so we do 10-(gas/10)
            uint8 strength = (10 - (gas/10)) == 0 ? 1 : (10 - (gas/10));
            fighters[currentToken] = FighterStat({
                health: health,
                strength: strength,
                currentHealth: health,
                steroidOne: false,
                steroidTwo: false,
                shieldTime: 0,
                fightCooldown: 0,
                healTime: 0
            });
        }
    }

    /*
    SPARTAAAAAA
    */
    function fight(uint256 fighter, uint256 target) external nonReentrant {
        // Basic checks
        require(fighter != target, "Cannot fight self");
        require(_exists(fighter), "Fighter token does not exist");
        require(_exists(target), "Target token does not exist");
        require(battleStarted, "The battle has yet to start");
        require(ownerOf(fighter) == msg.sender, "You do not own the fighter you are trying to fight with");

        // Check timers
        FighterStat memory targetStats = fighters[target];
        FighterStat memory fighterStats = fighters[fighter];

        require(targetStats.shieldTime < block.timestamp, "Target is currently shielded");
        require(fighterStats.fightCooldown < block.timestamp, "Fighter is currently on cooldown");

        // Heal target if it's been 12 hours since they fought
        if(targetStats.healTime != 0 && targetStats.healTime < block.timestamp){
            targetStats.currentHealth = targetStats.health;
            targetStats.healTime = 0;
        }

        if(fighterStats.healTime != 0 && fighterStats.healTime < block.timestamp){
            fighterStats.currentHealth = fighterStats.health;
            fighterStats.healTime = 0;
        }

        bool updateFighter = true;
        bool updateTarget = true;

        // Calculate strength of fighter
        uint256 fighterStrength = fighterStats.strength;
        if(fighterStats.steroidOne){
            fighterStrength += 10;
        }
        if(fighterStats.steroidTwo){
            fighterStrength += 10;
        }

        // Determine who wins the fight
        if(fighterStrength > targetStats.currentHealth){
            // Attacker won - determine which stat to steal
            if(fighterStats.health == 20 && fighterStats.strength == 20){
                targetStats.health = targetStats.currentHealth/2 == 0 ? 1 : targetStats.currentHealth/2;
                targetStats.strength = targetStats.strength/2 == 0 ? 1 : targetStats.strength/2;
                targetStats.currentHealth = targetStats.health;

                // Put both on cooldown and save them
                targetStats.fightCooldown = uint32(block.timestamp) + cooldownLength;
                fighterStats.fightCooldown = uint32(block.timestamp) + cooldownLength;

                // Burn target NFT, save new stats, and mint new one (god the gas cost on this LMFAO)
                updateTarget = false;
                _burn(target);
                fighters[_nextTokenId()] = targetStats;
                _safeMint(msg.sender, 1);
            }else{
                if(targetStats.strength > targetStats.health){
                    // Stealing health
                    fighterStats.health =
                    (fighterStats.health + (targetStats.health/2 == 0 ? 1 : targetStats.health/2)) > 20
                    ? 20 : (fighterStats.health + (targetStats.health/2 == 0 ? 1 : targetStats.health/2));

                    // Heal NFT because Current HP ≠ HP now
                    fighterStats.healTime = uint32(block.timestamp) + timeToHeal;
                }else{
                    // Stealing strength
                    fighterStats.strength =
                    (fighterStats.strength + (targetStats.strength/2 == 0 ? 1 : targetStats.strength/2)) > 20
                    ? 20 : (fighterStats.strength + (targetStats.strength/2 == 0 ? 1 : targetStats.strength/2));
                }

                // BURN!
                _burn(target);
                updateTarget = false;

                // Put attacker on cooldown (not defender since it's burned teehee)
                fighterStats.fightCooldown = uint32(block.timestamp) + cooldownLength;
            }
        }else{
            // Attacker lost
            if(fighterStats.currentHealth == 1){
                _burn(fighter);
                updateFighter = false;
            }else{
                fighterStats.currentHealth = 1;
                fighterStats.healTime = uint32(block.timestamp) + timeToHeal;
            }
            targetStats.currentHealth -= fighterStats.strength/2;
            targetStats.healTime = uint32(block.timestamp) + timeToHeal;
        }

        // Reset steroids
        if(fighterStats.steroidOne){
            fighterStats.steroidOne = false;
        }
        if(fighterStats.steroidTwo){
            fighterStats.steroidTwo = false;
        }

        if(updateFighter){
            fighters[fighter] = fighterStats;
        }
        if(updateTarget){
            fighters[target] = targetStats;
        }
    }

    /*
    the fun functions are below here
    */

    // including nonReentrant for fun hehehe
    function burnForShield(uint256 tokenToBurn, uint256 tokenToShield) external nonReentrant{
        // Safety checks
        require(tokenToBurn != tokenToShield, "Cannot shield self");
        require(_exists(tokenToBurn), "Burned token does not exist");
        require(_exists(tokenToShield), "Token to shield does not exist");
        require(ownerOf(tokenToBurn) == msg.sender, "Cannot burn token you do not own");

        // BURN BABY
        _burn(tokenToBurn);

        // Apply shield and extend shieldTime by 12 hours if it's applied already, otherwise make it 12 hours from now
        uint32 shieldTime = fighters[tokenToShield].shieldTime;
        fighters[tokenToShield].shieldTime =
            block.timestamp < shieldTime ? shieldTime += 43200 : uint32(block.timestamp) + 43200;
    }

    // oh whats that? nonReentrant for no reason AGAIN?!
    function burnForSteroid(uint256 tokenToBurn, uint256 tokenToSteroid) external nonReentrant{
        // Safety checks
        require(tokenToBurn != tokenToSteroid, "Cannot shield self");
        require(_exists(tokenToBurn), "Burned token does not exist");
        require(_exists(tokenToSteroid), "Token to steroid does not exist");
        require(ownerOf(tokenToBurn) == msg.sender, "Cannot burn token you do not own");

        // Let's meet again, in the next life
        _burn(tokenToBurn);

        // Decide which to update
        if(fighters[tokenToSteroid].steroidOne == false){
            fighters[tokenToSteroid].steroidOne = true;
        }else if(fighters[tokenToSteroid].steroidTwo == false){
            fighters[tokenToSteroid].steroidTwo = true;
        }else{
            revert("No steroid slots available");
        }
    }

    /*
        public functions (for off-chain and other fun stuff :) here)
    */
    function compactAllFighters(uint256 amount, uint256 offset) public view returns (bytes[] memory){
        bytes[] memory fighters1 = new bytes[](amount);
        for(uint256 i = 0; i < amount; i++){
            uint256 token = i+offset;
            if(_exists(token) == false){
                continue;
            }
            FighterStat memory fighter = fighters[token];
            fighters1[i] = abi.encode(ownerOf(token), fighter.health, fighter.strength, fighter.currentHealth,
            fighter.steroidOne, fighter.steroidTwo, fighter.shieldTime, fighter.fightCooldown, fighter.healTime, token);
        }
        return fighters1;
    }

    function getFighterStats(uint256 token) public view returns (FighterStat memory fighterStat){
        fighterStat = fighters[token];
    }

    function getShieldTime(uint256 token) public view returns (uint256 shieldTime){
        FighterStat memory fighterStat = fighters[token];
        shieldTime = fighterStat.shieldTime;
    }

    function getFightCooldown(uint256 token) public view returns (uint256 fightCooldown){
        FighterStat memory fighterStat = fighters[token];
        fightCooldown = fighterStat.fightCooldown;
    }

    function getSteroids(uint256 token) public view returns (bool steroidOne, bool steroidTwo){
        FighterStat memory fighterStat = fighters[token];
        steroidOne = fighterStat.steroidOne;
        steroidTwo = fighterStat.steroidTwo;
    }

    /*
        administrative functions here
    */

    function mintAmount(uint256 amnt) external onlyOwner {
        require(_numberMinted(owner()) == _totalMinted(), "only usable in dev environment");
        uint256 tokenId = _nextTokenId();
        for(uint256 i = 0; i < amnt; i++){
            uint8 _health = uint8((uint(keccak256(abi.encodePacked(block.timestamp, msg.sender, tokenId+i))) % 20)+1);
            uint8 _strength = uint8((uint(keccak256(abi.encodePacked(block.timestamp, tokenId+i, tokenId+i))) % 20)+1);

            uint32 _shielded = (uint(keccak256(abi.encodePacked(tokenId+i, tokenId+i, tokenId+i))) % 1) == 1 ? uint32(block.timestamp) + 43200 : 0;

            bool _steroidOne = (uint(keccak256(abi.encodePacked(block.timestamp, block.timestamp, tokenId+i))) % 1) == 1 ? true : false;
            bool _steroidTwo = (uint(keccak256(abi.encodePacked(block.timestamp, block.timestamp, block.timestamp))) % 1) == 1 ? true : false;

            fighters[tokenId + i] = FighterStat({
                health: _health,
                strength: _strength,
                currentHealth: _health,
                steroidOne: _steroidOne,
                steroidTwo: _steroidTwo,
                shieldTime: _shielded,
                fightCooldown: 0,
                healTime: 0
            });
        }

        _safeMint(msg.sender, amnt);
    }

    function withdraw() external onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    function flipBattle() external onlyOwner {
        if(battleStarted){
            battleStarted = false;
        }else{
            battleStarted = true;
        }
    }

    function setMintStage(uint256 stage) external onlyOwner {
        require(stage <= 2 && stage >= 0, "Invalid stage");
        mintStage = stage;
    }

    function setURIPart(string memory part) external onlyOwner {
        _uriPart = part;
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return _uriPart;
    }

    function mintStats(uint8 health, uint8 strength, bool steroidOne, bool steroidTwo) external onlyOwner{
        // Stock check
        require(_totalMinted() + 1 <= MAX_SUPPLY, "out of stock");
        // No contracts plz
        require(msg.sender == tx.origin, "minter is a contract");

        fighters[_nextTokenId()] = FighterStat({
            health: health,
            strength: strength,
            currentHealth: health,
            steroidOne: steroidOne,
            steroidTwo: steroidTwo,
            shieldTime: 0,
            fightCooldown: 0,
            healTime: 0
        });

        // Now let ERC721A handle PS: i didnt look if safeMint is reentrant safe but the gas cost is so low i said fuck it
        _safeMint(msg.sender, 1);
    }

    function updateMintParameters(uint256 _MAX_PER_TXN, uint256 _MAX_PER_WALLET, uint256 _ALLOWLIST_MAX) external onlyOwner{
        if(_MAX_PER_TXN != 0){
            MAX_PER_TXN = _MAX_PER_TXN;
        }
        if(_MAX_PER_WALLET != 0){
            MAX_PER_WALLET = _MAX_PER_WALLET;
        }
        if(_ALLOWLIST_MAX != 0){
            ALLOWLIST_MAX = _ALLOWLIST_MAX;
        }
    }

    function updateMerkleRoot(bytes32 newRoot) external onlyOwner{
        merkleRoot = newRoot;
    }

    function updateTotalSupply(uint256 _newSupply) external onlyOwner{
        require(_totalMinted() == 0, "Can only change supply before mint");
        MAX_SUPPLY = _newSupply;
    }

    function updateMintCost(uint256 newMintCost) external onlyOwner{
        MINT_COST = newMintCost;
    }

    function updateFightCooldownLength(uint32 newCooldown) external onlyOwner{
        cooldownLength = newCooldown;
    }

    function updateTimeUntilHeal(uint32 healTime) external onlyOwner{
        timeToHeal = healTime;
    }

    function updateTimeForShield(uint32 shieldTime) external onlyOwner{
        timeToShield = shieldTime;
    }
}

File 2 of 11 : ERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.2
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AUpgradeable.sol';
import {ERC721AStorage} from './ERC721AStorage.sol';
import './ERC721A__Initializable.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721ReceiverUpgradeable {
    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()`.
 *
 * 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 ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable {
    using ERC721AStorage for ERC721AStorage.Layout;

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

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

    function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        __ERC721A_init_unchained(name_, symbol_);
    }

    function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        ERC721AStorage.layout()._name = name_;
        ERC721AStorage.layout()._symbol = symbol_;
        ERC721AStorage.layout()._currentIndex = _startTokenId();
    }

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

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

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return ERC721AStorage.layout()._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) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._burnCounter - _startTokenId();
        }
    }

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

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

    // =============================================================
    //                    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();
        return ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return
            (ERC721AStorage.layout()._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
            (ERC721AStorage.layout()._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(ERC721AStorage.layout()._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 = ERC721AStorage.layout()._packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        ERC721AStorage.layout()._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 ERC721AStorage.layout()._name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return ERC721AStorage.layout()._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();

        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(ERC721AStorage.layout()._packedOwnerships[index]);
    }

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

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < ERC721AStorage.layout()._currentIndex) {
                    uint256 packed = ERC721AStorage.layout()._packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // 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, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = ERC721AStorage.layout()._packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @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.
     * 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) public virtual override {
        address owner = ownerOf(tokenId);

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

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

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

        return ERC721AStorage.layout()._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 {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

        ERC721AStorage.layout()._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 ERC721AStorage.layout()._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) {
        return
            _startTokenId() <= tokenId &&
            tokenId < ERC721AStorage.layout()._currentIndex && // If within bounds,
            ERC721AStorage.layout()._packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not 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)
    {
        ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._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 virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (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();

        if (to == address(0)) revert TransferToZeroAddress();

        _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.
            --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`.
            ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public 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 virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @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__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data)
        returns (bytes4 retval) {
            return retval == ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                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 = ERC721AStorage.layout()._currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

        _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:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // 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`.
                    startTokenId // `tokenId`.
                )

                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            ERC721AStorage.layout()._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 = ERC721AStorage.layout()._currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

        _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`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

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

            ERC721AStorage.layout()._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 = ERC721AStorage.layout()._currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (ERC721AStorage.layout()._currentIndex != end) revert();
            }
        }
    }

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

    // =============================================================
    //                        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();
        }

        _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;`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            ERC721AStorage.layout()._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 = ERC721AStorage.layout()._packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        ERC721AStorage.layout()._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 0x80 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80.
            str := add(mload(0x40), 0x80)
            // Update the free memory pointer to allocate.
            mstore(0x40, str)

            // 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)
        }
    }
}

File 3 of 11 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 4 of 11 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ReentrancyGuardUpgradeable is Initializable {
    // 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;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 5 of 11 : IERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.2
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

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

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

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

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

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

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

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

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

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

File 6 of 11 : ERC721AStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library ERC721AStorage {
    // Reference type for token approval.
    struct TokenApprovalRef {
        address value;
    }

    struct Layout {
        // =============================================================
        //                            STORAGE
        // =============================================================

        // The next token ID to be minted.
        uint256 _currentIndex;
        // The number of tokens burned.
        uint256 _burnCounter;
        // Token name
        string _name;
        // Token symbol
        string _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) _packedOwnerships;
        // Mapping owner address to address data.
        //
        // Bits Layout:
        // - [0..63]    `balance`
        // - [64..127]  `numberMinted`
        // - [128..191] `numberBurned`
        // - [192..255] `aux`
        mapping(address => uint256) _packedAddressData;
        // Mapping from token ID to approved address.
        mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals;
        // Mapping from owner to operator approvals
        mapping(address => mapping(address => bool)) _operatorApprovals;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 7 of 11 : ERC721A__Initializable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable diamond facet contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */

import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol';

abstract contract ERC721A__Initializable {
    using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializerERC721A() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(
            ERC721A__InitializableStorage.layout()._initializing
                ? _isConstructor()
                : !ERC721A__InitializableStorage.layout()._initialized,
            'ERC721A__Initializable: contract is already initialized'
        );

        bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing;
        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = true;
            ERC721A__InitializableStorage.layout()._initialized = true;
        }

        _;

        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializingERC721A() {
        require(
            ERC721A__InitializableStorage.layout()._initializing,
            'ERC721A__Initializable: contract is not initializing'
        );
        _;
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        // extcodesize checks the size of the code stored in an address, and
        // address returns the current address. Since the code is still not
        // deployed when running a constructor, any checks on its code size will
        // yield zero, making it an effective way to detect if a contract is
        // under construction or not.
        address self = address(this);
        uint256 cs;
        assembly {
            cs := extcodesize(self)
        }
        return cs == 0;
    }
}

File 8 of 11 : ERC721A__InitializableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev This is a base storage for the  initialization function for upgradeable diamond facet contracts
 **/

library ERC721A__InitializableStorage {
    struct Layout {
        /*
         * Indicates that the contract has been initialized.
         */
        bool _initialized;
        /*
         * Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 9 of 11 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 10 of 11 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 11 of 11 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"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":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ALLOWLIST_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_TXN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_COST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_uriPart","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"battleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenToBurn","type":"uint256"},{"internalType":"uint256","name":"tokenToShield","type":"uint256"}],"name":"burnForShield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenToBurn","type":"uint256"},{"internalType":"uint256","name":"tokenToSteroid","type":"uint256"}],"name":"burnForSteroid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"offset","type":"uint256"}],"name":"compactAllFighters","outputs":[{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cooldownLength","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fighter","type":"uint256"},{"internalType":"uint256","name":"target","type":"uint256"}],"name":"fight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"fighters","outputs":[{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"strength","type":"uint8"},{"internalType":"uint8","name":"currentHealth","type":"uint8"},{"internalType":"bool","name":"steroidOne","type":"bool"},{"internalType":"bool","name":"steroidTwo","type":"bool"},{"internalType":"uint32","name":"shieldTime","type":"uint32"},{"internalType":"uint32","name":"fightCooldown","type":"uint32"},{"internalType":"uint32","name":"healTime","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipBattle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"getFightCooldown","outputs":[{"internalType":"uint256","name":"fightCooldown","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"getFighterStats","outputs":[{"components":[{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"strength","type":"uint8"},{"internalType":"uint8","name":"currentHealth","type":"uint8"},{"internalType":"bool","name":"steroidOne","type":"bool"},{"internalType":"bool","name":"steroidTwo","type":"bool"},{"internalType":"uint32","name":"shieldTime","type":"uint32"},{"internalType":"uint32","name":"fightCooldown","type":"uint32"},{"internalType":"uint32","name":"healTime","type":"uint32"}],"internalType":"struct ETHBattleRoyale.FighterStat","name":"fighterStat","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"getShieldTime","outputs":[{"internalType":"uint256","name":"shieldTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"getSteroids","outputs":[{"internalType":"bool","name":"steroidOne","type":"bool"},{"internalType":"bool","name":"steroidTwo","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint32","name":"_cooldownLength","type":"uint32"},{"internalType":"uint32","name":"_timeToHeal","type":"uint32"},{"internalType":"uint32","name":"_timeToShield","type":"uint32"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amnt","type":"uint256"}],"name":"mintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"strength","type":"uint8"},{"internalType":"bool","name":"steroidOne","type":"bool"},{"internalType":"bool","name":"steroidTwo","type":"bool"}],"name":"mintStats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stage","type":"uint256"}],"name":"setMintStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"part","type":"string"}],"name":"setURIPart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newCooldown","type":"uint32"}],"name":"updateFightCooldownLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMintCost","type":"uint256"}],"name":"updateMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_MAX_PER_TXN","type":"uint256"},{"internalType":"uint256","name":"_MAX_PER_WALLET","type":"uint256"},{"internalType":"uint256","name":"_ALLOWLIST_MAX","type":"uint256"}],"name":"updateMintParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"shieldTime","type":"uint32"}],"name":"updateTimeForShield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"healTime","type":"uint32"}],"name":"updateTimeUntilHeal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSupply","type":"uint256"}],"name":"updateTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50614c64806100206000396000f3fe60806040526004361061031e5760003560e01c80636352211e116101a5578063b88d4fde116100ec578063cfb01c7711610095578063e412c3c81161006f578063e412c3c814610c2f578063e985e9c514610c4f578063f2fde38b14610cb7578063fdab7f7f14610cd757600080fd5b8063cfb01c7714610bda578063d617f06a14610bfa578063df2a106114610c1a57600080fd5b8063c87b56dd116100c6578063c87b56dd14610b7a578063ca39e5ef14610b9a578063cf6cc98b14610bba57600080fd5b8063b88d4fde14610b24578063c3c7c90114610b44578063c662e48114610b6457600080fd5b80638da5cb5b1161014e578063a22cb46511610128578063a22cb46514610abc578063a2cd99ad14610adc578063b3ace4ec14610af257600080fd5b80638da5cb5b14610a7657806395d89b4114610a94578063a0712d6814610aa957600080fd5b806370a082311161017f57806370a0823114610a2c578063715018a614610a4c57806374e67c4114610a6157600080fd5b80636352211e146109cc57806366d38ba9146109ec57806366d49bab14610a0c57600080fd5b80632d7b832e116102695780634783f0ef116102125780635519c174116101ec5780635519c174146107f257806355af86c4146108a357806357fd3b571461099f57600080fd5b80634783f0ef1461079c57806350b8c2aa146107bc57806351b96d92146107dc57600080fd5b80633a562d09116102435780633a562d09146107465780633ccfd60b1461076757806342842e0e1461077c57600080fd5b80632d7b832e146106445780632e6b221d1461066457806332cb6b0c1461073057600080fd5b806318160ddd116102cb57806323b872dd116102a557806323b872dd1461054e57806328d911fb1461056e5780632a59b82c1461058e57600080fd5b806318160ddd146104185780631c07157b1461045d5780632311a0151461052e57600080fd5b8063095ea7b3116102fc578063095ea7b3146103b25780630e62608b146103d45780630f2cdd6c146103f457600080fd5b806301ffc9a71461032357806306fdde0314610358578063081812fc1461037a575b600080fd5b34801561032f57600080fd5b5061034361033e366004614451565b610cf7565b60405190151581526020015b60405180910390f35b34801561036457600080fd5b5061036d610d49565b60405161034f91906144c6565b34801561038657600080fd5b5061039a6103953660046144d9565b610deb565b6040516001600160a01b03909116815260200161034f565b3480156103be57600080fd5b506103d26103cd36600461450e565b610e4e565b005b3480156103e057600080fd5b506103d26103ef36600461454c565b610f56565b34801561040057600080fd5b5061040a60995481565b60405190815260200161034f565b34801561042457600080fd5b507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614baf833981519152540361040a565b34801561046957600080fd5b506105176104783660046144d9565b600090815260a0602081815260409283902083516101008082018652915460ff8082168352928104831693820193909352620100008304821694810194909452630100000082048116151560608501819052600160201b830490911615156080850181905263ffffffff600160281b8404811694860194909452600160481b8304841660c0860152600160681b90920490921660e09093019290925291565b60408051921515835290151560208301520161034f565b34801561053a57600080fd5b506103d2610549366004614567565b610f8e565b34801561055a57600080fd5b506103d2610569366004614593565b610fbf565b34801561057a57600080fd5b506103d26105893660046144d9565b6111f7565b34801561059a57600080fd5b5061040a6105a93660046144d9565b600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c08401819052600160681b90910490911660e09092019190915290565b34801561065057600080fd5b506103d261065f3660046145cf565b611204565b34801561067057600080fd5b506106dd61067f3660046144d9565b60a06020526000908152604090205460ff80821691610100810482169162010000820481169163010000008104821691600160201b8204169063ffffffff600160281b8204811691600160481b8104821691600160681b9091041688565b6040805160ff998a1681529789166020890152959097169486019490945291151560608501521515608084015263ffffffff90811660a084015290811660c083015290911660e08201526101000161034f565b34801561073c57600080fd5b5061040a60975481565b34801561075257600080fd5b50609c5461034390600160601b900460ff1681565b34801561077357600080fd5b506103d261148d565b34801561078857600080fd5b506103d2610797366004614593565b6114d1565b3480156107a857600080fd5b506103d26107b73660046144d9565b6114ec565b3480156107c857600080fd5b506103d26107d736600461469d565b6114f9565b3480156107e857600080fd5b5061040a60985481565b3480156107fe57600080fd5b5061040a61080d3660046144d9565b600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b82048116928401839052600160481b8204811660c0850152600160681b9091041660e09092019190915290565b3480156108af57600080fd5b506109926108be3660046144d9565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915250600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c0840152600160681b90041660e082015290565b60405161034f9190614716565b3480156109ab57600080fd5b506109bf6109ba3660046145cf565b611812565b60405161034f91906147a6565b3480156109d857600080fd5b5061039a6109e73660046144d9565b611a12565b3480156109f857600080fd5b506103d2610a073660046144d9565b611a1d565b348015610a1857600080fd5b506103d2610a273660046144d9565b611a75565b348015610a3857600080fd5b5061040a610a47366004614808565b611aea565b348015610a5857600080fd5b506103d2611b46565b348015610a6d57600080fd5b506103d2611b5a565b348015610a8257600080fd5b506033546001600160a01b031661039a565b348015610aa057600080fd5b5061036d611b98565b6103d2610ab73660046144d9565b611bb7565b348015610ac857600080fd5b506103d2610ad7366004614833565b6121f2565b348015610ae857600080fd5b5061040a609a5481565b348015610afe57600080fd5b50609c54610b0f9063ffffffff1681565b60405163ffffffff909116815260200161034f565b348015610b3057600080fd5b506103d2610b3f366004614866565b6122a7565b348015610b5057600080fd5b506103d2610b5f36600461454c565b6122f1565b348015610b7057600080fd5b5061040a609b5481565b348015610b8657600080fd5b5061036d610b953660046144d9565b612320565b348015610ba657600080fd5b506103d2610bb53660046145cf565b6123a5565b348015610bc657600080fd5b506103d2610bd53660046148e2565b612fcf565b348015610be657600080fd5b506103d2610bf536600461454c565b612fee565b348015610c0657600080fd5b506103d2610c15366004614928565b613012565b348015610c2657600080fd5b5061036d613212565b348015610c3b57600080fd5b506103d2610c4a3660046144d9565b6132a0565b348015610c5b57600080fd5b50610343610c6a36600461497c565b6001600160a01b0391821660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832093909416825291909152205460ff1690565b348015610cc357600080fd5b506103d2610cd2366004614808565b613704565b348015610ce357600080fd5b506103d2610cf23660046145cf565b61377a565b60006301ffc9a760e01b6001600160e01b031983161480610d2857506380ac58cd60e01b6001600160e01b03198316145b80610d435750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600080516020614baf8339815191526002018054610d68906149a6565b80601f0160208091040260200160405190810160405280929190818152602001828054610d94906149a6565b8015610de15780601f10610db657610100808354040283529160200191610de1565b820191906000526020600020905b815481529060010190602001808311610dc457829003601f168201915b5050505050905090565b6000610df6826139ac565b610e13576040516333d1c03960e21b815260040160405180910390fd5b5060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020546001600160a01b031690565b6000610e5982611a12565b9050336001600160a01b03821614610ece576001600160a01b03811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16610ece576040516367d9dca160e11b815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610f5e6139ee565b609c805463ffffffff90921668010000000000000000026bffffffff000000000000000019909216919091179055565b610f966139ee565b8215610fa25760988390555b8115610fae5760998290555b8015610fba57609a8190555b505050565b6000610fca82613a48565b9050836001600160a01b0316816001600160a01b031614610ffd5760405162a1148160e81b815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040902080546110488187335b6001600160a01b039081169116811491141790565b6110af576001600160a01b03861660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff166110af57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166110d657604051633a954ecd60e21b815260040160405180910390fd5b80156110e157600082555b6001600160a01b038681166000908152600080516020614bef83398151915260205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b176000858152600080516020614bcf8339815191526020526040902055600160e11b83166111ad57600184016000818152600080516020614bcf83398151915260205260409020546111ab57600080516020614baf8339815191525481146111ab576000818152600080516020614bcf833981519152602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6111ff6139ee565b609b55565b6002606554141561125c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002606555818114156112a65760405162461bcd60e51b815260206004820152601260248201527121b0b73737ba1039b434b2b6321039b2b63360711b6044820152606401611253565b6112af826139ac565b6112fb5760405162461bcd60e51b815260206004820152601b60248201527f4275726e656420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b611304816139ac565b6113505760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e20746f20737465726f696420646f6573206e6f74206578697374006044820152606401611253565b3361135a83611a12565b6001600160a01b0316146113b05760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206275726e20746f6b656e20796f7520646f206e6f74206f776e6044820152606401611253565b6113b982613ad0565b600081815260a060205260409020546301000000900460ff166113fa57600081815260a060205260409020805463ff00000019166301000000179055611484565b600081815260a06020526040902054600160201b900460ff1661143c57600081815260a060205260409020805464ff000000001916600160201b179055611484565b60405162461bcd60e51b815260206004820152601a60248201527f4e6f20737465726f696420736c6f747320617661696c61626c650000000000006044820152606401611253565b50506001606555565b6114956139ee565b6033546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156114ce573d6000803e3d6000fd5b50565b610fba838383604051806020016040528060008152506122a7565b6114f46139ee565b609e55565b600080516020614c0f83398151915254610100900460ff1661152e57600080516020614c0f8339815191525460ff1615611532565b303b155b6115a45760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401611253565b600080516020614c0f83398151915254610100900460ff161580156115e057600080516020614c0f833981519152805461ffff19166101011790555b600054610100900460ff16158080156116005750600054600160ff909116105b8061161a5750303b15801561161a575060005460ff166001145b61168c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401611253565b6000805460ff1916600117905580156116af576000805461ff0019166101001790555b61170b6040518060400160405280600f81526020017f455448426174746c65526f79616c6500000000000000000000000000000000008152506040518060400160405280600581526020016422aa24212960d91b815250613adb565b611713613b66565b61171b613bd9565b865161172e90609d9060208a01906143a2565b506097869055609c805463ffffffff87811667ffffffffffffffff1990921691909117600160201b87831602176cffffffffff00000000000000001916680100000000000000009186169190910260ff60601b19161790556000609f556003609a556005609855600a609955662386f26fc10000609b5580156117eb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5080156111ef575050600080516020614c0f833981519152805461ff001916905550505050565b606060008367ffffffffffffffff81111561182f5761182f6145f1565b60405190808252806020026020018201604052801561186257816020015b606081526020019060019003908161184d5790505b50905060005b84811015611a0a57600061187c85836149f7565b9050611887816139ac565b61189157506119f8565b600081815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c0840152600160681b90041660e082015261192982611a12565b816000015182602001518360400151846060015185608001518660a001518760c001518860e001518a6040516020016119c99a999897969594939291906001600160a01b039a909a168a5260ff98891660208b015296881660408a01529490961660608801529115156080870152151560a086015263ffffffff90811660c086015292831660e08501529091166101008301526101208201526101400190565b6040516020818303038152906040528484815181106119ea576119ea614a0f565b602002602001018190525050505b80611a0281614a25565b915050611868565b509392505050565b6000610d4382613a48565b611a256139ee565b60028111158015611a34575060015b611a705760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420737461676560981b6044820152606401611253565b609f55565b611a7d6139ee565b600080516020614baf8339815191525415611ae55760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79206368616e676520737570706c79206265666f7265206d696044820152611b9d60f21b6064820152608401611253565b609755565b60006001600160a01b038216611b13576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600080516020614bef833981519152602052604090205467ffffffffffffffff1690565b611b4e6139ee565b611b586000613c4c565b565b611b626139ee565b609c54600160601b900460ff1615611b8357609c805460ff60601b19169055565b609c805460ff60601b1916600160601b179055565b6060600080516020614baf8339815191526003018054610d68906149a6565b60026065541415611c0a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555609f54611c5e5760405162461bcd60e51b815260206004820152601460248201527f6d696e7420686173206e6f7420737461727465640000000000000000000000006044820152606401611253565b60975481611c78600080516020614baf8339815191525490565b611c8291906149f7565b1115611cbf5760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662073746f636b60a01b6044820152606401611253565b333214611d055760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d195c881a5cc8184818dbdb9d1c9858dd60621b6044820152606401611253565b609954336000908152600080516020614bef8339815191526020526040908190205467ffffffffffffffff911c161115611d815760405162461bcd60e51b815260206004820152601860248201527f737572706173736564206d6178207065722077616c6c657400000000000000006044820152606401611253565b609854811115611dd35760405162461bcd60e51b815260206004820152601560248201527f737572706173736564206d6178207065722074786e00000000000000000000006044820152606401611253565b6109c4611dec600080516020614baf8339815191525490565b611df79060016149f7565b1015611f185780600114611e4d5760405162461bcd60e51b815260206004820152601b60248201527f65786365656465642066726565206d696e74207175616e7469747900000000006044820152606401611253565b336000908152600080516020614bef8339815191526020526040908190205467ffffffffffffffff911c1615611ec55760405162461bcd60e51b815260206004820152601260248201527f65786365656465642066726565206d696e7400000000000000000000000000006044820152606401611253565b3415611f135760405162461bcd60e51b815260206004820152601360248201527f6d696e74207072696365206578636565646564000000000000000000000000006044820152606401611253565b611f74565b80609b54611f269190614a40565b3414611f745760405162461bcd60e51b815260206004820152601260248201527f6d696e74207072696365206e6f74206d657400000000000000000000000000006044820152606401611253565b6000611f8c600080516020614baf8339815191525490565b90506000611f9a83836149f7565b9050611fa63384613cab565b808210156121e8576000611fbe633b9aca003a614a75565b9050600060648263ffffffff1611611fd65781611fd9565b60645b90506000611fe8600583614a89565b60ff161561200057611ffb600583614a89565b612003565b60015b90506000612012600a84614a89565b61201d90600a614aab565b60ff161561204057612030600a84614a89565b61203b90600a614aab565b612043565b60015b90506040518061010001604052808360ff1681526020018260ff1681526020018360ff168152602001600015158152602001600015158152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060a0600088815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff02191690831515021790555060808201518160000160046101000a81548160ff02191690831515021790555060a08201518160000160056101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160000160096101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600001600d6101000a81548163ffffffff021916908363ffffffff1602179055509050505050505081806121e090614a25565b925050611fa6565b5050600160655550565b6001600160a01b03821633141561221c5760405163b06307db60e01b815260040160405180910390fd5b3360008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6122b2848484610fbf565b6001600160a01b0383163b156122eb576122ce84848484613cc5565b6122eb576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6122f96139ee565b609c805463ffffffff909216600160201b0267ffffffff0000000019909216919091179055565b606061232b826139ac565b61234857604051630a14c4b560e41b815260040160405180910390fd5b6000612352613dbd565b9050805160001415612373576040518060200160405280600081525061239e565b8061237d84613dcc565b60405160200161238e929190614ace565b6040516020818303038152906040525b9392505050565b600260655414156123f85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b60026065558181141561244d5760405162461bcd60e51b815260206004820152601160248201527f43616e6e6f742066696768742073656c660000000000000000000000000000006044820152606401611253565b612456826139ac565b6124a25760405162461bcd60e51b815260206004820152601c60248201527f4669676874657220746f6b656e20646f6573206e6f74206578697374000000006044820152606401611253565b6124ab816139ac565b6124f75760405162461bcd60e51b815260206004820152601b60248201527f54617267657420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b609c54600160601b900460ff166125505760405162461bcd60e51b815260206004820152601b60248201527f54686520626174746c65206861732079657420746f20737461727400000000006044820152606401611253565b3361255a83611a12565b6001600160a01b0316146125d65760405162461bcd60e51b815260206004820152603760248201527f596f7520646f206e6f74206f776e20746865206669676874657220796f75206160448201527f726520747279696e6720746f20666967687420776974680000000000000000006064820152608401611253565b600060a06000838152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff1681526020016000820160039054906101000a900460ff161515151581526020016000820160049054906101000a900460ff161515151581526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600d9054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050600060a06000858152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff1681526020016000820160039054906101000a900460ff161515151581526020016000820160049054906101000a900460ff161515151581526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600d9054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050428260a0015163ffffffff16106128735760405162461bcd60e51b815260206004820152601c60248201527f5461726765742069732063757272656e746c7920736869656c646564000000006044820152606401611253565b428160c0015163ffffffff16106128cc5760405162461bcd60e51b815260206004820181905260248201527f466967687465722069732063757272656e746c79206f6e20636f6f6c646f776e6044820152606401611253565b60e082015163ffffffff16158015906128ee5750428260e0015163ffffffff16105b1561290557815160ff166040830152600060e08301525b60e081015163ffffffff16158015906129275750428160e0015163ffffffff16105b1561293e57805160ff166040820152600060e08201525b60208101516060820151600191829160ff909116901561296657612963600a826149f7565b90505b83608001511561297e5761297b600a826149f7565b90505b846040015160ff16811115612d1c57836000015160ff1660141480156129ab5750836020015160ff166014145b15612b8757600285604001516129c19190614a89565b60ff16156129df57600285604001516129da9190614a89565b6129e2565b60015b60ff16855260208501516129f890600290614a89565b60ff1615612a165760028560200151612a119190614a89565b612a19565b60015b60ff90811660208701528551166040860152609c54612a3e9063ffffffff1642614afd565b63ffffffff90811660c0870152609c54612a59911642614afd565b63ffffffff1660c085015260009150612a7186613ad0565b8460a06000612a8c600080516020614baf8339815191525490565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b9190921602179055612b82336001613cab565b612db9565b846000015160ff16856020015160ff161115612c4f578451601490612bae90600290614a89565b60ff1615612bc9578551612bc490600290614a89565b612bcc565b60015b8551612bd89190614b1c565b60ff1611612c1d578451612bee90600290614a89565b60ff1615612c09578451612c0490600290614a89565b612c0c565b60015b8451612c189190614b1c565b612c20565b60145b60ff168452609c54612c3f90600160201b900463ffffffff1642614afd565b63ffffffff1660e0850152612cec565b601460028660200151612c629190614a89565b60ff1615612c805760028660200151612c7b9190614a89565b612c83565b60015b8560200151612c929190614b1c565b60ff1611612ce05760028560200151612cab9190614a89565b60ff1615612cc95760028560200151612cc49190614a89565b612ccc565b60015b8460200151612cdb9190614b1c565b612ce3565b60145b60ff1660208501525b612cf586613ad0565b609c5460009250612d0c9063ffffffff1642614afd565b63ffffffff1660c0850152612db9565b836040015160ff1660011415612d3e57612d3587613ad0565b60009250612d6b565b60016040850152609c54612d5f90600160201b900463ffffffff1642614afd565b63ffffffff1660e08501525b60028460200151612d7c9190614a89565b85604001818151612d8d9190614aab565b60ff16905250609c54612dad90600160201b900463ffffffff1642614afd565b63ffffffff1660e08601525b836060015115612dcb57600060608501525b836080015115612ddd57600060808501525b8215612ecf57600087815260a0602081815260409283902087518154928901519489015160608a015160808b0151958b015160c08c015160e08d015163ffffffff908116600160681b0263ffffffff60681b19928216600160481b029290921667ffffffffffffffff60481b1991909316600160281b0268ffffffff000000000019991515600160201b029990991668ffffffffff000000001994151563010000000263ff0000001960ff97881662010000021663ffff0000199c88166101000261ffff19909b1697909816969096179890981799909916949094179290921716939093179390931793909316171790555b8115612fc157600086815260a0602081815260409283902088518154928a0151948a015160608b015160808c0151958c015160c08d015160e08e015163ffffffff908116600160681b0263ffffffff60681b19928216600160481b029290921667ffffffffffffffff60481b1991909316600160281b0268ffffffff000000000019991515600160201b029990991668ffffffffff000000001994151563010000000263ff0000001960ff97881662010000021663ffff0000199c88166101000261ffff19909b1697909816969096179890981799909916949094179290921716939093179390931793909316171790555b505060016065555050505050565b612fd76139ee565b8051612fea90609d9060208401906143a2565b5050565b612ff66139ee565b609c805463ffffffff191663ffffffff92909216919091179055565b61301a6139ee565b609754600080516020614baf833981519152546130389060016149f7565b11156130755760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662073746f636b60a01b6044820152606401611253565b3332146130bb5760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d195c881a5cc8184818dbdb9d1c9858dd60621b6044820152606401611253565b604080516101008101825260ff80871680835290861660208301529181019190915282151560608201528115156080820152600060a080830182905260c0830182905260e083018290529061311c600080516020614baf8339815191525490565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b91909216021790556122eb336001613cab565b609d805461321f906149a6565b80601f016020809104026020016040519081016040528092919081815260200182805461324b906149a6565b80156132985780601f1061326d57610100808354040283529160200191613298565b820191906000526020600020905b81548152906001019060200180831161327b57829003601f168201915b505050505081565b6132a86139ee565b600080516020614baf833981519152546133036132cd6033546001600160a01b031690565b6001600160a01b03166000908152600080516020614bef83398151915260205260409081902054901c67ffffffffffffffff1690565b146133505760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c7920757361626c6520696e2064657620656e7669726f6e6d656e7400006044820152606401611253565b6000613368600080516020614baf8339815191525490565b905060005b828110156136f95760006014423361338585876149f7565b6040516020016133ba9392919092835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6040516020818303038152906040528051906020012060001c6133dd9190614b41565b6133e89060016149f7565b905060006014426133f985876149f7565b61340386886149f7565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6134409190614b41565b61344b9060016149f7565b90506000600161345b85876149f7565b61346586886149f7565b61346f87896149f7565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6134ac9190614b41565b6001146134ba5760006134c6565b6134c64261a8c0614afd565b90506000600142806134d8888a6149f7565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6135159190614b41565b600114613523576000613526565b60015b905060006001424242604051602001613552939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6135759190614b41565b600114613583576000613586565b60015b90506040518061010001604052808660ff1681526020018560ff1681526020018660ff168152602001831515815260200182151581526020018463ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060a06000888a6135f391906149f7565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b9190921602179055508493506136f19250839150614a259050565b91505061336d565b50612fea3383613cab565b61370c6139ee565b6001600160a01b0381166137715760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611253565b6114ce81613c4c565b600260655414156137cd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555818114156138175760405162461bcd60e51b815260206004820152601260248201527121b0b73737ba1039b434b2b6321039b2b63360711b6044820152606401611253565b613820826139ac565b61386c5760405162461bcd60e51b815260206004820152601b60248201527f4275726e656420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b613875816139ac565b6138c15760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e20746f20736869656c6420646f6573206e6f7420657869737400006044820152606401611253565b336138cb83611a12565b6001600160a01b0316146139215760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206275726e20746f6b656e20796f7520646f206e6f74206f776e6044820152606401611253565b61392a82613ad0565b600081815260a06020526040902054600160281b900463ffffffff1642811161395e576139594261a8c0614afd565b61396e565b61396a61a8c082614afd565b9050805b600092835260a06020526040909220805463ffffffff93909316600160281b0268ffffffff0000000000199093169290921790915550506001606555565b6000600080516020614baf8339815191525482108015610d435750506000908152600080516020614bcf8339815191526020526040902054600160e01b161590565b6033546001600160a01b03163314611b585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611253565b600081600080516020614baf83398151915254811015613ab7576000818152600080516020614bcf8339815191526020526040902054600160e01b8116613ab5575b8061239e5750600019016000818152600080516020614bcf8339815191526020526040902054613a8a565b505b604051636f96cda160e11b815260040160405180910390fd5b6114ce816000613e0e565b600080516020614c0f83398151915254610100900460ff16613b5c5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608401611253565b612fea828261400d565b600054610100900460ff16613bd15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5861410a565b600054610100900460ff16613c445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5861417e565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612fea8282604051806020016040528060008152506141f0565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613cfa903390899088908890600401614b55565b602060405180830381600087803b158015613d1457600080fd5b505af1925050508015613d44575060408051601f3d908101601f19168201909252613d4191810190614b91565b60015b613d9f573d808015613d72576040519150601f19603f3d011682016040523d82523d6000602084013e613d77565b606091505b508051613d97576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060609d8054610d68906149a6565b604080516080019081905280825b600183039250600a81066030018353600a900480613df757613dfc565b613dda565b50819003601f19909101908152919050565b6000613e1983613a48565b905080600080613e568660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040902080549091565b915091508415613ed257613e6b818433611033565b613ed2576001600160a01b03831660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16613ed257604051632ce44b5f60e11b815260040160405180910390fd5b8015613edd57600082555b6001600160a01b0383166000818152600080516020614bef8339815191526020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b176000878152600080516020614bcf8339815191526020526040902055600160e11b8416613fa557600186016000818152600080516020614bcf8339815191526020526040902054613fa357600080516020614baf833981519152548114613fa3576000818152600080516020614bcf833981519152602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c418054600101905550505050565b600080516020614c0f83398151915254610100900460ff1661408e5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608401611253565b81516140c0907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c429060208501906143a2565b5080516140f3907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c439060208401906143a2565b506000600080516020614baf833981519152555050565b600054610100900460ff166141755760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5833613c4c565b600054610100900460ff166141e95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b6001606555565b6141fa8383614277565b6001600160a01b0383163b15610fba57600080516020614baf833981519152548281035b6142316000868380600101945086613cc5565b61424e576040516368d2bf6b60e11b815260040160405180910390fd5b81811061421e5781600080516020614baf833981519152541461427057600080fd5b5050505050565b600080516020614baf83398151915254816142a55760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0383166000818152600080516020614bef833981519152602090815260408083208054680100000000000000018802019055848352600080516020614bcf83398151915290915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461436e57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101614336565b508161438c57604051622e076360e81b815260040160405180910390fd5b600080516020614baf8339815191525550505050565b8280546143ae906149a6565b90600052602060002090601f0160209004810192826143d05760008555614416565b82601f106143e957805160ff1916838001178555614416565b82800160010185558215614416579182015b828111156144165782518255916020019190600101906143fb565b50614422929150614426565b5090565b5b808211156144225760008155600101614427565b6001600160e01b0319811681146114ce57600080fd5b60006020828403121561446357600080fd5b813561239e8161443b565b60005b83811015614489578181015183820152602001614471565b838111156122eb5750506000910152565b600081518084526144b281602086016020860161446e565b601f01601f19169290920160200192915050565b60208152600061239e602083018461449a565b6000602082840312156144eb57600080fd5b5035919050565b80356001600160a01b038116811461450957600080fd5b919050565b6000806040838503121561452157600080fd5b61452a836144f2565b946020939093013593505050565b803563ffffffff8116811461450957600080fd5b60006020828403121561455e57600080fd5b61239e82614538565b60008060006060848603121561457c57600080fd5b505081359360208301359350604090920135919050565b6000806000606084860312156145a857600080fd5b6145b1846144f2565b92506145bf602085016144f2565b9150604084013590509250925092565b600080604083850312156145e257600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115614622576146226145f1565b604051601f8501601f19908116603f0116810190828211818310171561464a5761464a6145f1565b8160405280935085815286868601111561466357600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261468e57600080fd5b61239e83833560208501614607565b600080600080600060a086880312156146b557600080fd5b853567ffffffffffffffff8111156146cc57600080fd5b6146d88882890161467d565b955050602086013593506146ee60408701614538565b92506146fc60608701614538565b915061470a60808701614538565b90509295509295909350565b60006101008201905060ff835116825260ff602084015116602083015260ff604084015116604083015260608301511515606083015260808301511515608083015260a083015161476f60a084018263ffffffff169052565b5060c083015161478760c084018263ffffffff169052565b5060e083015161479f60e084018263ffffffff169052565b5092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156147fb57603f198886030184526147e985835161449a565b945092850192908501906001016147cd565b5092979650505050505050565b60006020828403121561481a57600080fd5b61239e826144f2565b8035801515811461450957600080fd5b6000806040838503121561484657600080fd5b61484f836144f2565b915061485d60208401614823565b90509250929050565b6000806000806080858703121561487c57600080fd5b614885856144f2565b9350614893602086016144f2565b925060408501359150606085013567ffffffffffffffff8111156148b657600080fd5b8501601f810187136148c757600080fd5b6148d687823560208401614607565b91505092959194509250565b6000602082840312156148f457600080fd5b813567ffffffffffffffff81111561490b57600080fd5b613db58482850161467d565b803560ff8116811461450957600080fd5b6000806000806080858703121561493e57600080fd5b61494785614917565b935061495560208601614917565b925061496360408601614823565b915061497160608601614823565b905092959194509250565b6000806040838503121561498f57600080fd5b614998836144f2565b915061485d602084016144f2565b600181811c908216806149ba57607f821691505b602082108114156149db57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115614a0a57614a0a6149e1565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614a3957614a396149e1565b5060010190565b6000816000190483118215151615614a5a57614a5a6149e1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614a8457614a84614a5f565b500490565b600060ff831680614a9c57614a9c614a5f565b8060ff84160491505092915050565b600060ff821660ff841680821015614ac557614ac56149e1565b90039392505050565b60008351614ae081846020880161446e565b835190830190614af481836020880161446e565b01949350505050565b600063ffffffff808316818516808303821115614af457614af46149e1565b600060ff821660ff84168060ff03821115614b3957614b396149e1565b019392505050565b600082614b5057614b50614a5f565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614b87608083018461449a565b9695505050505050565b600060208284031215614ba357600080fd5b815161239e8161443b56fe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c402569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c442569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45ee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa26469706673582212203f3699a23a0a44584ec96f856b91d2fd2e75b2eb3b0bf7711be03e893e44096a64736f6c63430008090033

Deployed Bytecode

0x60806040526004361061031e5760003560e01c80636352211e116101a5578063b88d4fde116100ec578063cfb01c7711610095578063e412c3c81161006f578063e412c3c814610c2f578063e985e9c514610c4f578063f2fde38b14610cb7578063fdab7f7f14610cd757600080fd5b8063cfb01c7714610bda578063d617f06a14610bfa578063df2a106114610c1a57600080fd5b8063c87b56dd116100c6578063c87b56dd14610b7a578063ca39e5ef14610b9a578063cf6cc98b14610bba57600080fd5b8063b88d4fde14610b24578063c3c7c90114610b44578063c662e48114610b6457600080fd5b80638da5cb5b1161014e578063a22cb46511610128578063a22cb46514610abc578063a2cd99ad14610adc578063b3ace4ec14610af257600080fd5b80638da5cb5b14610a7657806395d89b4114610a94578063a0712d6814610aa957600080fd5b806370a082311161017f57806370a0823114610a2c578063715018a614610a4c57806374e67c4114610a6157600080fd5b80636352211e146109cc57806366d38ba9146109ec57806366d49bab14610a0c57600080fd5b80632d7b832e116102695780634783f0ef116102125780635519c174116101ec5780635519c174146107f257806355af86c4146108a357806357fd3b571461099f57600080fd5b80634783f0ef1461079c57806350b8c2aa146107bc57806351b96d92146107dc57600080fd5b80633a562d09116102435780633a562d09146107465780633ccfd60b1461076757806342842e0e1461077c57600080fd5b80632d7b832e146106445780632e6b221d1461066457806332cb6b0c1461073057600080fd5b806318160ddd116102cb57806323b872dd116102a557806323b872dd1461054e57806328d911fb1461056e5780632a59b82c1461058e57600080fd5b806318160ddd146104185780631c07157b1461045d5780632311a0151461052e57600080fd5b8063095ea7b3116102fc578063095ea7b3146103b25780630e62608b146103d45780630f2cdd6c146103f457600080fd5b806301ffc9a71461032357806306fdde0314610358578063081812fc1461037a575b600080fd5b34801561032f57600080fd5b5061034361033e366004614451565b610cf7565b60405190151581526020015b60405180910390f35b34801561036457600080fd5b5061036d610d49565b60405161034f91906144c6565b34801561038657600080fd5b5061039a6103953660046144d9565b610deb565b6040516001600160a01b03909116815260200161034f565b3480156103be57600080fd5b506103d26103cd36600461450e565b610e4e565b005b3480156103e057600080fd5b506103d26103ef36600461454c565b610f56565b34801561040057600080fd5b5061040a60995481565b60405190815260200161034f565b34801561042457600080fd5b507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614baf833981519152540361040a565b34801561046957600080fd5b506105176104783660046144d9565b600090815260a0602081815260409283902083516101008082018652915460ff8082168352928104831693820193909352620100008304821694810194909452630100000082048116151560608501819052600160201b830490911615156080850181905263ffffffff600160281b8404811694860194909452600160481b8304841660c0860152600160681b90920490921660e09093019290925291565b60408051921515835290151560208301520161034f565b34801561053a57600080fd5b506103d2610549366004614567565b610f8e565b34801561055a57600080fd5b506103d2610569366004614593565b610fbf565b34801561057a57600080fd5b506103d26105893660046144d9565b6111f7565b34801561059a57600080fd5b5061040a6105a93660046144d9565b600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c08401819052600160681b90910490911660e09092019190915290565b34801561065057600080fd5b506103d261065f3660046145cf565b611204565b34801561067057600080fd5b506106dd61067f3660046144d9565b60a06020526000908152604090205460ff80821691610100810482169162010000820481169163010000008104821691600160201b8204169063ffffffff600160281b8204811691600160481b8104821691600160681b9091041688565b6040805160ff998a1681529789166020890152959097169486019490945291151560608501521515608084015263ffffffff90811660a084015290811660c083015290911660e08201526101000161034f565b34801561073c57600080fd5b5061040a60975481565b34801561075257600080fd5b50609c5461034390600160601b900460ff1681565b34801561077357600080fd5b506103d261148d565b34801561078857600080fd5b506103d2610797366004614593565b6114d1565b3480156107a857600080fd5b506103d26107b73660046144d9565b6114ec565b3480156107c857600080fd5b506103d26107d736600461469d565b6114f9565b3480156107e857600080fd5b5061040a60985481565b3480156107fe57600080fd5b5061040a61080d3660046144d9565b600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b82048116928401839052600160481b8204811660c0850152600160681b9091041660e09092019190915290565b3480156108af57600080fd5b506109926108be3660046144d9565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915250600090815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c0840152600160681b90041660e082015290565b60405161034f9190614716565b3480156109ab57600080fd5b506109bf6109ba3660046145cf565b611812565b60405161034f91906147a6565b3480156109d857600080fd5b5061039a6109e73660046144d9565b611a12565b3480156109f857600080fd5b506103d2610a073660046144d9565b611a1d565b348015610a1857600080fd5b506103d2610a273660046144d9565b611a75565b348015610a3857600080fd5b5061040a610a47366004614808565b611aea565b348015610a5857600080fd5b506103d2611b46565b348015610a6d57600080fd5b506103d2611b5a565b348015610a8257600080fd5b506033546001600160a01b031661039a565b348015610aa057600080fd5b5061036d611b98565b6103d2610ab73660046144d9565b611bb7565b348015610ac857600080fd5b506103d2610ad7366004614833565b6121f2565b348015610ae857600080fd5b5061040a609a5481565b348015610afe57600080fd5b50609c54610b0f9063ffffffff1681565b60405163ffffffff909116815260200161034f565b348015610b3057600080fd5b506103d2610b3f366004614866565b6122a7565b348015610b5057600080fd5b506103d2610b5f36600461454c565b6122f1565b348015610b7057600080fd5b5061040a609b5481565b348015610b8657600080fd5b5061036d610b953660046144d9565b612320565b348015610ba657600080fd5b506103d2610bb53660046145cf565b6123a5565b348015610bc657600080fd5b506103d2610bd53660046148e2565b612fcf565b348015610be657600080fd5b506103d2610bf536600461454c565b612fee565b348015610c0657600080fd5b506103d2610c15366004614928565b613012565b348015610c2657600080fd5b5061036d613212565b348015610c3b57600080fd5b506103d2610c4a3660046144d9565b6132a0565b348015610c5b57600080fd5b50610343610c6a36600461497c565b6001600160a01b0391821660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832093909416825291909152205460ff1690565b348015610cc357600080fd5b506103d2610cd2366004614808565b613704565b348015610ce357600080fd5b506103d2610cf23660046145cf565b61377a565b60006301ffc9a760e01b6001600160e01b031983161480610d2857506380ac58cd60e01b6001600160e01b03198316145b80610d435750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600080516020614baf8339815191526002018054610d68906149a6565b80601f0160208091040260200160405190810160405280929190818152602001828054610d94906149a6565b8015610de15780601f10610db657610100808354040283529160200191610de1565b820191906000526020600020905b815481529060010190602001808311610dc457829003601f168201915b5050505050905090565b6000610df6826139ac565b610e13576040516333d1c03960e21b815260040160405180910390fd5b5060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020546001600160a01b031690565b6000610e5982611a12565b9050336001600160a01b03821614610ece576001600160a01b03811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16610ece576040516367d9dca160e11b815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610f5e6139ee565b609c805463ffffffff90921668010000000000000000026bffffffff000000000000000019909216919091179055565b610f966139ee565b8215610fa25760988390555b8115610fae5760998290555b8015610fba57609a8190555b505050565b6000610fca82613a48565b9050836001600160a01b0316816001600160a01b031614610ffd5760405162a1148160e81b815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040902080546110488187335b6001600160a01b039081169116811491141790565b6110af576001600160a01b03861660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff166110af57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166110d657604051633a954ecd60e21b815260040160405180910390fd5b80156110e157600082555b6001600160a01b038681166000908152600080516020614bef83398151915260205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b176000858152600080516020614bcf8339815191526020526040902055600160e11b83166111ad57600184016000818152600080516020614bcf83398151915260205260409020546111ab57600080516020614baf8339815191525481146111ab576000818152600080516020614bcf833981519152602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6111ff6139ee565b609b55565b6002606554141561125c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002606555818114156112a65760405162461bcd60e51b815260206004820152601260248201527121b0b73737ba1039b434b2b6321039b2b63360711b6044820152606401611253565b6112af826139ac565b6112fb5760405162461bcd60e51b815260206004820152601b60248201527f4275726e656420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b611304816139ac565b6113505760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e20746f20737465726f696420646f6573206e6f74206578697374006044820152606401611253565b3361135a83611a12565b6001600160a01b0316146113b05760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206275726e20746f6b656e20796f7520646f206e6f74206f776e6044820152606401611253565b6113b982613ad0565b600081815260a060205260409020546301000000900460ff166113fa57600081815260a060205260409020805463ff00000019166301000000179055611484565b600081815260a06020526040902054600160201b900460ff1661143c57600081815260a060205260409020805464ff000000001916600160201b179055611484565b60405162461bcd60e51b815260206004820152601a60248201527f4e6f20737465726f696420736c6f747320617661696c61626c650000000000006044820152606401611253565b50506001606555565b6114956139ee565b6033546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156114ce573d6000803e3d6000fd5b50565b610fba838383604051806020016040528060008152506122a7565b6114f46139ee565b609e55565b600080516020614c0f83398151915254610100900460ff1661152e57600080516020614c0f8339815191525460ff1615611532565b303b155b6115a45760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401611253565b600080516020614c0f83398151915254610100900460ff161580156115e057600080516020614c0f833981519152805461ffff19166101011790555b600054610100900460ff16158080156116005750600054600160ff909116105b8061161a5750303b15801561161a575060005460ff166001145b61168c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401611253565b6000805460ff1916600117905580156116af576000805461ff0019166101001790555b61170b6040518060400160405280600f81526020017f455448426174746c65526f79616c6500000000000000000000000000000000008152506040518060400160405280600581526020016422aa24212960d91b815250613adb565b611713613b66565b61171b613bd9565b865161172e90609d9060208a01906143a2565b506097869055609c805463ffffffff87811667ffffffffffffffff1990921691909117600160201b87831602176cffffffffff00000000000000001916680100000000000000009186169190910260ff60601b19161790556000609f556003609a556005609855600a609955662386f26fc10000609b5580156117eb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5080156111ef575050600080516020614c0f833981519152805461ff001916905550505050565b606060008367ffffffffffffffff81111561182f5761182f6145f1565b60405190808252806020026020018201604052801561186257816020015b606081526020019060019003908161184d5790505b50905060005b84811015611a0a57600061187c85836149f7565b9050611887816139ac565b61189157506119f8565b600081815260a0602081815260409283902083516101008082018652915460ff808216835292810483169382019390935262010000830482169481019490945263010000008204811615156060850152600160201b8204161515608084015263ffffffff600160281b8204811692840192909252600160481b8104821660c0840152600160681b90041660e082015261192982611a12565b816000015182602001518360400151846060015185608001518660a001518760c001518860e001518a6040516020016119c99a999897969594939291906001600160a01b039a909a168a5260ff98891660208b015296881660408a01529490961660608801529115156080870152151560a086015263ffffffff90811660c086015292831660e08501529091166101008301526101208201526101400190565b6040516020818303038152906040528484815181106119ea576119ea614a0f565b602002602001018190525050505b80611a0281614a25565b915050611868565b509392505050565b6000610d4382613a48565b611a256139ee565b60028111158015611a34575060015b611a705760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420737461676560981b6044820152606401611253565b609f55565b611a7d6139ee565b600080516020614baf8339815191525415611ae55760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79206368616e676520737570706c79206265666f7265206d696044820152611b9d60f21b6064820152608401611253565b609755565b60006001600160a01b038216611b13576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600080516020614bef833981519152602052604090205467ffffffffffffffff1690565b611b4e6139ee565b611b586000613c4c565b565b611b626139ee565b609c54600160601b900460ff1615611b8357609c805460ff60601b19169055565b609c805460ff60601b1916600160601b179055565b6060600080516020614baf8339815191526003018054610d68906149a6565b60026065541415611c0a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555609f54611c5e5760405162461bcd60e51b815260206004820152601460248201527f6d696e7420686173206e6f7420737461727465640000000000000000000000006044820152606401611253565b60975481611c78600080516020614baf8339815191525490565b611c8291906149f7565b1115611cbf5760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662073746f636b60a01b6044820152606401611253565b333214611d055760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d195c881a5cc8184818dbdb9d1c9858dd60621b6044820152606401611253565b609954336000908152600080516020614bef8339815191526020526040908190205467ffffffffffffffff911c161115611d815760405162461bcd60e51b815260206004820152601860248201527f737572706173736564206d6178207065722077616c6c657400000000000000006044820152606401611253565b609854811115611dd35760405162461bcd60e51b815260206004820152601560248201527f737572706173736564206d6178207065722074786e00000000000000000000006044820152606401611253565b6109c4611dec600080516020614baf8339815191525490565b611df79060016149f7565b1015611f185780600114611e4d5760405162461bcd60e51b815260206004820152601b60248201527f65786365656465642066726565206d696e74207175616e7469747900000000006044820152606401611253565b336000908152600080516020614bef8339815191526020526040908190205467ffffffffffffffff911c1615611ec55760405162461bcd60e51b815260206004820152601260248201527f65786365656465642066726565206d696e7400000000000000000000000000006044820152606401611253565b3415611f135760405162461bcd60e51b815260206004820152601360248201527f6d696e74207072696365206578636565646564000000000000000000000000006044820152606401611253565b611f74565b80609b54611f269190614a40565b3414611f745760405162461bcd60e51b815260206004820152601260248201527f6d696e74207072696365206e6f74206d657400000000000000000000000000006044820152606401611253565b6000611f8c600080516020614baf8339815191525490565b90506000611f9a83836149f7565b9050611fa63384613cab565b808210156121e8576000611fbe633b9aca003a614a75565b9050600060648263ffffffff1611611fd65781611fd9565b60645b90506000611fe8600583614a89565b60ff161561200057611ffb600583614a89565b612003565b60015b90506000612012600a84614a89565b61201d90600a614aab565b60ff161561204057612030600a84614a89565b61203b90600a614aab565b612043565b60015b90506040518061010001604052808360ff1681526020018260ff1681526020018360ff168152602001600015158152602001600015158152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060a0600088815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff02191690831515021790555060808201518160000160046101000a81548160ff02191690831515021790555060a08201518160000160056101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160000160096101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600001600d6101000a81548163ffffffff021916908363ffffffff1602179055509050505050505081806121e090614a25565b925050611fa6565b5050600160655550565b6001600160a01b03821633141561221c5760405163b06307db60e01b815260040160405180910390fd5b3360008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6122b2848484610fbf565b6001600160a01b0383163b156122eb576122ce84848484613cc5565b6122eb576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6122f96139ee565b609c805463ffffffff909216600160201b0267ffffffff0000000019909216919091179055565b606061232b826139ac565b61234857604051630a14c4b560e41b815260040160405180910390fd5b6000612352613dbd565b9050805160001415612373576040518060200160405280600081525061239e565b8061237d84613dcc565b60405160200161238e929190614ace565b6040516020818303038152906040525b9392505050565b600260655414156123f85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b60026065558181141561244d5760405162461bcd60e51b815260206004820152601160248201527f43616e6e6f742066696768742073656c660000000000000000000000000000006044820152606401611253565b612456826139ac565b6124a25760405162461bcd60e51b815260206004820152601c60248201527f4669676874657220746f6b656e20646f6573206e6f74206578697374000000006044820152606401611253565b6124ab816139ac565b6124f75760405162461bcd60e51b815260206004820152601b60248201527f54617267657420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b609c54600160601b900460ff166125505760405162461bcd60e51b815260206004820152601b60248201527f54686520626174746c65206861732079657420746f20737461727400000000006044820152606401611253565b3361255a83611a12565b6001600160a01b0316146125d65760405162461bcd60e51b815260206004820152603760248201527f596f7520646f206e6f74206f776e20746865206669676874657220796f75206160448201527f726520747279696e6720746f20666967687420776974680000000000000000006064820152608401611253565b600060a06000838152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff1681526020016000820160039054906101000a900460ff161515151581526020016000820160049054906101000a900460ff161515151581526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600d9054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050600060a06000858152602001908152602001600020604051806101000160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900460ff1660ff1660ff1681526020016000820160029054906101000a900460ff1660ff1660ff1681526020016000820160039054906101000a900460ff161515151581526020016000820160049054906101000a900460ff161515151581526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200160008201600d9054906101000a900463ffffffff1663ffffffff1663ffffffff16815250509050428260a0015163ffffffff16106128735760405162461bcd60e51b815260206004820152601c60248201527f5461726765742069732063757272656e746c7920736869656c646564000000006044820152606401611253565b428160c0015163ffffffff16106128cc5760405162461bcd60e51b815260206004820181905260248201527f466967687465722069732063757272656e746c79206f6e20636f6f6c646f776e6044820152606401611253565b60e082015163ffffffff16158015906128ee5750428260e0015163ffffffff16105b1561290557815160ff166040830152600060e08301525b60e081015163ffffffff16158015906129275750428160e0015163ffffffff16105b1561293e57805160ff166040820152600060e08201525b60208101516060820151600191829160ff909116901561296657612963600a826149f7565b90505b83608001511561297e5761297b600a826149f7565b90505b846040015160ff16811115612d1c57836000015160ff1660141480156129ab5750836020015160ff166014145b15612b8757600285604001516129c19190614a89565b60ff16156129df57600285604001516129da9190614a89565b6129e2565b60015b60ff16855260208501516129f890600290614a89565b60ff1615612a165760028560200151612a119190614a89565b612a19565b60015b60ff90811660208701528551166040860152609c54612a3e9063ffffffff1642614afd565b63ffffffff90811660c0870152609c54612a59911642614afd565b63ffffffff1660c085015260009150612a7186613ad0565b8460a06000612a8c600080516020614baf8339815191525490565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b9190921602179055612b82336001613cab565b612db9565b846000015160ff16856020015160ff161115612c4f578451601490612bae90600290614a89565b60ff1615612bc9578551612bc490600290614a89565b612bcc565b60015b8551612bd89190614b1c565b60ff1611612c1d578451612bee90600290614a89565b60ff1615612c09578451612c0490600290614a89565b612c0c565b60015b8451612c189190614b1c565b612c20565b60145b60ff168452609c54612c3f90600160201b900463ffffffff1642614afd565b63ffffffff1660e0850152612cec565b601460028660200151612c629190614a89565b60ff1615612c805760028660200151612c7b9190614a89565b612c83565b60015b8560200151612c929190614b1c565b60ff1611612ce05760028560200151612cab9190614a89565b60ff1615612cc95760028560200151612cc49190614a89565b612ccc565b60015b8460200151612cdb9190614b1c565b612ce3565b60145b60ff1660208501525b612cf586613ad0565b609c5460009250612d0c9063ffffffff1642614afd565b63ffffffff1660c0850152612db9565b836040015160ff1660011415612d3e57612d3587613ad0565b60009250612d6b565b60016040850152609c54612d5f90600160201b900463ffffffff1642614afd565b63ffffffff1660e08501525b60028460200151612d7c9190614a89565b85604001818151612d8d9190614aab565b60ff16905250609c54612dad90600160201b900463ffffffff1642614afd565b63ffffffff1660e08601525b836060015115612dcb57600060608501525b836080015115612ddd57600060808501525b8215612ecf57600087815260a0602081815260409283902087518154928901519489015160608a015160808b0151958b015160c08c015160e08d015163ffffffff908116600160681b0263ffffffff60681b19928216600160481b029290921667ffffffffffffffff60481b1991909316600160281b0268ffffffff000000000019991515600160201b029990991668ffffffffff000000001994151563010000000263ff0000001960ff97881662010000021663ffff0000199c88166101000261ffff19909b1697909816969096179890981799909916949094179290921716939093179390931793909316171790555b8115612fc157600086815260a0602081815260409283902088518154928a0151948a015160608b015160808c0151958c015160c08d015160e08e015163ffffffff908116600160681b0263ffffffff60681b19928216600160481b029290921667ffffffffffffffff60481b1991909316600160281b0268ffffffff000000000019991515600160201b029990991668ffffffffff000000001994151563010000000263ff0000001960ff97881662010000021663ffff0000199c88166101000261ffff19909b1697909816969096179890981799909916949094179290921716939093179390931793909316171790555b505060016065555050505050565b612fd76139ee565b8051612fea90609d9060208401906143a2565b5050565b612ff66139ee565b609c805463ffffffff191663ffffffff92909216919091179055565b61301a6139ee565b609754600080516020614baf833981519152546130389060016149f7565b11156130755760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662073746f636b60a01b6044820152606401611253565b3332146130bb5760405162461bcd60e51b81526020600482015260146024820152731b5a5b9d195c881a5cc8184818dbdb9d1c9858dd60621b6044820152606401611253565b604080516101008101825260ff80871680835290861660208301529181019190915282151560608201528115156080820152600060a080830182905260c0830182905260e083018290529061311c600080516020614baf8339815191525490565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b91909216021790556122eb336001613cab565b609d805461321f906149a6565b80601f016020809104026020016040519081016040528092919081815260200182805461324b906149a6565b80156132985780601f1061326d57610100808354040283529160200191613298565b820191906000526020600020905b81548152906001019060200180831161327b57829003601f168201915b505050505081565b6132a86139ee565b600080516020614baf833981519152546133036132cd6033546001600160a01b031690565b6001600160a01b03166000908152600080516020614bef83398151915260205260409081902054901c67ffffffffffffffff1690565b146133505760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c7920757361626c6520696e2064657620656e7669726f6e6d656e7400006044820152606401611253565b6000613368600080516020614baf8339815191525490565b905060005b828110156136f95760006014423361338585876149f7565b6040516020016133ba9392919092835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6040516020818303038152906040528051906020012060001c6133dd9190614b41565b6133e89060016149f7565b905060006014426133f985876149f7565b61340386886149f7565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6134409190614b41565b61344b9060016149f7565b90506000600161345b85876149f7565b61346586886149f7565b61346f87896149f7565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6134ac9190614b41565b6001146134ba5760006134c6565b6134c64261a8c0614afd565b90506000600142806134d8888a6149f7565b60408051602081019490945283019190915260608201526080016040516020818303038152906040528051906020012060001c6135159190614b41565b600114613523576000613526565b60015b905060006001424242604051602001613552939291909283526020830191909152604082015260600190565b6040516020818303038152906040528051906020012060001c6135759190614b41565b600114613583576000613586565b60015b90506040518061010001604052808660ff1681526020018560ff1681526020018660ff168152602001831515815260200182151581526020018463ffffffff168152602001600063ffffffff168152602001600063ffffffff1681525060a06000888a6135f391906149f7565b815260208082019290925260409081016000208351815493850151928501516060860151608087015160a088015160c089015160e09099015160ff95861661ffff1990991698909817610100978616979097029690961763ffff0000191662010000949093169390930263ff0000001916919091176301000000911515919091021768ffffffffff000000001916600160201b9115159190910268ffffffff0000000000191617600160281b63ffffffff938416021767ffffffffffffffff60481b1916600160481b9483169490940263ffffffff60681b191693909317600160681b9190921602179055508493506136f19250839150614a259050565b91505061336d565b50612fea3383613cab565b61370c6139ee565b6001600160a01b0381166137715760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611253565b6114ce81613c4c565b600260655414156137cd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611253565b6002606555818114156138175760405162461bcd60e51b815260206004820152601260248201527121b0b73737ba1039b434b2b6321039b2b63360711b6044820152606401611253565b613820826139ac565b61386c5760405162461bcd60e51b815260206004820152601b60248201527f4275726e656420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401611253565b613875816139ac565b6138c15760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e20746f20736869656c6420646f6573206e6f7420657869737400006044820152606401611253565b336138cb83611a12565b6001600160a01b0316146139215760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206275726e20746f6b656e20796f7520646f206e6f74206f776e6044820152606401611253565b61392a82613ad0565b600081815260a06020526040902054600160281b900463ffffffff1642811161395e576139594261a8c0614afd565b61396e565b61396a61a8c082614afd565b9050805b600092835260a06020526040909220805463ffffffff93909316600160281b0268ffffffff0000000000199093169290921790915550506001606555565b6000600080516020614baf8339815191525482108015610d435750506000908152600080516020614bcf8339815191526020526040902054600160e01b161590565b6033546001600160a01b03163314611b585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611253565b600081600080516020614baf83398151915254811015613ab7576000818152600080516020614bcf8339815191526020526040902054600160e01b8116613ab5575b8061239e5750600019016000818152600080516020614bcf8339815191526020526040902054613a8a565b505b604051636f96cda160e11b815260040160405180910390fd5b6114ce816000613e0e565b600080516020614c0f83398151915254610100900460ff16613b5c5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608401611253565b612fea828261400d565b600054610100900460ff16613bd15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5861410a565b600054610100900460ff16613c445760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5861417e565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612fea8282604051806020016040528060008152506141f0565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613cfa903390899088908890600401614b55565b602060405180830381600087803b158015613d1457600080fd5b505af1925050508015613d44575060408051601f3d908101601f19168201909252613d4191810190614b91565b60015b613d9f573d808015613d72576040519150601f19603f3d011682016040523d82523d6000602084013e613d77565b606091505b508051613d97576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060609d8054610d68906149a6565b604080516080019081905280825b600183039250600a81066030018353600a900480613df757613dfc565b613dda565b50819003601f19909101908152919050565b6000613e1983613a48565b905080600080613e568660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040902080549091565b915091508415613ed257613e6b818433611033565b613ed2576001600160a01b03831660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16613ed257604051632ce44b5f60e11b815260040160405180910390fd5b8015613edd57600082555b6001600160a01b0383166000818152600080516020614bef8339815191526020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b176000878152600080516020614bcf8339815191526020526040902055600160e11b8416613fa557600186016000818152600080516020614bcf8339815191526020526040902054613fa357600080516020614baf833981519152548114613fa3576000818152600080516020614bcf833981519152602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c418054600101905550505050565b600080516020614c0f83398151915254610100900460ff1661408e5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604482015273206973206e6f7420696e697469616c697a696e6760601b6064820152608401611253565b81516140c0907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c429060208501906143a2565b5080516140f3907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c439060208401906143a2565b506000600080516020614baf833981519152555050565b600054610100900460ff166141755760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b611b5833613c4c565b600054610100900460ff166141e95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401611253565b6001606555565b6141fa8383614277565b6001600160a01b0383163b15610fba57600080516020614baf833981519152548281035b6142316000868380600101945086613cc5565b61424e576040516368d2bf6b60e11b815260040160405180910390fd5b81811061421e5781600080516020614baf833981519152541461427057600080fd5b5050505050565b600080516020614baf83398151915254816142a55760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0383166000818152600080516020614bef833981519152602090815260408083208054680100000000000000018802019055848352600080516020614bcf83398151915290915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461436e57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101614336565b508161438c57604051622e076360e81b815260040160405180910390fd5b600080516020614baf8339815191525550505050565b8280546143ae906149a6565b90600052602060002090601f0160209004810192826143d05760008555614416565b82601f106143e957805160ff1916838001178555614416565b82800160010185558215614416579182015b828111156144165782518255916020019190600101906143fb565b50614422929150614426565b5090565b5b808211156144225760008155600101614427565b6001600160e01b0319811681146114ce57600080fd5b60006020828403121561446357600080fd5b813561239e8161443b565b60005b83811015614489578181015183820152602001614471565b838111156122eb5750506000910152565b600081518084526144b281602086016020860161446e565b601f01601f19169290920160200192915050565b60208152600061239e602083018461449a565b6000602082840312156144eb57600080fd5b5035919050565b80356001600160a01b038116811461450957600080fd5b919050565b6000806040838503121561452157600080fd5b61452a836144f2565b946020939093013593505050565b803563ffffffff8116811461450957600080fd5b60006020828403121561455e57600080fd5b61239e82614538565b60008060006060848603121561457c57600080fd5b505081359360208301359350604090920135919050565b6000806000606084860312156145a857600080fd5b6145b1846144f2565b92506145bf602085016144f2565b9150604084013590509250925092565b600080604083850312156145e257600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115614622576146226145f1565b604051601f8501601f19908116603f0116810190828211818310171561464a5761464a6145f1565b8160405280935085815286868601111561466357600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261468e57600080fd5b61239e83833560208501614607565b600080600080600060a086880312156146b557600080fd5b853567ffffffffffffffff8111156146cc57600080fd5b6146d88882890161467d565b955050602086013593506146ee60408701614538565b92506146fc60608701614538565b915061470a60808701614538565b90509295509295909350565b60006101008201905060ff835116825260ff602084015116602083015260ff604084015116604083015260608301511515606083015260808301511515608083015260a083015161476f60a084018263ffffffff169052565b5060c083015161478760c084018263ffffffff169052565b5060e083015161479f60e084018263ffffffff169052565b5092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156147fb57603f198886030184526147e985835161449a565b945092850192908501906001016147cd565b5092979650505050505050565b60006020828403121561481a57600080fd5b61239e826144f2565b8035801515811461450957600080fd5b6000806040838503121561484657600080fd5b61484f836144f2565b915061485d60208401614823565b90509250929050565b6000806000806080858703121561487c57600080fd5b614885856144f2565b9350614893602086016144f2565b925060408501359150606085013567ffffffffffffffff8111156148b657600080fd5b8501601f810187136148c757600080fd5b6148d687823560208401614607565b91505092959194509250565b6000602082840312156148f457600080fd5b813567ffffffffffffffff81111561490b57600080fd5b613db58482850161467d565b803560ff8116811461450957600080fd5b6000806000806080858703121561493e57600080fd5b61494785614917565b935061495560208601614917565b925061496360408601614823565b915061497160608601614823565b905092959194509250565b6000806040838503121561498f57600080fd5b614998836144f2565b915061485d602084016144f2565b600181811c908216806149ba57607f821691505b602082108114156149db57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115614a0a57614a0a6149e1565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614a3957614a396149e1565b5060010190565b6000816000190483118215151615614a5a57614a5a6149e1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614a8457614a84614a5f565b500490565b600060ff831680614a9c57614a9c614a5f565b8060ff84160491505092915050565b600060ff821660ff841680821015614ac557614ac56149e1565b90039392505050565b60008351614ae081846020880161446e565b835190830190614af481836020880161446e565b01949350505050565b600063ffffffff808316818516808303821115614af457614af46149e1565b600060ff821660ff84168060ff03821115614b3957614b396149e1565b019392505050565b600082614b5057614b50614a5f565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614b87608083018461449a565b9695505050505050565b600060208284031215614ba357600080fd5b815161239e8161443b56fe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c402569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c442569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45ee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa26469706673582212203f3699a23a0a44584ec96f856b91d2fd2e75b2eb3b0bf7711be03e893e44096a64736f6c63430008090033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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